mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 05:05:55 +08:00
75 lines
3.1 KiB
Text
75 lines
3.1 KiB
Text
<div class="card project-card"
|
|
data-id="<%= project.id %>"
|
|
data-edit-url="<%= edit_project_path(project) %>"
|
|
data-editable="<%= can_manage_project?(project) %>"
|
|
data-moveable="<%= can_update_team?(current_team) %>"
|
|
data-archivable="<%= project.active? && can_archive_project?(project) %>"
|
|
data-restorable="<%= project.archived? && can_restore_project?(project) %>">
|
|
<div class="checkbox-cell table-cell">
|
|
<div class="sci-checkbox-container">
|
|
<input value="1" type="checkbox" class="sci-checkbox project-card-selector">
|
|
<span class="sci-checkbox-label"></span>
|
|
</div>
|
|
</div>
|
|
<div class="project-name-cell table-cell">
|
|
<% if project.archived? %>
|
|
<%= link_to project_url(project, view_mode: :archived) do %>
|
|
<h3 class="name" title="<%= project.name %>">
|
|
<%= project.name %>
|
|
</h3>
|
|
<% end %>
|
|
<% else %>
|
|
<%= link_to project_url(project) do %>
|
|
<h3 class="name" title="<%= project.name %>">
|
|
<%= project.name %>
|
|
</h3>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
<div class="actions actions-cell table-cell">
|
|
<%= render partial: 'projects/index/project_actions_dropdown.html.erb', locals: { project: project, view: 'cards' } %>
|
|
</div>
|
|
|
|
<div class="data-row start-date-cell table-cell">
|
|
<span class="card-label"><%= t('projects.index.card.start_date') %></span>
|
|
<span class="value card-value"> <%= l(project.created_at, format: :full_date) %></span>
|
|
<span class="value cell-value"> <%= l(project.created_at, format: :full_with_comma) %></span>
|
|
</div>
|
|
|
|
<div class="data-row visibility-cell table-cell">
|
|
<span class="card-label"><%= t('projects.index.card.visibility') %></span>
|
|
<span class="value">
|
|
<% if project.hidden? %>
|
|
<%= t('projects.index.hidden') %>
|
|
<% else %>
|
|
<%= t('projects.index.visible') %>
|
|
<% end %>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="data-row user-cell table-cell">
|
|
<span class="card-label"><%= t('projects.index.card.users') %></span>
|
|
<div class="value">
|
|
<% if can_manage_project_users?(project) %>
|
|
<%= link_to edit_access_permissions_project_path(project), class: 'project-users-link', data: { action: 'remote-modal' } do %>
|
|
<%= render partial: 'projects/index/users_list.html.erb', locals: { project: project } %>
|
|
<span class="new-user global-avatar-container">
|
|
<i class="fas fa-plus"></i>
|
|
</span>
|
|
<% end %>
|
|
<% else %>
|
|
<%= link_to access_permissions_project_path(project), class: 'project-users-link', data: { action: 'remote-modal' } do %>
|
|
<%= render partial: 'projects/index/users_list.html.erb', locals: { project: project } %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<% if project.archived? %>
|
|
<div class="data-row archived-date-cell table-cell">
|
|
<span class="card-label"><%= t('projects.index.card.archived_date') %></span>
|
|
<span class="value card-value"> <%= l(project.archived_on, format: :full_date) %></span>
|
|
<span class="value cell-value"> <%= l(project.archived_on, format: :full_with_comma) %></span>
|
|
</div>
|
|
<% end %>
|
|
</div>
|