Add info to experiment archive cards

Also add addtional check for due date on archive experiment
This commit is contained in:
Jure Grabnar 2016-08-09 11:04:46 +02:00
parent a0fe31479f
commit 1a7a7a1d1a
3 changed files with 35 additions and 2 deletions

View file

@ -32,10 +32,10 @@
<div class="panel-body">
<div class="row">
<div class="col-xs-6">
<%= link_to_if can_edit_module(my_module), t("experiments.canvas.full_zoom.due_date"), due_date_my_module_path(my_module, format: :json), remote: true, class: "due-date-link" %>
<%= link_to_if can_edit_module(my_module) && can_edit_modules(my_module.experiment), t("experiments.canvas.full_zoom.due_date"), due_date_my_module_path(my_module, format: :json), remote: true, class: "due-date-link" %>
</div>
<div class="col-xs-6">
<% if can_edit_module(my_module) %>
<% if can_edit_module(my_module) && can_edit_modules(my_module.experiment) %>
<%= link_to due_date_my_module_path(my_module, format: :json), remote: true, class: "due-date-link due-date-refresh" do %>
<%= render partial: "my_modules/due_date_label.html.erb", locals: { my_module: my_module } %>
<% end %>

View file

@ -29,10 +29,39 @@
</div>
<div class="col-xs-6">
<span title="<%=t "projects.experiment_archive.archived_on_title", date: l(experiment.archived_on, format: :full_date), time: l(experiment.archived_on, format: :time) %>">
<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
<%=l experiment.archived_on, format: :full_date %>
</span>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<%=t "projects.experiment_archive.created_on" %>
</div>
<div class="col-xs-6">
<span title="<%=t "projects.experiment_archive.created_on_title", date: l(experiment.created_at, format: :full_date), time: l(experiment.created_at, format: :time) %>">
<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
<%=l experiment.created_at, format: :full_date %>
</span>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<%=t "projects.experiment_archive.last_modified_on" %>
</div>
<div class="col-xs-6">
<span title="<%=t "projects.experiment_archive.created_on_title", date: l(experiment.updated_at, format: :full_date), time: l(experiment.updated_at, format: :time) %>">
<span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
<%=l experiment.updated_at, format: :full_date %>
</span>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<%= experiment.description %>
</span>
</div>
</div>
</div>
</div>

View file

@ -391,7 +391,11 @@ en:
no_archived_experiments: "No archived experiments!"
restore_option: "Restore"
archived_on: "Archived on"
created_on: "Created on"
last_modified_on: "Last modified on"
archived_on_title: "Experiment archived on %{date} at %{time}."
created_on_title: "Experiment created on %{date} at %{time}."
last_modified_on_title: "Experiment last modified on %{date} at %{time}."
user_organizations:
enums: