Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3486 - Project#index-card rework #3888

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 41 additions & 26 deletions apps/dashboard/app/views/projects/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,28 @@
<div class="row">
<% @projects.each do |project| %>
<div id="<%= project.id %>" class="col-md-3 project-icon project-card">
<div class="text-center d-flex justify-content-center">
<%= link_to(project_path(project.id), class: 'text-dark') do %>
<%= icon_tag(URI.parse(project.icon)) %>
<%= content_tag(:p, project.title) %>
<% end %>
</div>

<%= 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 %>
<div class="text-center d-flex justify-content-center">
<strong>
<%= icon_tag(URI.parse(project.icon)) %>
<%= content_tag(:p, project.title) %>
</strong>
</div>
<div class="row">
<div class="col">
<%= 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') }
%>
</div>
<div class="col">
<%= 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'
%>
</div>
</div>
<% end %>
</div>
<% end %>
</div>
Expand All @@ -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")) %><br>
<%= I18n.t('dashboard.jobs_create_blank_project') %>
<div class="text-center d-flex justify-content-center">
<strong>
<%= icon_tag(URI.parse("fas://file-medical")) %><br>
<%= I18n.t('dashboard.jobs_create_blank_project') %>
</strong>
</div>
<% end %>
</div>

<%- if @templates.size.positive? -%>
<div class="mt-5 justify-content-center text-center project-icon">
<%= 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")) %><br>
<%= I18n.t('dashboard.jobs_create_template_project') %>
<% end %>
</div>
<div class="mt-5 justify-content-center text-center project-icon">
<%= link_to(new_project_path({template: true}),
title: I18n.t('dashboard.jobs_create_template_project'),
class: 'text-dark btn btn-link') do
%>
<div class="text-center d-flex justify-content-center">
<strong>
<%= icon_tag(URI.parse("fas://copy")) %><br>
<%= I18n.t('dashboard.jobs_create_template_project') %>
</strong>
</div>
<% end %>
</div>
<%- end -%>

</div>
Expand Down
Loading