Minor code style changes.

This commit is contained in:
Matej Zrimšek 2018-02-05 18:37:09 +01:00
parent c5b798017e
commit 7938c2e036
4 changed files with 9 additions and 9 deletions

View file

@ -16,7 +16,7 @@ class MyModulesController < ApplicationController
before_action :load_repository, only: %I[assign_repository_records
unassign_repository_records]
before_action :check_manage_permissions,
only: %I[update destroy description due_date]
only: %i(update destroy description due_date)
before_action :check_view_info_permissions, only: :show
before_action :check_view_permissions, only:
%i(activities activities_tab protocols results samples samples_index)

View file

@ -11,7 +11,7 @@
<div class="col-xs-6 col-sm-6 col-md-4">
<div class="badge-icon bg-primary">
<% if can_manage_experiment?(@my_module.experiment) then %>
<% if can_manage_experiment?(@my_module.experiment) %>
<%= link_to due_date_my_module_path(@my_module, format: :json), remote: true, class: "due-date-link", style: "color: inherit" do %>
<span class="glyphicon glyphicon-calendar"></span>
<% end %>
@ -21,7 +21,7 @@
</div>
<div class="well well-sm">
<span class="hidden-xs hidden-sm hidden-md"><%=t "my_modules.module_header.due_date" %></span>
<% if can_manage_experiment?(@my_module.experiment) then %>
<% if can_manage_experiment?(@my_module.experiment) %>
<%= link_to due_date_my_module_path(@my_module, format: :json), remote: true, class: "due-date-link", style: "color: inherit" do %>
<span class="task-due-date">
<%= render partial: "module_header_due_date_label.html.erb",
@ -62,7 +62,7 @@
</div>
<div class="well well-sm">
<span class="hidden-xs hidden-sm"><%=t "my_modules.module_header.tags" %></span>
<% if can_manage_experiment?(@my_module.experiment) then %>
<% if can_manage_experiment?(@my_module.experiment) %>
<%= link_to my_module_tags_edit_url(@my_module, format: :json), remote: true, class: "edit-tags-link tags-refresh", style: "color: inherit" do %>
<%= render partial: "my_modules/tags", locals: { my_module: @my_module } %>
<% end %>

View file

@ -103,7 +103,7 @@
<% elsif experiment_page? ||
sample_groups_page_experiment? ||
sample_types_page_expermient? %>
<% if can_read_experiment?(@experiment) then %>
<% if can_read_experiment?(@experiment) %>
<li id="canvas-nav-tab" class="<%= "active" if is_experiment_canvas? %>">
<a href="<%= canvas_experiment_url(@experiment) %>" title="<%=t "nav2.experiments.canvas" %>">
<span class="hidden-sm hidden-md"><%=t "nav2.experiments.canvas" %></span>
@ -127,7 +127,7 @@
</a>
</li>
<% end %>
<% if can_read_experiment?(@experiment) then %>
<% if can_read_experiment?(@experiment) %>
<li id="project-archive-nav-tab" data-turbolinks="false" class="<%= "active" if is_experiment_archive? %>">
<a href="<%= module_archive_experiment_url(@experiment) %>" title="<%=t "nav2.projects.archive" %>">
<span class="glyphicon glyphicon-briefcase"></span>
@ -138,7 +138,7 @@
<% elsif module_page? ||
sample_types_page_my_module? ||
sample_groups_page_my_module? %>
<% if can_read_experiment?(@my_module.experiment) then %>
<% if can_read_experiment?(@my_module.experiment) %>
<li id="steps-nav-tab" class="<%= "active" if is_module_protocols? %>">
<a href="<%= protocols_my_module_url(@my_module) %>" title="<%=t "nav2.modules.steps" %>">
<span class="hidden-sm hidden-md"><%=t "nav2.modules.steps" %></span>
@ -161,7 +161,7 @@
<li data-hook="secondary-navigation-tabs"></li>
<% if can_read_experiment?(@my_module.experiment) then %>
<% if can_read_experiment?(@my_module.experiment) %>
<li id="module-samples-nav-tab" class="<%= "active" if is_module_samples? ||
sample_types_page_my_module? ||
sample_groups_page_my_module? %>">

View file

@ -11,7 +11,7 @@
<% if currently_active? my_module %>
<%= my_module.name %>
<% else %>
<% if can_read_experiment?(my_module.experiment) then %>
<% if can_read_experiment?(my_module.experiment) %>
<%= link_to my_module.name, module_action_to_link_to(my_module), class: "module-link" %>
<% else %>
<%= my_module.name %>