From 2d1c595a538501a5728cf3336f9d2e69304069e8 Mon Sep 17 00:00:00 2001 From: Greg Buchanan Date: Mon, 21 Oct 2024 00:50:30 -0400 Subject: [PATCH] Project card buttons are now side by side. All cards on project index are clickable anywhere within their borders. --- .../app/views/projects/index.html.erb | 67 ++++++++++++------- 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/apps/dashboard/app/views/projects/index.html.erb b/apps/dashboard/app/views/projects/index.html.erb index 3b188aa114..717d5fbab6 100644 --- a/apps/dashboard/app/views/projects/index.html.erb +++ b/apps/dashboard/app/views/projects/index.html.erb @@ -8,21 +8,28 @@
<% @projects.each do |project| %>
-
- <%= link_to(project_path(project.id), class: 'text-dark') do %> - <%= icon_tag(URI.parse(project.icon)) %> - <%= content_tag(:p, project.title) %> - <% end %> -
- - <%= button_to 'Delete', project_path(project.id), class: 'btn btn-danger w-80 mb-1', method: 'delete', - form: { class: 'button_to d-flex justify-content-center' }, - data: { confirm: I18n.t('dashboard.jobs_project_delete_project_confirmation') } - %> - <%= button_to 'Edit', edit_project_path(project.id), class: 'btn btn-info w-80', method: 'get', - form: { class: 'd-flex justify-content-center' }, - title: 'Edit project directory' - %> + <%= link_to(project_path(project.id), class: 'text-dark') do %> +
+ + <%= icon_tag(URI.parse(project.icon)) %> + <%= content_tag(:p, project.title) %> + +
+
+
+ <%= button_to 'Delete', project_path(project.id), class: 'btn btn-danger w-100 mb-1', method: 'delete', + form: { class: 'button_to d-flex justify-content-center' }, + data: { confirm: I18n.t('dashboard.jobs_project_delete_project_confirmation') } + %> +
+
+ <%= button_to 'Edit', edit_project_path(project.id), class: 'btn btn-info w-100', method: 'get', + form: { class: 'd-flex justify-content-center' }, + title: 'Edit project directory' + %> +
+
+ <% end %>
<% end %>
@@ -34,21 +41,29 @@ title: I18n.t('dashboard.jobs_create_blank_project'), class: 'text-dark btn btn-link') do %> - <%= icon_tag(URI.parse("fas://plus")) %>
- <%= I18n.t('dashboard.jobs_create_blank_project') %> +
+ + <%= icon_tag(URI.parse("fas://file-medical")) %>
+ <%= I18n.t('dashboard.jobs_create_blank_project') %> +
+
<% end %> <%- if @templates.size.positive? -%> -
- <%= link_to(new_project_path({template: true}), - title: I18n.t('dashboard.jobs_create_template_project'), - class: 'text-dark btn btn-link') do - %> - <%= icon_tag(URI.parse("fas://plus")) %>
- <%= I18n.t('dashboard.jobs_create_template_project') %> - <% end %> -
+
+ <%= link_to(new_project_path({template: true}), + title: I18n.t('dashboard.jobs_create_template_project'), + class: 'text-dark btn btn-link') do + %> +
+ + <%= icon_tag(URI.parse("fas://copy")) %>
+ <%= I18n.t('dashboard.jobs_create_template_project') %> +
+
+ <% end %> +
<%- end -%>