From b0b43869271b9e17c8ffb693c09f9e115c10c34e Mon Sep 17 00:00:00 2001 From: Alex Turchyn Date: Sat, 3 Jun 2023 01:39:22 +0300 Subject: [PATCH] update dashboard template --- app/views/dashboard/index.html.erb | 46 ++++++++++++++++++++++++------ app/views/users/index.html.erb | 29 +++---------------- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 69476855..71105e58 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -1,8 +1,38 @@ - <%= link_to 'Create Template', new_template_path, data: { turbo_frame: :modal } %> -<% @templates.each do |template| %> -
- <%= template.name %> | - edit | - submissions | -
-<% end %> +
+

Dashboard

+ <%= link_to new_template_path, class: 'btn btn-primary btn-md gap-2', data: { turbo_frame: :modal } do %> + + + + + + + <% end %> +
+
+ <% @templates.each do |template| %> +
+
+

+ <%= link_to template.name, template_submissions_path(template) %> + <%= link_to 'Edit', template_path(template), class: 'btn btn-outline btn-xs' %> +

+
+

Created by <%= template.author.full_name %>

+

+ + + + + + + + + + <%= l(template.created_at, format: :long) %> +

+
+
+
+ <% end %> +
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index b2eb32e4..0b0f5501 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -4,31 +4,10 @@

Team

<%= link_to new_user_path, class: 'btn btn-primary btn-md gap-2', data: { turbo_frame: 'modal' } do %> - - - - + + + + New User <% end %>