Starting companies and admin
This commit is contained in:
14
app/views/active_storage/blobs/_blob.html.erb
Normal file
14
app/views/active_storage/blobs/_blob.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<figure class="attachment attachment--<%= blob.representable? ? "preview" : "file" %> attachment--<%= blob.filename.extension %>">
|
||||
<% if blob.representable? %>
|
||||
<%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %>
|
||||
<% end %>
|
||||
|
||||
<figcaption class="attachment__caption">
|
||||
<% if caption = blob.try(:caption) %>
|
||||
<%= caption %>
|
||||
<% else %>
|
||||
<span class="attachment__name"><%= blob.filename %></span>
|
||||
<span class="attachment__size"><%= number_to_human_size blob.byte_size %></span>
|
||||
<% end %>
|
||||
</figcaption>
|
||||
</figure>
|
||||
Binary file not shown.
@@ -1,2 +1,21 @@
|
||||
<h1>CAF Compliance Tracking</h1>
|
||||
<h2>By Hidden Agenda Ltd</h2>
|
||||
|
||||
<% if !user_signed_in? %>
|
||||
Not Signed in.
|
||||
|
||||
<% else %>
|
||||
<%#= current_user.roletxt %>
|
||||
<% if current_user.admin? %>
|
||||
<h2>Companies</h2>
|
||||
<%= link_to "Add Company", new_company_path %>
|
||||
|
||||
<% @companies.each do |company| %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if current_user.user? %>
|
||||
User Stuff here!
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
3
app/views/layouts/action_text/contents/_content.html.erb
Normal file
3
app/views/layouts/action_text/contents/_content.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="trix-content">
|
||||
<%= yield -%>
|
||||
</div>
|
||||
@@ -7,12 +7,21 @@
|
||||
<%= csp_meta_tag %>
|
||||
|
||||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||
<%= javascript_importmap_tags %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<% if notice %><p class="notice"><%= notice %></p><% end %>
|
||||
<% if alert %><p class="alert"><%= alert %></p><% end %>
|
||||
|
||||
<nav>
|
||||
<a href="/">Home</a>
|
||||
<% if !user_signed_in? %>
|
||||
<%= link_to "Login", new_user_session_path %>
|
||||
<% else %>
|
||||
<%= button_to "Log out", destroy_user_session_path, method: :delete %>
|
||||
<% end %>
|
||||
</nav>
|
||||
</header>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user