UI/UX restyle - fixes throughout application part one

This commit is contained in:
mlorb 2018-05-08 16:33:42 +02:00
parent a6275062b7
commit 7df40e56c7
52 changed files with 1196 additions and 1083 deletions

View file

@ -294,6 +294,9 @@ function initLoadFromRepositoryTable(content) {
{ data: "5" },
{ data: "6" }
],
oLanguage: {
sSearch: "Filter:"
},
rowCallback: function(row, data, dataIndex) {
// Get row ID
var rowId = data["DT_RowId"];

View file

@ -65,6 +65,9 @@ function initProtocolsTable() {
{ data: "5" },
{ data: "6" }
],
oLanguage: {
sSearch: "Filter:"
},
rowCallback: function(row, data, dataIndex) {
// Get row ID
var rowId = data["DT_RowId"];

View file

@ -43,7 +43,7 @@
var task_button = $("[data-action='complete-task']");
task_button.attr('data-action', 'uncomplete-task');
task_button.find('.btn')
.removeClass('btn-primary').addClass('btn-default');
.removeClass('btn-success').addClass('btn-default');
$('.task-due-date').html(data.module_header_due_date_label);
$('.task-state-label').html(data.module_state_label);
task_button
@ -80,7 +80,8 @@
button = step.find("[data-action='complete-step']");
button.attr("data-action", "uncomplete-step");
button.find(".btn").removeClass("btn-primary").addClass("btn-default");
button.find(".btn").removeClass("btn-success").addClass("btn-default");
button.find("button").html('<span class="glyphicon glyphicon-remove"></span>&nbsp;' + data.new_title);
if (data.task_ready_to_complete) {
$('#completed-task-modal').modal('show');
@ -92,10 +93,9 @@
button = step.find("[data-action='uncomplete-step']");
button.attr("data-action", "complete-step");
button.find(".btn").removeClass("btn-default").addClass("btn-primary");
button.find(".btn").removeClass("btn-default").addClass("btn-success");
button.find("button").html('<span class="glyphicon glyphicon-ok"></span>&nbsp;' + data.new_title);
}
button.find("button").html(data.new_title);
},
error: function (data) {
console.log ("error");

View file

@ -146,6 +146,9 @@
'sWidth': '1%',
'render': renderCheckboxHTML
}],
'oLanguage': {
'sSearch': "Filter:"
},
'fnDrawCallback': tableDrowCallback,
'createdRow': appendEditPathToRow
});

View file

@ -92,6 +92,9 @@ var RepositoryDatatable = (function(global) {
"class='record-info-link'>" + data + '</a>';
}
}],
oLanguage: {
sSearch: "Filter:"
},
rowCallback: function(row, data) {
// Get row ID
var rowId = data.DT_RowId;

View file

@ -120,7 +120,10 @@ function initUsersTable() {
{ data: "3" },
{ data: "4" },
{ data: "5" }
]
],
oLanguage: {
sSearch: "Filter:"
}
});
}

View file

@ -192,15 +192,15 @@ $btn-border-radius-small: $border-radius-small;
// $grid-gutter-width: 30px;
// $grid-float-breakpoint: $screen-sm-min;
// $grid-float-breakpoint-max: ($grid-float-breakpoint - 1);
//
// // Container sizes
// $container-tablet: (720px + $grid-gutter-width);
// $container-sm: $container-tablet;
// $container-desktop: (940px + $grid-gutter-width);
// $container-md: $container-desktop;
// $container-large-desktop: (1140px + $grid-gutter-width);
// $container-lg: $container-large-desktop;
//
// Container sizes
$container-tablet: auto;
$container-sm: auto;
$container-desktop: auto;
$container-md: auto;
$container-large-desktop: auto;
$container-lg: auto;
// // Navbar
// $navbar-height: 50px;
// $navbar-margin-bottom: $line-height-computed;

View file

@ -22,6 +22,7 @@ $toggle-btn-size: 50px;
transition: all 0.5s ease;
#sidebar-wrapper {
box-shadow: 0 1px 4px $color-alto;
background-color: $color-white;
z-index: 1000;
position: fixed;

View file

@ -5,7 +5,9 @@
$color-group-hover: $brand-primary;
$color-module-hover: $brand-default;
#new-project-modal, #edit-project-modal {
#new-project-modal,
#edit-project-modal,
#copy-to-repository-modal {
.btn-group label.btn-primary:not(.active) {
background-color: $color-white;
border-color: $color-silver;

View file

@ -2,6 +2,7 @@
@import "mixins";
#main-nav {
box-shadow: 0 3px 6px $color-alto;
margin-bottom: 0;
}

View file

@ -1,9 +1,5 @@
@import "constants";
.repository-columns-header {
margin-top: 30px;
}
.repository-columns-body {
margin-top: 50px;
@ -36,5 +32,9 @@
}
#content-reports-index {
margin-top: 50px;
margin-top: 15px;
}
#repository-toolbar {
margin-top: 15px;
}

View file

@ -46,10 +46,16 @@ table {
}
}
#fluid-content {
#fluid-content:not(.no-second-nav-container) {
padding-left: 15px;
padding-right: 15px;
padding-top: 80px;
padding-top: 50px;
}
.content-pane {
background-color: $color-white;
margin: 20px 0;
padding: 15px 20px;
}
.spacer {
@ -116,10 +122,6 @@ body {
cursor: -webkit-grabbing;
}
.bg-primary {
background-color: $brand-primary;
}
/* this rule is strict because the order of css files is not correct */
.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
width: 100% !important;
@ -269,7 +271,7 @@ a[data-toggle="tooltip"] {
}
.nav-name {
padding: 15px 0;
padding: 5px 0;
}
ul.nav {
@ -529,6 +531,7 @@ ul.double-line > li {
.page-header {
border-color: $color-alto;
margin-top: 0;
}
.pagination > .active > a,
@ -682,7 +685,8 @@ ul.double-line > li {
}
#global-activity-page {
margin-top: 50px;
margin-top: 15px;
padding: 0;
}
.btn-more-activities {
@ -872,8 +876,10 @@ ul.content-module-activities {
}
.badge-icon {
font-size: 1.4em;
background-color: $color-silver;
color: $color-white;
float: left;
font-size: 1.4em;
padding: 6px 10px;
& + .well-sm {
@ -936,6 +942,7 @@ ul.content-module-activities {
position: absolute;
& > .badge {
background: $brand-success;
border-radius: 2em;
float: left;
font-size: 23.4px;
@ -955,6 +962,7 @@ ul.content-module-activities {
}
& > .badge.icon {
background-color: $color-silver;
font-size: 16.5px;
padding: 9px;
}

View file

@ -12,8 +12,12 @@ module ApplicationHelper
end
def project_page?
controller_name == 'projects' ||
(controller_name == 'reports' && action_name == 'index')
controller_name == 'projects' &&
action_name.in?(%w(show experiment_archive))
end
def all_projects_page?
controller_name == 'projects' && action_name.in?(%w(index archive))
end
def display_tooltip(message, len = Constants::NAME_TRUNCATION_LENGTH)

View file

@ -1,5 +1,13 @@
module SecondaryNavigationHelper
def is_all_projects_index?
action_name == 'index'
end
def is_all_projects_archive?
action_name == 'archive'
end
def is_project_info?
action_name == 'show'
end
@ -57,7 +65,9 @@ module SecondaryNavigationHelper
end
def title_element
if project_page?
if all_projects_page?
current_team
elsif project_page?
@project
elsif experiment_page?
@experiment

View file

@ -1,24 +1,26 @@
<% provide :head_title, t('nav.label.activities') %>
<div class="container" id="global-activity-page">
<div class="col-md-12">
<ul id="list-activities" class="no-style content-activities content-module-activities">
<% if @vars[:activities].empty? %>
<li><em><%= t'activities.index.no_activities' %></em></li>
<% else %>
<% @vars[:activities].each do |activity| %>
<%= render 'activity.html.erb', activity: activity %>
<div class="content-pane">
<div class="container" id="global-activity-page">
<div>
<ul id="list-activities" class="no-style content-activities content-module-activities">
<% if @vars[:activities].empty? %>
<li><em><%= t'activities.index.no_activities' %></em></li>
<% else %>
<% @vars[:activities].each do |activity| %>
<%= render 'activity.html.erb', activity: activity %>
<% end %>
<% end %>
</ul>
<% if @vars[:more_activities_url].present? && @vars[:page] == 1 %>
<div class="text-center">
<a class="btn btn-default btn-more-activities"
href="<%= @vars[:more_activities_url] %>"
data-remote="true">
<%= t'activities.index.more_activities' %></a>
</div>
<% end %>
</ul>
<% if @vars[:more_activities_url].present? && @vars[:page] == 1 %>
<div class="text-center">
<a class="btn btn-default btn-more-activities"
href="<%= @vars[:more_activities_url] %>"
data-remote="true">
<%= t'activities.index.more_activities' %></a>
</div>
<% end %>
</div>
</div>

View file

@ -2,61 +2,63 @@
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<div class="row">
<div class="container-fluid">
<div id="diagram-buttons">
<% if can_manage_experiment?(@experiment) %>
<%=link_to canvas_edit_experiment_url(@experiment),
remote: true,
type: 'button',
id: 'edit-canvas-button',
data: { action: 'edit' },
class: 'ajax btn btn-default' do %>
<span class="glyphicon glyphicon-pencil"></span>
<span class="hidden-xs"><%=t 'experiments.canvas.canvas_edit' %></span>
<% end %>
<!-- experiment actions -->
<span class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="exActionsMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="hidden-xs"><%= t'experiments.canvas.actions' %></span>
<span class="visible-xs-inline"><i class="glyphicon glyphicon-sort"></i></span>
<span class="caret"></span>
</button>
<%= render partial: 'experiments/dropdown_actions.html.erb',
locals: { project: @project, experiment: @experiment } %>
</span>
<% end %>
<div class="toolbarButtons">
<span class="hidden-xs"><%=t 'experiments.canvas.zoom' %></span>
<div id="zoom-level-buttons" class="btn-group" data-toggle="buttons">
<%=link_to canvas_full_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default active", "data-action" => "full_zoom", "data-toggle" => "button", "aria-pressed" => true do %>
<span class="glyphicon glyphicon-th-large" aria-hidden="true" ></span>
<% end %>
<%=link_to canvas_medium_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "medium_zoom" do %>
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
<% end %>
<%=link_to canvas_small_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "small_zoom" do %>
<span class="glyphicon glyphicon-th" aria-hidden="true"></span>
<% end %>
</div>
</div>
<% if can_create_experiments?(@project) %>
<%= link_to new_project_experiment_url(@project),
remote: true,
type: "button",
id: 'new-experiment',
class: "btn btn-primary pull-right" do %>
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs-custom"><%=t 'experiments.new.create' %></span>
<div class="content-pane">
<div class="row">
<div class="container-fluid">
<div id="diagram-buttons">
<% if can_manage_experiment?(@experiment) %>
<%=link_to canvas_edit_experiment_url(@experiment),
remote: true,
type: 'button',
id: 'edit-canvas-button',
data: { action: 'edit' },
class: 'ajax btn btn-default' do %>
<span class="glyphicon glyphicon-pencil"></span>
<span class="hidden-xs"><%=t 'experiments.canvas.canvas_edit' %></span>
<% end %>
<!-- experiment actions -->
<span class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="exActionsMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="hidden-xs"><%= t'experiments.canvas.actions' %></span>
<span class="visible-xs-inline"><i class="glyphicon glyphicon-sort"></i></span>
<span class="caret"></span>
</button>
<%= render partial: 'experiments/dropdown_actions.html.erb',
locals: { project: @project, experiment: @experiment } %>
</span>
<% end %>
<div class="toolbarButtons">
<span class="hidden-xs"><%=t 'experiments.canvas.zoom' %></span>
<div id="zoom-level-buttons" class="btn-group" data-toggle="buttons">
<%=link_to canvas_full_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default active", "data-action" => "full_zoom", "data-toggle" => "button", "aria-pressed" => true do %>
<span class="glyphicon glyphicon-th-large" aria-hidden="true" ></span>
<% end %>
<% end %>
<%=link_to canvas_medium_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "medium_zoom" do %>
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
<% end %>
<%=link_to canvas_small_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "small_zoom" do %>
<span class="glyphicon glyphicon-th" aria-hidden="true"></span>
<% end %>
</div>
</div>
<% if can_create_experiments?(@project) %>
<%= link_to new_project_experiment_url(@project),
remote: true,
type: "button",
id: 'new-experiment',
class: "btn btn-primary pull-right" do %>
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs-custom"><%=t 'experiments.new.create' %></span>
<% end %>
<% end %>
</div>
</div>
</div>
</div>
<div id="canvas-container" data-project-id="<%= @project.id %>">
<%= render partial: 'canvas/full_zoom', locals: { experiment: @experiment, my_modules: @active_modules } %>
<div id="canvas-container" data-project-id="<%= @project.id %>">
<%= render partial: 'canvas/full_zoom', locals: { experiment: @experiment, my_modules: @active_modules } %>
</div>
</div>
<!-- Manage tags modal -->

View file

@ -2,27 +2,29 @@
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<% if @experiment.archived_modules.count > 0 %>
<div class="row">
<% @experiment.archived_modules.each_with_index do |my_module, i| %>
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
<%= render partial: "experiments/module_archive/my_module.html.erb", locals: { my_module: my_module} %>
</div>
<% if (i+1) % 6 == 0 %>
<div class="clearfix visible-lg-block"></div>
<div class="content-pane">
<% if @experiment.archived_modules.count > 0 %>
<div class="row" style="margin-top: 10px;">
<% @experiment.archived_modules.each_with_index do |my_module, i| %>
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
<%= render partial: "experiments/module_archive/my_module.html.erb", locals: { my_module: my_module} %>
</div>
<% if (i+1) % 6 == 0 %>
<div class="clearfix visible-lg-block"></div>
<% end %>
<% if (i+1) % 4 == 0 %>
<div class="clearfix visible-md-block"></div>
<% end %>
<% if (i+1) % 3 == 0 %>
<div class="clearfix visible-sm-block"></div>
<% end %>
<% end %>
<% if (i+1) % 4 == 0 %>
<div class="clearfix visible-md-block"></div>
<% end %>
<% if (i+1) % 3 == 0 %>
<div class="clearfix visible-sm-block"></div>
<% end %>
<% end %>
</div>
<% else %>
<div class="row">
<div class="col-xs-12">
<em><%=t "experiments.module_archive.no_archived_modules" %></em>
</div>
</div>
<% end %>
<% else %>
<div class="row">
<div class="col-xs-12">
<em><%=t "experiments.module_archive.no_archived_modules" %></em>
</div>
</div>
<% end %>
</div>

View file

@ -1,6 +1,6 @@
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-4">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-calendar"></span>
</div>
<div class="well well-sm">
@ -10,7 +10,7 @@
</div>
<div class="col-xs-6 col-sm-6 col-md-4">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<% if can_manage_module?(@my_module) %>
<%= 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>
@ -38,7 +38,7 @@
</div>
<div class="col-xs-6 col-sm-6 col-md-4">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-ok"></span>
</div>
<div class="well well-sm">
@ -51,7 +51,7 @@
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12" id="module-tags" data-module-tags-url="<%= my_module_my_module_tags_url(@my_module, format: :json) %>">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<% if can_manage_module?(@my_module) %>
<a class="edit-tags-link" data-remote="true" href="<%= my_module_tags_edit_url(@my_module, format: :json) %>" style="color: inherit">
<span class="glyphicon glyphicon-tags"></span>
@ -74,7 +74,7 @@
</div>
<div>
<div class="badge-icon bg-primary">
<div class="badge-icon">
<% if can_manage_module?(@my_module) %>
<%= link_to description_my_module_path(@my_module, format: :json), remote: true, class: "description-link", style: "color: inherit" do %>
<span class="glyphicon glyphicon-info-sign"></span>

View file

@ -1,6 +1,6 @@
<div class="result">
<div class="badge-num">
<span class="badge bg-primary icon">
<span class="badge icon">
<% if result.is_text %>
<span class="glyphicon glyphicon-font"></span>
<% elsif result.is_table %>

View file

@ -2,24 +2,26 @@
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<div class="row">
<% if @activities.length == 0 %>
<div class="col-xs-12">
<em><%= t 'my_modules.activities.no_activities' %></em>
</div>
<% else %>
<div class="col-xs-12">
<%= render partial: "my_modules/activities/list_activities.html.erb" %>
<!-- Load more activities -->
<% if @overflown %>
<div class="col-sm-8 fluid-content text-center">
<a class="btn btn-default btn-more-activities" href="<%= @more_activities_url %>" data-remote="true">
<%= t('my_modules.activities.more_activities') %></a>
</div>
<% end %>
<div class="content-pane">
<div class="row">
<% if @activities.length == 0 %>
<div class="col-xs-12">
<em><%= t 'my_modules.activities.no_activities' %></em>
</div>
<% else %>
<div class="col-xs-12">
<%= render partial: "my_modules/activities/list_activities.html.erb" %>
<!-- Load more activities -->
<% if @overflown %>
<div class="col-sm-8 fluid-content text-center">
<a class="btn btn-default btn-more-activities" href="<%= @more_activities_url %>" data-remote="true">
<%= t('my_modules.activities.more_activities') %></a>
</div>
<% end %>
</div>
</div>
<% end %>
</div>
<% end %>
</div>
<%= javascript_include_tag("my_modules/activities") %>

View file

@ -2,17 +2,23 @@
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<div clas="row">
<div class="col-xs-3">
<% i = 0 %>
<% @archived_results.each do |result| %>
<%= render partial: "my_modules/archive/result.html.erb", locals: { result: result } %>
<% i = i + 1 %>
<% end %>
<% if i == 0 %>
<em><%=t "my_modules.module_archive.no_archived_results" %></em>
<% end %>
<div class="content-pane">
<div class="row" style="margin-top: 10px;">
<div class="col-xs-3">
<% i = 0 %>
<% @archived_results.each do |result| %>
<%= render partial: "my_modules/archive/result.html.erb", locals: { result: result } %>
<% i = i + 1 %>
<% end %>
</div>
</div>
<% if i == 0 %>
<div class="row" style="margin-bottom: 10px;">
<div class="col-xs-12">
<em><%=t "my_modules.module_archive.no_archived_results" %></em>
</div>
</div>
<% end %>
</div>
<script>window.initPreviewModal()</script>

View file

@ -4,18 +4,20 @@
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<%= render partial: "module_header" %>
<div class="content-pane">
<%= render partial: "module_header" %>
<div>
<div data-role="protocol-status-bar" style="display: inline;">
<%= render partial: "my_modules/protocols/protocol_status_bar.html.erb" %>
<div>
<div data-role="protocol-status-bar" style="display: inline;">
<%= render partial: "my_modules/protocols/protocol_status_bar.html.erb" %>
</div>
<%= render partial: "my_modules/protocols/protocol_buttons.html.erb" %>
<%= render partial: "my_modules/state_buttons.html.erb" %>
</div>
<%= render partial: "my_modules/protocols/protocol_buttons.html.erb" %>
<%= render partial: "my_modules/state_buttons.html.erb" %>
</div>
<div data-role="steps-container">
<%= render partial: "protocols/steps.html.erb" %>
<div data-role="steps-container">
<%= render partial: "protocols/steps.html.erb" %>
</div>
</div>
<!-- URL for status bar refreshing -->

View file

@ -5,43 +5,45 @@
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<h3><%= @repository.name %></h3>
<div class="content-pane">
<h3 style="margin-top: 5px;"><%= @repository.name %></h3>
<div id="show-assigned-buttons" class="btn-group repository-assign-group" data-toggle="buttons">
<button type="button" class="active btn btn-primary" id="assigned-repo-records"><%= t("repositories.view_assigned_records") %></button>
<button type="button" class="btn btn-default" id="all-repo-records"><%= t("repositories.view_all_records") %></button>
</div>
<div id="show-assigned-buttons" class="btn-group repository-assign-group" data-toggle="buttons">
<button type="button" class="active btn btn-primary" id="assigned-repo-records"><%= t("repositories.view_assigned_records") %></button>
<button type="button" class="btn btn-default" id="all-repo-records"><%= t("repositories.view_all_records") %></button>
</div>
<div id="datatables-buttons" class="pull-right" style="display: inline;">
<%= render partial: "repositories/columns_reorder_dropdown" %>
</div>
<div id="datatables-buttons" class="pull-right" style="display: inline;">
<%= render partial: "repositories/columns_reorder_dropdown" %>
</div>
<div class="toolbarButtons" style="display:none">
<% if module_page? && can_assign_repository_rows_to_module?(@my_module) %>
<button type="button" class="btn btn-default"
data-assign-url="<%= assign_repository_records_my_module_path(@my_module, @repository)%>"
id="assignRepositoryRecords" onclick="onClickAssignRecords()" disabled>
<span class="glyphicon glyphicon-ok-circle"></span>
<span class="hidden-xs-custom"><%= t'repositories.assign_records_to_module' %></span>
</button>
<button type="button" class="btn btn-default"
data-unassign-url="<%= unassign_repository_records_my_module_path(@my_module, @repository)%>"
id="unassignRepositoryRecords" onclick="onClickUnassignRecords()" disabled>
<span class="glyphicon glyphicon-ban-circle"></span>
<span class="hidden-xs-custom"><%= t'repositories.unassign_records_from_module' %></span>
</button>
<% end %>
</div>
<div class="toolbarButtons" style="display:none">
<% if module_page? && can_assign_repository_rows_to_module?(@my_module) %>
<button type="button" class="btn btn-default"
data-assign-url="<%= assign_repository_records_my_module_path(@my_module, @repository)%>"
id="assignRepositoryRecords" onclick="onClickAssignRecords()" disabled>
<span class="glyphicon glyphicon-ok-circle"></span>
<span class="hidden-xs-custom"><%= t'repositories.assign_records_to_module' %></span>
</button>
<button type="button" class="btn btn-default"
data-unassign-url="<%= unassign_repository_records_my_module_path(@my_module, @repository)%>"
id="unassignRepositoryRecords" onclick="onClickUnassignRecords()" disabled>
<span class="glyphicon glyphicon-ban-circle"></span>
<span class="hidden-xs-custom"><%= t'repositories.unassign_records_from_module' %></span>
</button>
<% end %>
</div>
<div id="content"
data-repo-id="#repository-table-<%= @repository.id %>">
<%= render partial: "repositories/repository_table",
locals: {
repository: @repository,
my_module: @my_module,
repository_index_link: repository_index_my_module_path(@my_module, @repository, format: :json)
}
%>
<div id="content"
data-repo-id="#repository-table-<%= @repository.id %>">
<%= render partial: "repositories/repository_table",
locals: {
repository: @repository,
my_module: @my_module,
repository_index_link: repository_index_my_module_path(@my_module, @repository, format: :json)
}
%>
</div>
</div>
<%= stylesheet_link_tag 'datatables' %>

View file

@ -3,48 +3,50 @@
<%= render partial: "shared/secondary_navigation" %>
<%= render partial: 'shared/drag_n_drop_overlay' %>
<div id="results-toolbar">
<div class="pull-right">
<button class="btn btn-default" id="results-collapse-btn">
<span class="glyphicon glyphicon-collapse-up"></span>
<span class="hidden-xs-custom"><%= t'my_modules.results.collapse_label' %></button></span>
<button class="btn btn-default" id="results-expand-btn">
<span class="glyphicon glyphicon-collapse-down"></span>
<span class="hidden-xs-custom"><%= t'my_modules.results.expand_label' %></button></span>
<div class="content-pane">
<div id="results-toolbar">
<div class="pull-right">
<button class="btn btn-default" id="results-collapse-btn">
<span class="glyphicon glyphicon-collapse-up"></span>
<span class="hidden-xs-custom"><%= t'my_modules.results.collapse_label' %></button></span>
<button class="btn btn-default" id="results-expand-btn">
<span class="glyphicon glyphicon-collapse-down"></span>
<span class="hidden-xs-custom"><%= t'my_modules.results.expand_label' %></button></span>
</div>
<% if can_manage_module?(@my_module) %>
<span class="hidden-xs"><%= t'my_modules.results.add_label' %></span>
<a class="btn btn-primary"
id="new-result-text"
data-href="<%= new_my_module_result_text_path(my_module_id: @my_module.id) %>"
href="#">
<span class="glyphicon glyphicon-font"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_text_result") %></span>
</a>
<a class="btn btn-primary"
id="new-result-table"
data-href="<%= new_my_module_result_table_path(my_module_id: @my_module.id) %>"
href="#">
<span class="glyphicon glyphicon-list-alt"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_table_result") %></span>
</a>
<a class="btn btn-primary"
id="new-result-asset"
data-href="<%= new_my_module_result_asset_path(my_module_id: @my_module.id) %>"
href="#">
<span class="glyphicon glyphicon-picture"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_asset_result") %></span>
</a>
<% end %>
</div>
<% if can_manage_module?(@my_module) %>
<span class="hidden-xs"><%= t'my_modules.results.add_label' %></span>
<a class="btn btn-primary"
id="new-result-text"
data-href="<%= new_my_module_result_text_path(my_module_id: @my_module.id) %>"
href="#">
<span class="glyphicon glyphicon-font"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_text_result") %></span>
</a>
<a class="btn btn-primary"
id="new-result-table"
data-href="<%= new_my_module_result_table_path(my_module_id: @my_module.id) %>"
href="#">
<span class="glyphicon glyphicon-list-alt"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_table_result") %></span>
</a>
<a class="btn btn-primary"
id="new-result-asset"
data-href="<%= new_my_module_result_asset_path(my_module_id: @my_module.id) %>"
href="#">
<span class="glyphicon glyphicon-picture"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_asset_result") %></span>
</a>
<div style="height: 15px;"></div>
<div id="results" data-module-id="<%= @my_module.id %>">
<% ordered_result_of(@my_module).each do |result| %>
<%= render partial: "result", locals: { result: result } %>
<% end %>
</div>
<div style="height: 15px;"></div>
<div id="results" data-module-id="<%= @my_module.id %>">
<% ordered_result_of(@my_module).each do |result| %>
<%= render partial: "result", locals: { result: result } %>
<% end %>
</div>
</div>
<%= javascript_include_tag "handsontable.full.min" %>

View file

@ -1,52 +1,54 @@
<% provide(:head_title, t("projects.archive.head_title")) %>
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<% if @archived_projects_by_teams.length > 0 %>
<div id="projects-toolbar">
<div class="content-pane">
<% if @archived_projects_by_teams.length > 0 %>
<div id="projects-toolbar">
<form class="form-inline" action="<%= projects_archive_path %>">
<form class="form-inline" action="<%= projects_archive_path %>">
<div class="form-group">
<!-- project sort -->
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="sortMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="hidden-xs"><%= t'projects.index.sort' %></span>
<span class="visible-xs-inline"><i class="glyphicon glyphicon-sort"></i></span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="sortMenu">
<% ["new", "old", "atoz", "ztoa"].each do |sort| %>
<% if @current_sort != sort %>
<li><a href="?<%= {team: @current_team_id, sort: sort}.reject{|k,v| v.to_s == "0"}.to_query %>"><%= t('projects.index.sort_' + sort) %></a></li>
<% else %>
<li class="disabled"><a href="#"><%= t('projects.index.sort_' + sort) %></a></li>
<div class="form-group">
<!-- project sort -->
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="sortMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="hidden-xs"><%= t'projects.index.sort' %></span>
<span class="visible-xs-inline"><i class="glyphicon glyphicon-sort"></i></span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="sortMenu">
<% ["new", "old", "atoz", "ztoa"].each do |sort| %>
<% if @current_sort != sort %>
<li><a href="?<%= {team: @current_team_id, sort: sort}.reject{|k,v| v.to_s == "0"}.to_query %>"><%= t('projects.index.sort_' + sort) %></a></li>
<% else %>
<li class="disabled"><a href="#"><%= t('projects.index.sort_' + sort) %></a></li>
<% end %>
<% end %>
<% end %>
</ul>
</ul>
</div>
</div>
</form>
</div>
<% @archived_projects_by_teams.each do |team, projects| %>
<%= render partial: 'projects/archive/team_projects',
locals: {team: team, projects: projects} %>
<% end %>
<% else %>
<div class="row">
<div class="col-xs-12">
<h4><%=t "projects.index.no_archived_projects" %></h4>
</div>
</div>
<div>
<div class="col-xs-12">
<%= link_to t("projects.index.back_to_projects_index"), projects_path, data: { turbolinks: 'false' } %>
</div>
</div>
<!-- Some spacing... -->
<div class="row">
<div class="col-xs-12" style="height: 30px;"></div>
</div>
</form>
</div>
<% @archived_projects_by_teams.each do |team, projects| %>
<%= render partial: 'projects/archive/team_projects',
locals: {team: team, projects: projects} %>
<% end %>
<% else %>
<!-- Some spacing... -->
<div class="row">
<div class="col-xs-12" style="height: 30px;"></div>
</div>
<div class="row">
<div class="col-xs-12">
<h4><%=t "projects.index.no_archived_projects" %></h4>
</div>
</div>
<div>
<div class="col-xs-12">
<%= link_to t("projects.index.back_to_projects_index"), projects_path, data: { turbolinks: 'false' } %>
</div>
</div>
<% end %>
</div>

View file

@ -1,5 +1,3 @@
<h2 class="page-header"><%= team.name %></h2>
<div class="row">
<% projects.each_index do |i| project = projects[i] %>
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">

View file

@ -2,27 +2,29 @@
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<% if @project.archived_experiments.count > 0 %>
<div class="row">
<% @project.archived_experiments.each_with_index do |experiment, i| %>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<%= render partial: "projects/experiment_archive/experiment.html.erb", locals: { experiment: experiment} %>
</div>
<% if (i+1) % 6 == 0 %>
<div class="clearfix visible-lg-block"></div>
<div class="content-pane">
<% if @project.archived_experiments.count > 0 %>
<div class="row" style="margin-top: 10px;">
<% @project.archived_experiments.each_with_index do |experiment, i| %>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<%= render partial: "projects/experiment_archive/experiment.html.erb", locals: { experiment: experiment} %>
</div>
<% if (i+1) % 6 == 0 %>
<div class="clearfix visible-lg-block"></div>
<% end %>
<% if (i+1) % 4 == 0 %>
<div class="clearfix visible-md-block"></div>
<% end %>
<% if (i+1) % 3 == 0 %>
<div class="clearfix visible-sm-block"></div>
<% end %>
<% end %>
<% if (i+1) % 4 == 0 %>
<div class="clearfix visible-md-block"></div>
<% end %>
<% if (i+1) % 3 == 0 %>
<div class="clearfix visible-sm-block"></div>
<% end %>
<% end %>
</div>
<% else %>
<div class="row">
<div class="col-xs-12">
<em><%=t "projects.experiment_archive.no_archived_experiments" %></em>
</div>
</div>
<% end %>
<% else %>
<div class="row">
<div class="col-xs-12">
<em><%=t "projects.experiment_archive.no_archived_experiments" %></em>
</div>
</div>
<% end %>
</div>

View file

@ -1,6 +1,8 @@
<% provide(:head_title, t("projects.index.head_title")) %>
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<div class="content-pane">
<% if can_create_projects?(current_team) %>
<!-- New project modal -->
<div class="modal" id="new-project-modal" tabindex="-1" role="dialog" aria-labelledby="new-project-modal-label">
@ -61,11 +63,6 @@
<form class="form-inline" action="<%= projects_path %>">
<div class="form-group">
<!-- project archive button -->
<a class="btn btn-default pull-right" href="<%= url_for projects_archive_path %>" id="project-archive-btn" data-turbolinks="false" title="<%= t'projects.index.archive' %>">
<span class="glyphicon glyphicon-briefcase" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "projects.index.archive" %></span>
</a>
<% if @teams.length > 0 && can_create_projects?(current_team) %>
<!-- new project button -->
@ -108,11 +105,12 @@
</p>
</div>
<% else %>
<h2 class="page-header"><%= current_team.name %></h2>
<% @projects_by_teams.each do |team, projects| %>
<%= render partial: "projects/index/team_projects",
locals: {team: team, projects: projects} %>
<% end %>
<% end %>
</div>
<%= javascript_include_tag "projects/index", "data-turbolinks-track" => true %>

View file

@ -2,58 +2,56 @@
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<div class="row">
<div class="col-sm-12"
id="data-holder"
data-project-id="<%= @project.id %>">
<div class="row">
<div class="col-sm-12">
<!-- experiment sort -->
<div class="dropdown pull-left">
<button class="btn btn-default dropdown-toggle" type="button" id="sortMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="hidden-xs"><%= t'projects.index.sort' %></span>
<span class="visible-xs-inline"><i class="glyphicon glyphicon-sort"></i></span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="sortMenu">
<% ["new", "old", "atoz", "ztoa"].each do |sort| %>
<% if @current_sort != sort %>
<li><a href="?<%= {sort: sort}.reject{|v| v.to_s == "0"}.to_query %>"><%= t('projects.index.sort_' + sort) %></a></li>
<% else %>
<li class="disabled"><a href="#"><%= t('projects.index.sort_' + sort) %></a></li>
<div class="content-pane">
<div class="row">
<div class="col-sm-12"
id="data-holder"
data-project-id="<%= @project.id %>">
<div class="row">
<div class="col-sm-12">
<!-- experiment sort -->
<div class="dropdown pull-left">
<button class="btn btn-default dropdown-toggle" type="button" id="sortMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="hidden-xs"><%= t'projects.index.sort' %></span>
<span class="visible-xs-inline"><i class="glyphicon glyphicon-sort"></i></span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="sortMenu">
<% ["new", "old", "atoz", "ztoa"].each do |sort| %>
<% if @current_sort != sort %>
<li><a href="?<%= {sort: sort}.reject{|v| v.to_s == "0"}.to_query %>"><%= t('projects.index.sort_' + sort) %></a></li>
<% else %>
<li class="disabled"><a href="#"><%= t('projects.index.sort_' + sort) %></a></li>
<% end %>
<% end %>
</ul>
</div>
<% if can_create_experiments?(@project) %>
<%= link_to new_project_experiment_url(@project),
remote: true,
type: "button",
id: 'new-experiment',
class: 'btn btn-primary pull-right' do %>
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs"><%=t 'experiments.new.create' %></span>
<% end %>
</ul>
</div>
<% if can_create_experiments?(@project) %>
<%= link_to new_project_experiment_url(@project),
remote: true,
type: "button",
id: 'new-experiment',
class: 'btn btn-primary pull-right' do %>
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs"><%=t 'experiments.new.create' %></span>
<% end %>
<% end %>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<h2><%= t'projects.show.page_title' %></h2>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<% @project.active_experiments(@current_sort).each_with_index do |experiment, index| %>
<%= render partial: 'projects/show/experiment',
locals: { experiment: experiment } %>
<div class="row">
<% @project.active_experiments(@current_sort).each_with_index do |experiment, index| %>
<%= render partial: 'projects/show/experiment',
locals: { experiment: experiment } %>
<%= content_tag(:div, '', class: 'clearfix visible-lg-block') if (index + 1) % 2 == 0 %>
<% end %>
<% if can_create_experiments?(@project) %>
<%= render 'projects/show/new_experiment' %>
<% end %>
<%= content_tag(:div, '', class: 'clearfix visible-lg-block') if (index + 1) % 2 == 0 %>
<% end %>
<% if can_create_experiments?(@project) %>
<%= render 'projects/show/new_experiment' %>
<% end %>
</div>
</div>
<%= javascript_include_tag("experiments/dropdown_actions") %>
<%= javascript_include_tag("projects/show") %>

View file

@ -10,7 +10,7 @@
<div class="row">
<div class="col-xs-6 col-sm-4 col-md-4">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-calendar"></span>
</div>
<div class="well well-sm">
@ -20,7 +20,7 @@
</div>
<div class="col-xs-6 col-sm-4 col-md-4">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-calendar"></span>
</div>
<div class="well well-sm">
@ -30,7 +30,7 @@
</div>
<div class="col-xs-12 col-sm-4 col-md-4">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-user"></span>
</div>
<div class="well well-sm">
@ -40,7 +40,7 @@
</div>
<div class="col-xs-12 col-sm-6 col-md-6">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<% if can_manage_protocol_in_repository?(@protocol) %>
<a data-action="edit-keywords" data-remote="true" href="<%= edit_keywords_modal_protocol_path(@protocol, format: :json) %>" style="color: inherit;">
<span class="glyphicon glyphicon-text-color"></span>
@ -62,7 +62,7 @@
</div>
<div class="col-xs-12 col-sm-6 col-md-6">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<% if can_manage_protocol_in_repository?(@protocol) %>
<a data-action="edit-authors" data-remote="true" href="<%= edit_authors_modal_protocol_path(@protocol, format: :json) %>" style="color: inherit;">
<span class="glyphicon glyphicon-education"></span>
@ -84,7 +84,7 @@
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<% if can_manage_protocol_in_repository?(@protocol) %>
<a data-action="edit-description" data-remote="true" href="<%= edit_description_modal_protocol_path(@protocol, format: :json) %>" style="color: inherit;">
<span class="glyphicon glyphicon-info-sign"></span>

View file

@ -2,7 +2,7 @@
<hr>
<td>
<div class="badge-num">
<span class="badge-preview bg-primary size-digit-1">
<span class="badge-preview size-digit-1">
<b data-val="position"><%= 1 %></b>
</span>
&nbsp; &nbsp;

View file

@ -8,7 +8,7 @@
<hr>
<td>
<div class="badge-num">
<span class="badge-preview bg-primary size-digit-1">
<span class="badge-preview size-digit-1">
<b data-val="position"><%= (counter) %></b>
</span>
&nbsp; &nbsp;

View file

@ -1,7 +1,7 @@
<div data-template="step" style="display: none;">
<hr>
<div class="badge-num">
<span class="badge-preview bg-primary size-digit-1">
<span class="badge-preview size-digit-1">
<b data-val="position"></b>
</span>
&nbsp;

View file

@ -1,143 +1,147 @@
<% provide(:head_title, t("protocols.index.head_title")) %>
<% if current_team %>
<ul class="nav nav-tabs nav-settings">
<li role="presentation" class="<%= "active" if @type == :public %>">
<%= link_to t("protocols.index.navigation.public"), protocols_path(team: @current_team, type: :public) %>
</li>
<li role="presentation" class="<%= "active" if @type == :private %>">
<%= link_to t("protocols.index.navigation.private"), protocols_path(team: @current_team, type: :private) %>
</li>
<li role="presentation" class="<%= "active" if @type == :archive %>">
<%= link_to protocols_path(team: @current_team, type: :archive) do %>
<span class="glyphicon glyphicon-briefcase" title="<%= t'protocols.index.navigation.archive' %>"></span>
<% end %>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane tab-pane-settings tab-pane-protocols active" role="tabpanel">
<!-- Buttons container -->
<% if @type.in? [:public, :private] %>
<div class="protocols-description">
<%= t(@type == :public ? "protocols.index.public_description" : "protocols.index.private_description") %>
</div>
<div class="btn-group" role="group">
<a class="btn btn-primary" <%= can_create_protocols_in_repository?(@current_team) ? "data-action=create-new" : "disabled=disabled" %> data-url="<%= create_new_modal_protocols_path(team: @current_team, type: @type) %>">
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.create_new") %></span>
</a>
<a class="btn btn-default" data-action="edit">
<span class="glyphicon glyphicon-pencil"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.edit") %></span>
</a>
<a class="btn btn-default" data-action="clone">
<span class="glyphicon glyphicon-duplicate"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.clone_btn") %></span>
</a>
<% if @type == :public %>
<a class="btn btn-default" data-action="make-private" data-url="<%= make_private_protocols_path %>">
<span class="glyphicon glyphicon-eye-close"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.make_private") %></span>
<div class="content-pane">
<% if current_team %>
<ul class="nav nav-tabs nav-settings">
<li role="presentation" class="<%= "active" if @type == :public %>">
<%= link_to t("protocols.index.navigation.public"), protocols_path(team: @current_team, type: :public) %>
</li>
<li role="presentation" class="<%= "active" if @type == :private %>">
<%= link_to t("protocols.index.navigation.private"), protocols_path(team: @current_team, type: :private) %>
</li>
<li role="presentation" class="<%= "active" if @type == :archive %>">
<%= link_to protocols_path(team: @current_team, type: :archive) do %>
<span class="glyphicon glyphicon-briefcase" title="<%= t'protocols.index.navigation.archive' %>"></span>
<span class="hidden-xs"><%= t("protocols.index.navigation.archive") %></span>
<% end %>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane tab-pane-settings tab-pane-protocols active" role="tabpanel">
<!-- Buttons container -->
<% if @type.in? [:public, :private] %>
<div class="protocols-description">
<%= t(@type == :public ? "protocols.index.public_description" : "protocols.index.private_description") %>
</div>
<div class="btn-group" role="group">
<a class="btn btn-primary" <%= can_create_protocols_in_repository?(@current_team) ? "data-action=create-new" : "disabled=disabled" %> data-url="<%= create_new_modal_protocols_path(team: @current_team, type: @type) %>">
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.create_new") %></span>
</a>
<% elsif @type == :private %>
<a class="btn btn-default" data-action="publish" data-url="<%= publish_protocols_path %>">
<span class="glyphicon glyphicon-open"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.publish") %></span>
<a class="btn btn-default" data-action="edit">
<span class="glyphicon glyphicon-pencil"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.edit") %></span>
</a>
<% end %>
</div>
<div id="import-export-protocols" class="btn-group" role="group">
<a class="btn btn-default btn-open-file"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
href="#"
<%= 'disabled' unless can_create_protocols_in_repository?(@current_team) %>>
<span class="glyphicon glyphicon-import"></span><span class="hidden-xs">&nbsp;<%= t("protocols.index.import") %></span></a>
<% if can_create_protocols_in_repository?(@current_team) %>
<ul class="dropdown-menu">
<li>
<a class="btn-link-alt btn-default-link btn-open-file" <%= can_create_protocols_in_repository?(@current_team) ? 'data-action="import"' : 'disabled="disabled"' %>>
<span class="glyphicon glyphicon-file"></span>
<span class="hidden-xs"><%= t("protocols.index.import_alt") %></span>
<input type="file" value="" accept=".eln" data-role="import-file-input"
data-team-id="<%= @current_team.id %>"
data-type="<%= @type %>" data-import-url="<%= import_protocols_path %>"
<%= 'disabled="disabled"' unless can_create_protocols_in_repository?(@current_team) %>>
</a>
</li>
<li>
<%= link_to "#modal-import-json-protocol", "data-toggle" => "modal" do %>
<span class="glyphicon glyphicon-file"></span>
<span class="hidden-xs"><%= t("protocols.index.import_json") %></span>
<% end %>
</li>
</ul>
<% end %>
<a class="btn btn-default" data-action="export" data-export-url="<%= export_protocols_path() %>">
<span class="glyphicon glyphicon-export"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.export") %></span>
</a>
</div>
<div class="btn-group" role="group">
<a class="btn btn-default" data-action="archive" data-url="<%= archive_protocols_path %>">
<span class="glyphicon glyphicon-briefcase"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.archive_action") %></span>
</a>
</div>
<% else %>
<div class="protocols-description">
<%= t("protocols.index.archive.description") %>
</div>
<div class="btn-group" role="group">
<a class="btn btn-default" data-action="restore" data-url="<%= restore_protocols_path %>">
<span class="glyphicon glyphicon-refresh"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.restore") %></span>
</a>
</div>
<% end %>
<div id="protocols-datatable-spinner">
<div class="protocols-datatable">
<table id="protocols-table" class="table" data-team-id="<%= @current_team.id %>" data-type="<%= @type %>" data-source="<%= datatable_protocols_path(team: @current_team, type: @type) %>">
<thead>
<tr>
<th id="select-all"><input name="select_all" value="1" type="checkbox"></th>
<th id="protocol-name"><%= t("protocols.index.thead_name") %></th>
<th id="protocol-keywords"><%= t("protocols.index.thead_keywords") %></th>
<th id="protocol-nr-of-linked-children"><%= t("protocols.index.thead_nr_of_linked_children") %></th>
<% if @type == :public %>
<th id="protocol-published-by"><%= t("protocols.index.thead_published_by") %></th>
<th id="protocol-published-on"><%= t("protocols.index.thead_published_on") %></th>
<% elsif @type == :private %>
<th id="protocol-added-by"><%= t("protocols.index.thead_added_by") %></th>
<th id="protocol-created-at"><%= t("protocols.index.thead_created_at") %></th>
<% else %>
<th id="protocol-archived-by"><%= t("protocols.index.thead_archived_by") %></th>
<th id="protocol-archived-on"><%= t("protocols.index.thead_archived_on") %></th>
<a class="btn btn-default" data-action="clone">
<span class="glyphicon glyphicon-duplicate"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.clone_btn") %></span>
</a>
<% if @type == :public %>
<a class="btn btn-default" data-action="make-private" data-url="<%= make_private_protocols_path %>">
<span class="glyphicon glyphicon-eye-close"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.make_private") %></span>
</a>
<% elsif @type == :private %>
<a class="btn btn-default" data-action="publish" data-url="<%= publish_protocols_path %>">
<span class="glyphicon glyphicon-open"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.publish") %></span>
</a>
<% end %>
</div>
<div id="import-export-protocols" class="btn-group" role="group">
<a class="btn btn-default btn-open-file"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
href="#"
<%= 'disabled' unless can_create_protocols_in_repository?(@current_team) %>>
<span class="glyphicon glyphicon-import"></span><span class="hidden-xs">&nbsp;<%= t("protocols.index.import") %></span></a>
<% if can_create_protocols_in_repository?(@current_team) %>
<ul class="dropdown-menu">
<li>
<a class="btn-link-alt btn-default-link btn-open-file" <%= can_create_protocols_in_repository?(@current_team) ? 'data-action="import"' : 'disabled="disabled"' %>>
<span class="glyphicon glyphicon-file"></span>
<span class="hidden-xs"><%= t("protocols.index.import_alt") %></span>
<input type="file" value="" accept=".eln" data-role="import-file-input"
data-team-id="<%= @current_team.id %>"
data-type="<%= @type %>" data-import-url="<%= import_protocols_path %>"
<%= 'disabled="disabled"' unless can_create_protocols_in_repository?(@current_team) %>>
</a>
</li>
<li>
<%= link_to "#modal-import-json-protocol", "data-toggle" => "modal" do %>
<span class="glyphicon glyphicon-file"></span>
<span class="hidden-xs"><%= t("protocols.index.import_json") %></span>
<% end %>
<th id="protocol-updated-at"><%= t("protocols.index.thead_updated_at") %></th>
</tr>
</thead>
<tbody></tbody>
</table>
</li>
</ul>
<% end %>
<a class="btn btn-default" data-action="export" data-export-url="<%= export_protocols_path() %>">
<span class="glyphicon glyphicon-export"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.export") %></span>
</a>
</div>
<div class="btn-group" role="group">
<a class="btn btn-default" data-action="archive" data-url="<%= archive_protocols_path %>">
<span class="glyphicon glyphicon-briefcase"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.archive_action") %></span>
</a>
</div>
<% else %>
<div class="protocols-description">
<%= t("protocols.index.archive.description") %>
</div>
<div class="btn-group" role="group">
<a class="btn btn-default" data-action="restore" data-url="<%= restore_protocols_path %>">
<span class="glyphicon glyphicon-refresh"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.restore") %></span>
</a>
</div>
<% end %>
<div id="protocols-datatable-spinner">
<div class="protocols-datatable">
<table id="protocols-table" class="table" data-team-id="<%= @current_team.id %>" data-type="<%= @type %>" data-source="<%= datatable_protocols_path(team: @current_team, type: @type) %>">
<thead>
<tr>
<th id="select-all"><input name="select_all" value="1" type="checkbox"></th>
<th id="protocol-name"><%= t("protocols.index.thead_name") %></th>
<th id="protocol-keywords"><%= t("protocols.index.thead_keywords") %></th>
<th id="protocol-nr-of-linked-children"><%= t("protocols.index.thead_nr_of_linked_children") %></th>
<% if @type == :public %>
<th id="protocol-published-by"><%= t("protocols.index.thead_published_by") %></th>
<th id="protocol-published-on"><%= t("protocols.index.thead_published_on") %></th>
<% elsif @type == :private %>
<th id="protocol-added-by"><%= t("protocols.index.thead_added_by") %></th>
<th id="protocol-created-at"><%= t("protocols.index.thead_created_at") %></th>
<% else %>
<th id="protocol-archived-by"><%= t("protocols.index.thead_archived_by") %></th>
<th id="protocol-archived-on"><%= t("protocols.index.thead_archived_on") %></th>
<% end %>
<th id="protocol-updated-at"><%= t("protocols.index.thead_updated_at") %></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<% else %>
<!-- Show link to team management if member of
no teams -->
<div class="jumbotron">
<h2><%=t 'protocols.index.no_teams.title' %></h2>
<p><%=t 'protocols.index.no_teams.text' %></p>
<p data-hook="protocols-manage-teams-button">
<%= link_to t('protocols.index.no_teams.btn'), teams_path, class: 'btn btn-primary' %>
</p>
</div>
<% end %>
<% else %>
<!-- Show link to team management if member of
no teams -->
<div class="jumbotron">
<h2><%=t 'protocols.index.no_teams.title' %></h2>
<p><%=t 'protocols.index.no_teams.text' %></p>
<p data-hook="protocols-manage-teams-button">
<%= link_to t('protocols.index.no_teams.btn'), teams_path, class: 'btn btn-primary' %>
</p>
</div>
<% end %>
</div>
<div id="protocolsio-preview-modal-target"></div>
<%= render partial: "protocols/import_export/import_json_protocol_modal.html.erb" %>

View file

@ -1,6 +1,6 @@
<div class="row">
<div class="col-xs-6 col-sm-4 col-md-4">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-calendar"></span>
</div>
<div class="well well-sm">
@ -10,7 +10,7 @@
</div>
<div class="col-xs-6 col-sm-4 col-md-4">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-calendar"></span>
</div>
<div class="well well-sm">
@ -20,7 +20,7 @@
</div>
<div class="col-xs-12 col-sm-4 col-md-4">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-user"></span>
</div>
<div class="well well-sm">
@ -30,7 +30,7 @@
</div>
<div class="col-xs-12 col-sm-6 col-md-6">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-text-color"></span>
</div>
<div class="well well-sm">
@ -40,7 +40,7 @@
</div>
<div class="col-xs-12 col-sm-6 col-md-6">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-education"></span>
</div>
<div class="well well-sm">
@ -50,7 +50,7 @@
</div>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-info-sign"></span>
</div>
<div class="well well-sm">
@ -70,7 +70,7 @@
<% protocol.steps.order(:position).each do |step| %>
<div class ="step <%= step.completed? ? "completed" : "not-completed" %>">
<div class="badge-num">
<span class="badge bg-primary size-digit-<%= (step.position + 1).to_s.length %>"><%= step.position + 1 %></span>
<span class="badge size-digit-<%= (step.position + 1).to_s.length %>"><%= step.position + 1 %></span>
</div>
<div class="panel panel-default">
<div class="panel-heading">

View file

@ -1,45 +1,47 @@
<% provide(:head_title, t('projects.reports.index.head_title').html_safe) %>
<%= stylesheet_link_tag 'datatables' %>
<div id="content-reports-index">
<div class="row">
<div class="col-md-12">
<% if can_manage_reports?(current_team) %>
<%= link_to '#', class: 'btn btn-primary', id: 'new-report-btn', 'data-no-turbolink' => true do %>
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "projects.reports.index.new" %></span>
<div class="content-pane">
<div id="content-reports-index">
<div class="row">
<div class="col-md-12">
<% if can_manage_reports?(current_team) %>
<%= link_to '#', class: 'btn btn-primary', id: 'new-report-btn', 'data-no-turbolink' => true do %>
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "projects.reports.index.new" %></span>
<% end %>
<%= link_to "", remote: true, class: "btn btn-default", id: "edit-report-btn" do %>
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "projects.reports.index.edit" %></span>
<% end %>
<%= link_to "", remote: true, class: "btn btn-default", id: "delete-reports-btn" do %>
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "projects.reports.index.delete" %></span>
<% end %>
<% end %>
<%= link_to "", remote: true, class: "btn btn-default", id: "edit-report-btn" do %>
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "projects.reports.index.edit" %></span>
<% end %>
<%= link_to "", remote: true, class: "btn btn-default", id: "delete-reports-btn" do %>
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "projects.reports.index.delete" %></span>
<% end %>
<% end %>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md-12">
<div class="reports-datatable">
<table id="reports-table"
class="table"
data-source="<%= reports_datatable_path(format: :json) %>">
<thead>
<tr>
<th id="select-all"><input name="select_all" type="checkbox"></th>
<th id="project-name"><%=t 'projects.reports.index.thead_project_name' %></th>
<th id="report-name"><%=t 'projects.reports.index.thead_name' %></th>
<th id="report-created-by"><%=t 'projects.reports.index.thead_created_by' %></th>
<th id="report-last-modified-by"><%=t 'projects.reports.index.thead_last_modified_by' %></th>
<th id="report-created-at"><%=t 'projects.reports.index.thead_created_at' %></th>
<th id="report-updated-at"><%=t 'projects.reports.index.thead_updated_at' %></th>
</tr>
</thead>
<tbody></tbody>
</table>
<br />
<div class="row">
<div class="col-md-12">
<div class="reports-datatable">
<table id="reports-table"
class="table"
data-source="<%= reports_datatable_path(format: :json) %>">
<thead>
<tr>
<th id="select-all"><input name="select_all" type="checkbox"></th>
<th id="project-name"><%=t 'projects.reports.index.thead_project_name' %></th>
<th id="report-name"><%=t 'projects.reports.index.thead_name' %></th>
<th id="report-created-by"><%=t 'projects.reports.index.thead_created_by' %></th>
<th id="report-last-modified-by"><%=t 'projects.reports.index.thead_last_modified_by' %></th>
<th id="report-created-at"><%=t 'projects.reports.index.thead_created_at' %></th>
<th id="report-updated-at"><%=t 'projects.reports.index.thead_updated_at' %></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>

View file

@ -1,4 +1,5 @@
<% provide(:head_title, t("libraries.index.head_title")) %>
<% provide(:container_class, "no-second-nav-container") %>
<% if current_team %>
<%= render partial: "sidebar", locals: { repositories: @repositories } %>
@ -6,21 +7,23 @@
# show only if no repositories present. If the team will have them we will
# handle this in left side navigation bar
%>
<div class="jumbotron text-center" style="margin-top:18%">
<strong><%=t 'libraries.index.no_libraries.text' %></strong>
<% if can_create_repositories?(current_team) %>
<h2><strong><%=t 'libraries.index.no_libraries.title' %><strong></h2>
<br />
<a class="btn btn-primary btn-lg"
id="create-new-repository"
data-remote="true"
href="<%= create_modal_team_repositories_path(current_team) %>">
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs"><%= t('libraries.index.no_libraries.create_new_button') %></span>
</a>
<% else %>
<h2><strong><%=t 'libraries.index.no_libraries.no_permission_title' %><strong></h2>
<% end %>
<div class="content-pane">
<div class="jumbotron text-center" style="margin-top:12%">
<strong><%=t 'libraries.index.no_libraries.text' %></strong>
<% if can_create_repositories?(current_team) %>
<h2><strong><%=t 'libraries.index.no_libraries.title' %><strong></h2>
<br />
<a class="btn btn-primary btn-lg"
id="create-new-repository"
data-remote="true"
href="<%= create_modal_team_repositories_path(current_team) %>">
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs"><%= t('libraries.index.no_libraries.create_new_button') %></span>
</a>
<% else %>
<h2><strong><%=t 'libraries.index.no_libraries.no_permission_title' %><strong></h2>
<% end %>
</div>
</div>
<% else %>
<!-- If member of no teams -->

View file

@ -1,141 +1,145 @@
<% provide(:head_title, t("libraries.show.head_title", library: @repository.name)) %>
<%= stylesheet_link_tag 'datatables' %>
<% provide(:container_class, "no-second-nav-container") %>
<%= render partial: "sidebar", locals: { repositories: @repositories } %>
<div id="alert-container"></div>
<div id="repository-toolbar">
<div class="content-pane">
<div id="repository-toolbar">
<% if can_create_repository_rows?(@repository.team) %>
<button type="button" class="btn btn-primary editAdd" id="addRepositoryRecord" onclick="onClickAddRecord()">
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs"><%= t("repositories.add_new_record") %></span>
</button>
<% end %>
<% if can_create_repository_rows?(@repository.team) %>
<button type="button" class="btn btn-primary editAdd" id="addRepositoryRecord" onclick="onClickAddRecord()">
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs"><%= t("repositories.add_new_record") %></span>
</button>
<% end %>
<div class="repository-cog">
<div class="dropdown">
<div class="btn btn-default"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="true"
<%= "disabled" unless can_perform_repository_actions(@repository) %>>
<span class="glyphicon glyphicon-cog"></span>
<span class="hidden-xs"><%= t('repositories.index.advanced') %></span>
<span class="caret"></span>
<div class="repository-cog">
<div class="dropdown">
<div class="btn btn-default"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="true"
<%= "disabled" unless can_perform_repository_actions(@repository) %>>
<span class="glyphicon glyphicon-cog"></span>
<span class="hidden-xs"><%= t('repositories.index.advanced') %></span>
<span class="caret"></span>
</div>
<% if can_perform_repository_actions(@repository) %>
<ul class="dropdown-menu pull-right">
<li class="dropdown-header">
<%= t("repositories.index.options_dropdown.header") %>
</li>
<% if can_manage_repository?(@repository) %>
<li>
<%= link_to t('repositories.index.options_dropdown.rename'),
team_repository_rename_modal_path(current_team, repository_id: @repository),
class: "rename-repo-option",
remote: true %>
</li>
<% end %>
<% if can_create_repository_columns?(@repository.team) %>
<li>
<%= link_to t('repositories.index.options_dropdown.manage_columns'),
repository_repository_columns_path(@repository) %>
</li>
<% end %>
<% if can_create_repositories?(@repository.team) %>
<li>
<%= link_to t('repositories.index.options_dropdown.copy'),
team_repository_copy_modal_path(current_team, repository_id: @repository),
class: "copy-repo-option",
remote: true %>
</li>
<% end %>
<% if can_create_repository_rows?(@repository.team) %>
<li>
<a href="#" id="importRecordsButton" data-turbolinks="false">
<%= t('repositories.import_records.import') %>
</a>
<li>
<% end %>
<% if can_read_team?(@repository.team) %>
<li>
<a href="#" id="exportRepositoriesButton" data-turbolinks="false">
<%= t("my_modules.repository.export") %>
</a>
</li>
<% end %>
<% if can_manage_repository?(@repository) %>
<li role="separator" class="divider"></li>
<li>
<%= link_to t('repositories.index.modal_delete.delete'),
team_repository_destroy_modal_path(current_team, repository_id: @repository),
class: "delete-repo-option",
remote: true %>
</li>
<% end %>
</ul>
<% end %>
</div>
</div>
<% if can_perform_repository_actions(@repository) %>
<ul class="dropdown-menu pull-right">
<li class="dropdown-header">
<%= t("repositories.index.options_dropdown.header") %>
</li>
<% if can_manage_repository?(@repository) %>
<li>
<%= link_to t('repositories.index.options_dropdown.rename'),
team_repository_rename_modal_path(current_team, repository_id: @repository),
class: "rename-repo-option",
remote: true %>
</li>
<% end %>
<% if can_create_repository_columns?(@repository.team) %>
<li>
<%= link_to t('repositories.index.options_dropdown.manage_columns'),
repository_repository_columns_path(@repository) %>
</li>
<% end %>
<% if can_create_repositories?(@repository.team) %>
<li>
<%= link_to t('repositories.index.options_dropdown.copy'),
team_repository_copy_modal_path(current_team, repository_id: @repository),
class: "copy-repo-option",
remote: true %>
</li>
<% end %>
<% if can_create_repository_rows?(@repository.team) %>
<li>
<a href="#" id="importRecordsButton" data-turbolinks="false">
<%= t('repositories.import_records.import') %>
</a>
<li>
<% end %>
<% if can_read_team?(@repository.team) %>
<li>
<a href="#" id="exportRepositoriesButton" data-turbolinks="false">
<%= t("my_modules.repository.export") %>
</a>
</li>
<% end %>
<% if can_manage_repository?(@repository) %>
<li role="separator" class="divider"></li>
<li>
<%= link_to t('repositories.index.modal_delete.delete'),
team_repository_destroy_modal_path(current_team, repository_id: @repository),
class: "delete-repo-option",
remote: true %>
</li>
<% end %>
</ul>
<% end %>
<div id="datatables-buttons" style="display: inline;">
<div class="new-repository-button">
<% if can_create_repositories?(@repository.team) %>
<a class="btn btn-default"
id="create-new-repository"
data-remote="true"
href="<%= create_modal_team_repositories_path(@repository.team) %>">
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs"><%= t('libraries.index.no_libraries.create_new_button') %></span>
</a>
<% end %>
</div>
<%= render partial: "columns_reorder_dropdown", formats: :html %>
</div>
</div>
<div id="datatables-buttons" style="display: inline;">
<div class="new-repository-button">
<% if can_create_repositories?(@repository.team) %>
<a class="btn btn-default"
id="create-new-repository"
data-remote="true"
href="<%= create_modal_team_repositories_path(@repository.team) %>">
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs"><%= t('libraries.index.no_libraries.create_new_button') %></span>
</a>
<% end %>
</div>
<%= render partial: "columns_reorder_dropdown", formats: :html %>
<div class="btn-group inline" id="saveCancel" data-toggle="buttons" style="display:none">
<button type="button" class="btn btn-success" id="saveRecord" onclick="onClickSave()">
<span class="glyphicon glyphicon-save"></span>
<%= t("repositories.save_record") %>
</button>
<button type="button" class="btn btn-default" id="cancelSave" onclick="onClickCancel()">
<span class="glyphicon glyphicon-remove visible-xs-inline"></span>
<span class="hidden-xs"><%= t("repositories.cancel_save") %></span>
</button>
</div>
<!-- These buttons are appended to table in javascript, after table initialization -->
<div class="toolbarButtons" style="display:none">
<% if can_manage_repository_rows?(@repository.team) %>
<button type="button" class="btn btn-default editAdd" id="editRepositoryRecord" onclick="onClickEdit()" disabled>
<span class="glyphicon glyphicon-pencil"></span>
<span class="hidden-xs-custom"><%= t("repositories.edit_record") %></span>
</button>
<button type="button" class="btn btn-default"
id="deleteRepositoryRecordsButton" data-target="#deleteRepositoryRecord" data-toggle="modal" disabled>
<span class="glyphicon glyphicon-trash"></span>
<span class="hidden-xs-custom"><%= t'repositories.delete_record' %></span>
<%= submit_tag I18n.t('repositories.delete_record'), :class => "hidden
delete_repository_records_submit" %>
</button>
<button type="button" class="btn btn-default copyRow" id="copyRepositoryRecords" onclick="onClickCopyRepositoryRecords()" disabled>
<span class="glyphicon glyphicon-duplicate"></span>
<span class="hidden-xs-custom"><%= t("repositories.copy_record") %></span>
</button>
<% end %>
</div>
<%= render partial: "repositories/repository_table.html.erb",
locals: {
repository: @repository,
repository_index_link: repository_table_index_path(@repository)
}
%>
</div>
<div class="btn-group inline" id="saveCancel" data-toggle="buttons" style="display:none">
<button type="button" class="btn btn-success" id="saveRecord" onclick="onClickSave()">
<span class="glyphicon glyphicon-save"></span>
<%= t("repositories.save_record") %>
</button>
<button type="button" class="btn btn-default" id="cancelSave" onclick="onClickCancel()">
<span class="glyphicon glyphicon-remove visible-xs-inline"></span>
<span class="hidden-xs"><%= t("repositories.cancel_save") %></span>
</button>
</div>
<!-- These buttons are appended to table in javascript, after table initialization -->
<div class="toolbarButtons" style="display:none">
<% if can_manage_repository_rows?(@repository.team) %>
<button type="button" class="btn btn-default editAdd" id="editRepositoryRecord" onclick="onClickEdit()" disabled>
<span class="glyphicon glyphicon-pencil"></span>
<span class="hidden-xs-custom"><%= t("repositories.edit_record") %></span>
</button>
<button type="button" class="btn btn-default"
id="deleteRepositoryRecordsButton" data-target="#deleteRepositoryRecord" data-toggle="modal" disabled>
<span class="glyphicon glyphicon-trash"></span>
<span class="hidden-xs-custom"><%= t'repositories.delete_record' %></span>
<%= submit_tag I18n.t('repositories.delete_record'), :class => "hidden
delete_repository_records_submit" %>
</button>
<button type="button" class="btn btn-default copyRow" id="copyRepositoryRecords" onclick="onClickCopyRepositoryRecords()" disabled>
<span class="glyphicon glyphicon-duplicate"></span>
<span class="hidden-xs-custom"><%= t("repositories.copy_record") %></span>
</button>
<% end %>
</div>
<%= render partial: "repositories/repository_table.html.erb",
locals: {
repository: @repository,
repository_index_link: repository_table_index_path(@repository)
}
%>
<%= render partial: 'repositories/import_repository_records_modal.html.erb',
locals: { repository: @repository } %>

View file

@ -1,5 +1,6 @@
<% provide(:head_title, t('libraries.repository_columns.head_title', repository: @repository.name)) %>
<div>
<div class="content-pane">
<div class="repository-columns-header container">
<div class="row">
<%= link_to t('libraries.repository_columns.index.back_to_repository_html', repository: @repository.name),

View file

@ -1,325 +1,327 @@
<% provide(:head_title, t("search.index.head_title")) %>
<div class="page-header">
<h1><%= t('search.index.results_title_html', query: @display_query) %></h1>
<br>
<!-- search form -->
<div class="row">
<div class="col-xs-12 col-sm-8 col-md-6">
<%= form_tag search_path,
method: :get,
role: 'search' do %>
<div class="form-group">
<div class="input-group">
<input class="form-control"
type="text"
name="q"
placeholder="<%= t('nav.search') %>"
value="<%= @display_query %>">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
<div class="content-pane">
<div class="page-header">
<h1><%= t('search.index.results_title_html', query: @display_query) %></h1>
<br>
<!-- search form -->
<div class="row">
<div class="col-xs-12 col-sm-8 col-md-6">
<%= form_tag search_path,
method: :get,
role: 'search' do %>
<div class="form-group">
<div class="input-group">
<input class="form-control"
type="text"
name="q"
placeholder="<%= t('nav.search') %>"
value="<%= @display_query %>">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div>
<label class="checkbox-inline">
<input id="search_whole_word" type="checkbox" name="whole_word" value="true" <%= 'checked' if @search_whole_word %>><%= I18n.t('search.whole_word') %>
</label>
<label class="checkbox-inline">
<input id="search_whole_phrase" type="checkbox" name="whole_phrase" value="true" <%= 'checked' if @search_whole_phrase %>><%= I18n.t('search.whole_phrase') %>
</label>
<label class="checkbox-inline">
<input id="search_match_case" type="checkbox" name="match_case" value="true" <%= 'checked' if @search_case %>><%= I18n.t('search.match_case') %>
</label>
</div>
<label class="checkbox-inline">
<input id="search_whole_word" type="checkbox" name="whole_word" value="true" <%= 'checked' if @search_whole_word %>><%= I18n.t('search.whole_word') %>
</label>
<label class="checkbox-inline">
<input id="search_whole_phrase" type="checkbox" name="whole_phrase" value="true" <%= 'checked' if @search_whole_phrase %>><%= I18n.t('search.whole_phrase') %>
</label>
<label class="checkbox-inline">
<input id="search_match_case" type="checkbox" name="match_case" value="true" <%= 'checked' if @search_case %>><%= I18n.t('search.match_case') %>
</label>
</div>
<% end %>
<% end %>
</div>
</div>
</div>
<%= form_tag search_path, method: :get do %>
<%= hidden_field_tag :q, @search_query %>
<%= hidden_field_tag :category, @search_category %>
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-3" id="search-menu">
<ul class="nav nav-pills nav-stacked nav-stacked-arrow nav-search">
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :projects %>
<%= "disabled" if @project_search_count == 0 %>"
>
<a href="?<%= {category: 'projects', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @project_search_count %></span>
<span class="glyphicon glyphicon-blackboard"></span>
<%= t'Projects' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :experiments %>
<%= "disabled" if @experiment_search_count == 0 %>"
>
<a href="?<%= {category: 'experiments', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @experiment_search_count %></span>
<i class="fas fa-flask"></i>
<%= t'Experiments' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :modules %>
<%= "disabled" if @module_search_count == 0 %>"
>
<a href="?<%= {category: 'modules', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @module_search_count %></span>
<span class="glyphicon glyphicon-credit-card"></span>
<%= t'Modules' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :results %>
<%= "disabled" if @result_search_count == 0 %>"
>
<a href="?<%= {category: 'results', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @result_search_count %></span>
<span class="glyphicon glyphicon-modal-window"></span>
<%= t'Results' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :tags %>
<%= "disabled" if @tag_search_count == 0 %>"
>
<a href="?<%= {category: 'tags', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @tag_search_count %></span>
<span class="glyphicon glyphicon-tags"></span>
<%= t'Tags' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :reports %>
<%= "disabled" if @report_search_count == 0 %>"
>
<a href="?<%= {category: 'reports', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @report_search_count %></span>
<span class="glyphicon glyphicon-align-left"></span>
<%= t'Reports' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :protocols %>
<%= "disabled" if @protocol_search_count == 0 %>"
>
<a href="?<%= {category: 'protocols', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @protocol_search_count %></span>
<span class="glyphicon glyphicon-list-alt"></span>
<%= t'Protocols' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :steps %>
<%= "disabled" if @step_search_count == 0 %>"
>
<a href="?<%= {category: 'steps', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @step_search_count %></span>
<span class="glyphicon glyphicon-circle-arrow-right"></span>
<%= t'Steps' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :checklists %>
<%= "disabled" if @checklist_search_count == 0 %>"
>
<a href="?<%= {category: 'checklists', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @checklist_search_count %></span>
<span class="glyphicon glyphicon-list"></span>
<%= t'Checklists' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :assets %>
<%= "disabled" if @asset_search_count == 0 %>"
>
<a href="?<%= {category: 'assets', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @asset_search_count %></span>
<span class="glyphicon glyphicon-file"></span>
<%= t'Assets' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :tables %>
<%= "disabled" if @table_search_count == 0 %>"
>
<a href="?<%= {category: 'tables', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @table_search_count %></span>
<span class="glyphicon glyphicon-th"></span>
<%= t'Tables' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :comments %>
<%= "disabled" if @comment_search_count == 0 %>"
>
<a href="?<%= {category: 'comments', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @comment_search_count %></span>
<span class="glyphicon glyphicon-comment"></span>
<%= t'Comments' %>
</a>
</li>
<% @repository_search_count.each do |team, results| %>
<li class="repositories-team <%= 'active' if results[:count] > 0 %>">
<i class="fas fa-cubes"></i>
<%= t('Repositories_team', team: team) %>
</li>
<% results[:repositories].each do |repository, values| %>
<li role="presentation"
class="
<%= "active" if @search_category == :repositories && @repository.id == values[:id] %>
<%= "disabled" if values[:count] == 0 %> repository-search"
>
<a href="?<%= {category: 'repositories',
repository: values[:id], q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= values[:count] %></span>
<%= repository %>
</a>
</li>
<% end %>
<% end %>
</ul>
</div>
<% if not @search_category.empty? %>
<div class="col-xs-12 col-sm-9" id="search-content">
<div class="container-fluid" id="search-container">
<% if @search_results_count == 0 %>
<p><%= t'search.index.error.no_results', q: @search_query %></p>
<% end %>
<hr class="visible-xs">
<% if @search_category == :projects and @project_search_count > 0 %>
<%= render 'search/results/projects', search_query: @search_query, results: @project_results %>
<% end %>
<% if @search_category == :experiments and @experiment_search_count > 0 %>
<%= render 'search/results/experiments', search_query: @search_query, results: @experiment_results %>
<% end %>
<% if @search_category == :modules and @module_search_count > 0 %>
<%= render 'search/results/modules', search_query: @search_query, results: @module_results %>
<% end %>
<% if @search_category == :results and @result_search_count > 0 %>
<%= render 'search/results/results', search_query: @search_query, results: @result_results %>
<% end %>
<% if @search_category == :tags and @tag_search_count > 0 %>
<%= render 'search/results/tags', search_query: @search_query, results: @tag_results %>
<% end %>
<% if @search_category == :reports and @report_search_count > 0 %>
<%= render 'search/results/reports', search_query: @search_query, results: @report_results %>
<% end %>
<% if @search_category == :protocols and @protocol_search_count > 0 %>
<%= render 'search/results/protocols', search_query: @search_query, results: @protocol_results %>
<% end %>
<% if @search_category == :steps and @step_search_count > 0 %>
<%= render 'search/results/steps', search_query: @search_query, results: @step_results %>
<% end %>
<% if @search_category == :checklists and @checklist_search_count > 0 %>
<%= render 'search/results/checklists', search_query: @search_query, results: @checklist_results %>
<% end %>
<% if @search_category == :repositories and @repository_search_count_total > 0 %>
<%= render 'search/results/repositories', search_query: @search_query, results: @repository_results, repository: @repository %>
<% end %>
<% if @search_category == :assets and @asset_search_count > 0 %>
<%= render 'search/results/assets', search_query: @search_query, results: @asset_results %>
<% end %>
<% if @search_category == :tables and @table_search_count > 0 %>
<%= render 'search/results/tables', search_query: @search_query, results: @table_results %>
<% end %>
<% if @search_category == :comments and @comment_search_count > 0 %>
<%= render 'search/results/comments', search_query: @search_query, results: @comment_results %>
<% end %>
</div>
</div>
<% end %>
</div>
<% end %>
<% if @search_pages > 1 %>
<nav class="text-center">
<ul class="pagination">
<% if @search_page > 1 %>
<li>
<a href="?<%= {q: @search_query, category: @search_category, page: @search_page - 1, utf8: '✓'}.to_query %>" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
<% end %>
<% (@start_page..@end_page).each do |page_i| %>
<li <% if @search_page == page_i %>class="active"<% end %>>
<a href="?<%= {q: @search_query, category: @search_category, page: page_i, utf8: '✓'}.to_query %>"><%= page_i %></a>
</li>
<% end %>
<% if @search_page < @search_pages %>
<li>
<a href="?<%= {q: @search_query, category: @search_category, page: @search_page + 1, utf8: '✓'}.to_query %>" aria-label="Previous">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
<% end %>
</ul>
</nav>
<% end %>
</div>
<%= form_tag search_path, method: :get do %>
<%= hidden_field_tag :q, @search_query %>
<%= hidden_field_tag :category, @search_category %>
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-3" id="search-menu">
<ul class="nav nav-pills nav-stacked nav-stacked-arrow nav-search">
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :projects %>
<%= "disabled" if @project_search_count == 0 %>"
>
<a href="?<%= {category: 'projects', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @project_search_count %></span>
<span class="glyphicon glyphicon-blackboard"></span>
<%= t'Projects' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :experiments %>
<%= "disabled" if @experiment_search_count == 0 %>"
>
<a href="?<%= {category: 'experiments', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @experiment_search_count %></span>
<i class="fas fa-flask"></i>
<%= t'Experiments' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :modules %>
<%= "disabled" if @module_search_count == 0 %>"
>
<a href="?<%= {category: 'modules', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @module_search_count %></span>
<span class="glyphicon glyphicon-credit-card"></span>
<%= t'Modules' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :results %>
<%= "disabled" if @result_search_count == 0 %>"
>
<a href="?<%= {category: 'results', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @result_search_count %></span>
<span class="glyphicon glyphicon-modal-window"></span>
<%= t'Results' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :tags %>
<%= "disabled" if @tag_search_count == 0 %>"
>
<a href="?<%= {category: 'tags', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @tag_search_count %></span>
<span class="glyphicon glyphicon-tags"></span>
<%= t'Tags' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :reports %>
<%= "disabled" if @report_search_count == 0 %>"
>
<a href="?<%= {category: 'reports', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @report_search_count %></span>
<span class="glyphicon glyphicon-align-left"></span>
<%= t'Reports' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :protocols %>
<%= "disabled" if @protocol_search_count == 0 %>"
>
<a href="?<%= {category: 'protocols', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @protocol_search_count %></span>
<span class="glyphicon glyphicon-list-alt"></span>
<%= t'Protocols' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :steps %>
<%= "disabled" if @step_search_count == 0 %>"
>
<a href="?<%= {category: 'steps', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @step_search_count %></span>
<span class="glyphicon glyphicon-circle-arrow-right"></span>
<%= t'Steps' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :checklists %>
<%= "disabled" if @checklist_search_count == 0 %>"
>
<a href="?<%= {category: 'checklists', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @checklist_search_count %></span>
<span class="glyphicon glyphicon-list"></span>
<%= t'Checklists' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :assets %>
<%= "disabled" if @asset_search_count == 0 %>"
>
<a href="?<%= {category: 'assets', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @asset_search_count %></span>
<span class="glyphicon glyphicon-file"></span>
<%= t'Assets' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :tables %>
<%= "disabled" if @table_search_count == 0 %>"
>
<a href="?<%= {category: 'tables', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @table_search_count %></span>
<span class="glyphicon glyphicon-th"></span>
<%= t'Tables' %>
</a>
</li>
<li role="presentation"
class="
<%= "active" if @search_category.present? and @search_category == :comments %>
<%= "disabled" if @comment_search_count == 0 %>"
>
<a href="?<%= {category: 'comments', q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= @comment_search_count %></span>
<span class="glyphicon glyphicon-comment"></span>
<%= t'Comments' %>
</a>
</li>
<% @repository_search_count.each do |team, results| %>
<li class="repositories-team <%= 'active' if results[:count] > 0 %>">
<i class="fas fa-cubes"></i>
<%= t('Repositories_team', team: team) %>
</li>
<% results[:repositories].each do |repository, values| %>
<li role="presentation"
class="
<%= "active" if @search_category == :repositories && @repository.id == values[:id] %>
<%= "disabled" if values[:count] == 0 %> repository-search"
>
<a href="?<%= {category: 'repositories',
repository: values[:id], q: @search_query,
whole_word: @search_whole_word, whole_phrase: @search_whole_phrase,
match_case: @search_case, utf8: '✓',
search_id: @search_id}.to_query %>">
<span class="badge pull-right"><%= values[:count] %></span>
<%= repository %>
</a>
</li>
<% end %>
<% end %>
</ul>
</div>
<% if not @search_category.empty? %>
<div class="col-xs-12 col-sm-9" id="search-content">
<div class="container-fluid" id="search-container">
<% if @search_results_count == 0 %>
<p><%= t'search.index.error.no_results', q: @search_query %></p>
<% end %>
<hr class="visible-xs">
<% if @search_category == :projects and @project_search_count > 0 %>
<%= render 'search/results/projects', search_query: @search_query, results: @project_results %>
<% end %>
<% if @search_category == :experiments and @experiment_search_count > 0 %>
<%= render 'search/results/experiments', search_query: @search_query, results: @experiment_results %>
<% end %>
<% if @search_category == :modules and @module_search_count > 0 %>
<%= render 'search/results/modules', search_query: @search_query, results: @module_results %>
<% end %>
<% if @search_category == :results and @result_search_count > 0 %>
<%= render 'search/results/results', search_query: @search_query, results: @result_results %>
<% end %>
<% if @search_category == :tags and @tag_search_count > 0 %>
<%= render 'search/results/tags', search_query: @search_query, results: @tag_results %>
<% end %>
<% if @search_category == :reports and @report_search_count > 0 %>
<%= render 'search/results/reports', search_query: @search_query, results: @report_results %>
<% end %>
<% if @search_category == :protocols and @protocol_search_count > 0 %>
<%= render 'search/results/protocols', search_query: @search_query, results: @protocol_results %>
<% end %>
<% if @search_category == :steps and @step_search_count > 0 %>
<%= render 'search/results/steps', search_query: @search_query, results: @step_results %>
<% end %>
<% if @search_category == :checklists and @checklist_search_count > 0 %>
<%= render 'search/results/checklists', search_query: @search_query, results: @checklist_results %>
<% end %>
<% if @search_category == :repositories and @repository_search_count_total > 0 %>
<%= render 'search/results/repositories', search_query: @search_query, results: @repository_results, repository: @repository %>
<% end %>
<% if @search_category == :assets and @asset_search_count > 0 %>
<%= render 'search/results/assets', search_query: @search_query, results: @asset_results %>
<% end %>
<% if @search_category == :tables and @table_search_count > 0 %>
<%= render 'search/results/tables', search_query: @search_query, results: @table_results %>
<% end %>
<% if @search_category == :comments and @comment_search_count > 0 %>
<%= render 'search/results/comments', search_query: @search_query, results: @comment_results %>
<% end %>
</div>
</div>
<% end %>
</div>
<% end %>
<% if @search_pages > 1 %>
<nav class="text-center">
<ul class="pagination">
<% if @search_page > 1 %>
<li>
<a href="?<%= {q: @search_query, category: @search_category, page: @search_page - 1, utf8: '✓'}.to_query %>" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
<% end %>
<% (@start_page..@end_page).each do |page_i| %>
<li <% if @search_page == page_i %>class="active"<% end %>>
<a href="?<%= {q: @search_query, category: @search_category, page: page_i, utf8: '✓'}.to_query %>"><%= page_i %></a>
</li>
<% end %>
<% if @search_page < @search_pages %>
<li>
<a href="?<%= {q: @search_query, category: @search_category, page: @search_page + 1, utf8: '✓'}.to_query %>" aria-label="Previous">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
<% end %>
</ul>
</nav>
<% end %>
<%= javascript_include_tag('search') %>

View file

@ -37,12 +37,6 @@
<span><%= t('left_menu_bar.reports') %></span>
<% end %>
</li>
<li class="<%= "active" if settings_are_selected? %>">
<%= link_to edit_user_registration_path, id: "settings-link", title: t('left_menu_bar.settings') do %>
<span class="glyphicon glyphicon-cog"></span>
<span><%= t('left_menu_bar.settings') %></span>
<% end %>
</li>
</ul>
<ul class="nav nav-bottom">
<li class="<%= "active" if activities_are_selected? %>">
@ -76,6 +70,12 @@
target: "_blank" %></li>
</ul>
</li>
<li class="<%= "active" if settings_are_selected? %>">
<%= link_to edit_user_registration_path, id: "settings-link", title: t('left_menu_bar.settings') do %>
<span class="glyphicon glyphicon-cog"></span>
<span><%= t('left_menu_bar.settings') %></span>
<% end %>
</li>
</ul>
</div>

View file

@ -17,7 +17,23 @@
<!-- True secondary navigation (buttons on the right side) -->
<ul class="nav navbar-nav navbar-right" style="vertical-align: bottom">
<% if project_page? ||
<% if all_projects_page? %>
<% if can_read_team?(current_team) then %>
<li id="canvas-nav-tab" class="<%= "active" if is_all_projects_index? %>">
<a href="<%= projects_path %>" title="<%=t "nav2.all_projects.index" %>">
<span class="hidden-sm hidden-md"><%=t "nav2.all_projects.index" %></span>
<span class="hidden-xs hidden-lg glyphicon glyphicon-blackboard"></span>
</a>
</li>
<li id="project-archive-nav-tab" data-turbolinks="false" class="<%= "active" if is_all_projects_archive? %>">
<a href="<%= projects_archive_path %>" title="<%=t "nav2.all_projects.archive" %>">
<span class="glyphicon glyphicon-briefcase"></span>
<span class="hidden-sm hidden-md"><%=t "nav2.all_projects.archive" %></span>
</a>
</li>
<% end %>
<% elsif project_page? ||
sample_types_page_project? ||
sample_groups_page_project? %>
<% if can_read_project?(@project) then %>
@ -30,6 +46,7 @@
<li id="project-archive-nav-tab" data-turbolinks="false" class="<%= "active" if is_project_archive? %>">
<a href="<%= experiment_archive_project_url(@project) %>" title="<%=t "nav2.projects.archive" %>">
<span class="glyphicon glyphicon-briefcase"></span>
<span class="hidden-sm hidden-md"><%=t "nav2.projects.archive" %></span>
</a>
</li>
<% end %>
@ -47,8 +64,9 @@
<% end %>
<% if can_read_project?(@experiment.project) %>
<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" %>">
<a href="<%= module_archive_experiment_url(@experiment) %>" title="<%=t "nav2.experiments.archive" %>">
<span class="glyphicon glyphicon-briefcase"></span>
<span class="hidden-sm hidden-md"><%=t "nav2.experiments.archive" %></span>
</a>
</li>
<% end %>
@ -106,7 +124,9 @@
<% if can_read_experiment?(@my_module.experiment) then %>
<li id="archive-nav-tab" data-turbolinks="false" class="<%= "active" if is_module_archive? %>">
<a href="<%= archive_my_module_url(@my_module) %>">
<span class="glyphicon glyphicon-briefcase" title="<%= t'nav2.modules.archive' %>"></span></a>
<span class="glyphicon glyphicon-briefcase" title="<%= t'nav2.modules.archive' %>"></span>
<span class="hidden-sm hidden-md"><%=t "nav2.modules.archive" %></span>
</a>
</li>
<% end %>
@ -114,10 +134,10 @@
</ul>
<!-- Secondary navigation title -->
<div class="nav-name">
<h4 class="nav-name">
<%= truncate(title_element.name,
length: Constants::NAME_TRUNCATION_LENGTH) %>
</div>
</h4>
</div>
</div>

View file

@ -2,7 +2,7 @@
<div id="slide-panel" class="visible">
<div class="tree">
<ul>
<% if project_page? && action_name.in?(%w(index archive)) ||
<% if all_projects_page? ||
sample_types_page_project? ||
sample_groups_page_project? %>

View file

@ -3,7 +3,7 @@
<% @projects_by_teams.each do |team, projects| %>
<% projects.each do |project| %>
<% if (project_page? && action_name.in?(%w(show experiment_archive)) ||
<% if (project_page? ||
sample_types_page_project? ||
sample_groups_page_project?) && project == @project %>
<li class="active" data-parent="candidate">

View file

@ -1,6 +1,6 @@
<div class ="step <%= step.completed? ? "completed" : "not-completed" %>">
<div class="badge-num">
<span class="badge bg-primary size-digit-<%= (step.position + 1).to_s.length %>"><%= step.position + 1 %></span>
<span class="badge size-digit-<%= (step.position + 1).to_s.length %>"><%= step.position + 1 %></span>
</div>
<div class="panel panel-default">
<div class="panel-heading">
@ -126,13 +126,19 @@
<div data-action="uncomplete-step"
class="pull-right"
data-link-url="<%= toggle_step_state_step_path(step)%>">
<button class="btn btn-default"><%= t("protocols.steps.options.uncomplete_title") %></button>
<button class="btn btn-default">
<span class="glyphicon glyphicon-remove"></span>
<%= t("protocols.steps.options.uncomplete_title") %>
</button>
</div>
<% else %>
<div data-action="complete-step"
class="pull-right"
data-link-url="<%= toggle_step_state_step_path(step)%>">
<button class="btn btn-success"><%= t("protocols.steps.options.complete_title") %></button>
<button class="btn btn-success">
<span class="glyphicon glyphicon-ok"></span>
<%= t("protocols.steps.options.complete_title") %>
</button>
</div>
<% end %>
<% end %>

View file

@ -1,26 +1,29 @@
<% provide(:head_title, sanitize_input(t("notifications.title"))) %>
<div class="notifications-container">
<div class="notifications-header">
<span><%= t('notifications.title') %></span><span class="pull-right"><%= link_to t('nav.user.settings'), preferences_path %></span>
</div>
<div class="notifications-body">
<ul class="notifications-list">
<% if @notifications.count > 0 %>
<%= render 'list', notifications: @notifications %>
<% else %>
<li class="notification no-notifications">
<em><%= t('notifications.no_notifications') %></em>
</li>
<div class="content-pane">
<div class="notifications-container">
<div class="notifications-header">
<span><%= t('notifications.title') %></span><span class="pull-right"><%= link_to t('nav.user.settings'), preferences_path %></span>
</div>
<div class="notifications-body">
<ul class="notifications-list">
<% if @notifications.count > 0 %>
<%= render 'list', notifications: @notifications %>
<% else %>
<li class="notification no-notifications">
<em><%= t('notifications.no_notifications') %></em>
</li>
<% end %>
</ul>
</div>
<% if @overflown %>
<div class="text-center">
<a class="btn btn-default btn-more-notifications" href="<%= @more_notifications_url %>" data-remote="true">
<span><%= t('notifications.show_more') %></span>
</a>
</div>
<% end %>
</ul>
</div>
<% if @overflown %>
<div class="text-center">
<a class="btn btn-default btn-more-notifications" href="<%= @more_notifications_url %>" data-remote="true">
<span><%= t('notifications.show_more') %></span>
</a>
</div>
<% end %>
</div>
<%= javascript_include_tag("notifications") %>

View file

@ -1,14 +1,15 @@
<% provide(:head_title, t("users.registrations.edit.head_title")) %>
<% provide(:container_class, "no-second-nav-container") %>
<%= render partial: "users/settings/sidebar" %>
<div class="tab-content">
<div class="tab-pane tab-pane-settings active" role="tabpanel">
<div class="tab-pane content-pane active" role="tabpanel">
<div class="row">
<div class="col-xs-12 col-sm-12">
<div class="row">
<div class="col-md-4">
<h2><%=t "users.registrations.edit.title" %></h2>
<h2 style="margin-top: 10px;"><%=t "users.registrations.edit.title" %></h2>
<% if not resource.errors.empty? %>
<div class="alert alert-danger">
@ -203,7 +204,7 @@
<div class="col-md-7 col-md-offset-1">
<div class="row user-statistics">
<div class="col-md-12">
<h2><%=t "users.statistics.title" %></h2>
<h2 style="margin-top: 10px;"><%=t "users.statistics.title" %></h2>
<ul class="list-inline">
<li class="label label-primary">
<h2><%= @user.statistics[:number_of_teams]%></h2>

View file

@ -1,8 +1,9 @@
<% provide(:head_title, t('users.settings.account.addons.head_title')) %>
<% provide(:container_class, "no-second-nav-container") %>
<%= render partial: 'users/settings/sidebar.html.erb' %>
<div class="tab-content">
<div class="tab-pane tab-pane-settings active" role="tabpanel">
<div class="tab-pane content-pane active" role="tabpanel">
<div class="row">
<div class="col-xs-12 col-sm-12">

View file

@ -1,8 +1,9 @@
<% provide(:head_title, t("users.settings.account.preferences.head_title")) %>
<% provide(:container_class, "no-second-nav-container") %>
<%= render partial: "users/settings/sidebar.html.erb" %>
<div class="tab-content">
<div class="tab-pane tab-pane-settings active" role="tabpanel">
<div class="tab-pane content-pane active" role="tabpanel">
<div class="row">
<div class="col-xs-12 col-sm-12">

View file

@ -1,9 +1,10 @@
<% provide(:head_title, t("users.settings.teams.head_title")) %>
<% provide(:container_class, "no-second-nav-container") %>
<%= render partial: "users/settings/sidebar.html.erb" %>
<div class="tab-content">
<div class="tab-pane tab-pane-settings" role="tabpanel"></div>
<div class="tab-pane tab-pane-settings active" role="tabpanel">
<div class="tab-pane content-pane" role="tabpanel"></div>
<div class="tab-pane content-pane active" role="tabpanel">
<%= render partial: "users/settings/teams/breadcrumbs.html.erb" %>

View file

@ -1,11 +1,12 @@
<% provide(:head_title, t("users.settings.teams.head_title")) %>
<% provide(:container_class, "no-second-nav-container") %>
<div data-hook="team-beginning"></div>
<%= render partial: "users/settings/sidebar.html.erb" %>
<div class="tab-content">
<div class="tab-pane tab-pane-settings" role="tabpanel"></div>
<div class="tab-pane tab-pane-settings active" role="tabpanel">
<div class="tab-pane content-pane" role="tabpanel"></div>
<div class="tab-pane content-pane active" role="tabpanel">
<%= render partial: "users/settings/teams/breadcrumbs.html.erb" %>
@ -26,7 +27,7 @@
<!-- HEADER -->
<div class="row">
<div class="col-xs-6 col-sm-3">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-calendar"></span>
</div>
<div class="well well-sm">
@ -36,7 +37,7 @@
</div>
<div class="col-xs-10 col-sm-5">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-user"></span>
</div>
<div class="well well-sm">
@ -46,7 +47,7 @@
</div>
<div class="col-xs-8 col-sm-4">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<span class="glyphicon glyphicon-hdd"></span>
</div>
<div class="well well-sm">
@ -60,7 +61,7 @@
<div class="row">
<div class="col-xs-24 col-sm-12" data-hook="team-header-description">
<div class="badge-icon bg-primary">
<div class="badge-icon">
<%= link_to team_description_path(@team, format: :json),
remote: true,
class: 'description-link',

View file

@ -100,7 +100,7 @@ en:
left_menu_bar:
projects: "Projects"
repositories: "Inventories"
templates: "Templates"
templates: "Protocols"
reports: "Reports"
settings: "Settings"
activities: "Activities"
@ -119,21 +119,25 @@ en:
all: "All Projects"
nav2:
all_projects:
index: "Projects"
archive: "Archived projects"
projects:
show: "Overview"
show: "Experiments"
samples: "Samples"
activities: "Activity"
reports: "Reports"
archive: "Archive"
archive: "Archived experiments"
experiments:
canvas: "Overview"
canvas: "Tasks"
archive: "Archived tasks"
modules:
steps: "Protocols"
results: "Results"
activities: "Activity"
samples: "Samples"
repositories: "Inventories"
archive: "Archive"
archive: "Archived results"
search:
whole_word: "Match any whole word"
@ -203,8 +207,8 @@ en:
head_title: "Home"
archive: "Archive"
new: "New Project"
visibility_private: "Project is private. Only invited users can see it."
visibility_public: "Project is public. Everybody from the team can see it."
visibility_private: "Project is visible to project members only."
visibility_public: "Project is visible to all team members."
user_project: "%{user} joined on %{timestamp}."
no_activities: "No activities!"
no_comments: "No comments!"
@ -250,9 +254,9 @@ en:
name: "Project name"
name_placeholder: "My project"
team: "Team"
visibility: "Visibility"
visibility_hidden: "Private"
visibility_visible: "Public"
visibility: "Visible to:"
visibility_hidden: "Project members only"
visibility_visible: "All team members"
modal_edit_project:
modal_title: "Edit project %{project}"
submit: "Save"
@ -283,7 +287,6 @@ en:
error_flash: "Project <strong>%{name}</strong> not restored."
show:
head_title: "%{project}"
page_title: "Project's experiments"
samples:
head_title: "%{project} | Sample inventory"
reports:
@ -304,7 +307,7 @@ en:
projects: "Projects"
head_title: "Create new report"
no_projects: "No projects available."
message: "You are about to create a new report. Please select a project from which you would like to create a report for."
message: "You are about to create a new report. Please select a project from which you would like to create a report."
create: "Create"
modal_delete:
head_title: "Delete report/s"
@ -573,7 +576,7 @@ en:
load_protocol_from_repository: "from repository"
load_protocol_from_file: "from file"
export: "Export Protocol"
copy_to_repository: "Save To Protocol Repository"
copy_to_repository: "Copy To Protocol Repository"
confirm_link_update_modal:
unlink_title: "Unlink protocol"
unlink_message: "Are you sure you want to unlink the task protocol from the repository version? This will stop any tracking of changes."
@ -603,8 +606,9 @@ en:
title: "Load protocol from repository"
text: "Choose the protocol to be loaded to the task."
text2: "This action will overwrite the current protocol in the task and unlink it from repository. The current protocol will remain unchanged in repository."
tab_public: "Public protocols"
tab_private: "Private protocols"
tab_public: "Team protocols"
tab_private: "My protocols"
tab_archive: "Archived protocols"
thead_name: "Name"
thead_keywords: "Keywords"
thead_nr_of_linked_children: "No. of linked tasks"
@ -621,9 +625,9 @@ en:
name_label: "Repository protocol name"
name_placeholder: "My protocol"
type_label: "Copy to"
type_public: "Public protocols"
type_private: "Private protocols"
type_text: "You can copy the protocol to public team repository, or to your private protocols."
type_public: "Team protocols"
type_private: "My protocols"
type_text: "You can copy the protocol to protocols repository visible to all team members, or to your protocols repository."
link_label: "Link task to this repository protocol"
link_text: "<strong>Warning!</strong>&nbsp;This will unlink the currently linked protocol."
error_400: "Due to unknown error, protocol could not be copied to repository."
@ -1566,11 +1570,11 @@ en:
index:
head_title: "Protocol management"
navigation:
public: "Public protocols"
private: "Private protocols"
public: "Team protocols"
private: "My protocols"
archive: "Archive"
public_description: "Public protocols are visible and can be used by everyone from the team."
private_description: "Private protocols are only visible to you."
public_description: "Team protocols are visible and can be used by everyone from the team."
private_description: "My protocols are only visible to you."
create_new: "New"
edit: "Edit"
clone_btn: "Copy"
@ -1581,8 +1585,8 @@ en:
modal_import_json_title: "Import protocols.io file"
modal_import_json_notice: "Upload your protocols.io protocol file"
export: "Export"
make_private: "Make private"
publish: "Publish"
make_private: "Move to My Protocols"
publish: "Move to Team protocols"
archive_action: "Archive"
thead_name: "Name"
thead_keywords: "Keywords"
@ -1601,16 +1605,16 @@ en:
used_in: "Number of tasks linked to this protocol: %{nr}"
no_linked_children: "This protocol is not linked to any task."
archive:
description: "Archived protocols can only be seen by you. Restoring protocols will return them to their previous location (public/private)."
description: "Archived protocols can only be seen by you. Restoring protocols will return them to their previous location (team/my protocols)."
restore: "Restore"
no_teams:
title: "Your dashboard is empty!"
text: "It seems you're not a member of any team. See team management to sort it out."
btn: "Manage Teams"
make_private_unauthorized: "You do not have permission to make selected protocols private."
make_private_error: "Error occured while making selected protocols private."
publish_unauthorized: "You do not have permission to publish selected protocols."
publish_error: "Error occured while publishing selected protocols."
make_private_unauthorized: "You do not have permission to move selected protocols to My protocols."
make_private_error: "Error occured while moving selected protocols to My protocols."
publish_unauthorized: "You do not have permission to move selected protocols to Team protocols."
publish_error: "Error occured while moving selected protocols to Team protocols."
archive_unauthorized: "You do not have permission to archive selected protocols."
archive_error: "Error occured while archiving selected protocols."
restore_unauthorized: "You do not have permission to restore selected protocols."
@ -1621,25 +1625,25 @@ en:
title: "Create new protocol"
name_label: "Protocol name"
name_placeholder: "My protocol"
message_public: "When you create a new public protocol, it will instantly be visible to all members of the team."
message_private: "When you create a new private protocol, it will only be visible to you."
message_public: "When you create a new Team protocol, it will instantly be visible to all members of the team."
message_private: "When you create a new My protocol, it will only be visible to you."
submit: "Create"
clone:
success_flash: "Successfully copied protocol '%{new}' from protocol '%{original}'."
error_flash: "Failed to copied protocol '%{original}'."
make_private_results:
title: "Make private results"
message_failed: "Failed to make %{nr} protocols private."
message_ok: "Successfully made %{nr} protocols private."
row_success: "Made private"
row_renamed: "Made private & renamed"
title: "Move to My protocols results"
message_failed: "Failed to move %{nr} protocols to My protocols."
message_ok: "Successfully moved %{nr} protocols to My protocols."
row_success: "Moved to My protocols"
row_renamed: "Moved to My protocols & renamed"
row_failed: "Failed"
publish_results:
title: "Publish results"
message_failed: "Failed to publish %{nr} protocols."
message_ok: "Successfully published %{nr} protocols."
row_success: "Published"
row_renamed: "Published & renamed"
title: "Move to Team protocols results"
message_failed: "Failed to move %{nr} protocols to Team protocols."
message_ok: "Successfully moved %{nr} protocols to Team protocols."
row_success: "Moved to Team protocols"
row_renamed: "Moved to Team protocols & renamed"
row_failed: "Failed"
import_results:
title: "Import results"
@ -1670,8 +1674,8 @@ en:
row_success: "Restored"
row_renamed: "Restored & renamed"
row_failed: "Failed"
row_in_repository_public: "%{protocol} - <i>into public protocols</i>"
row_in_repository_private: "%{protocol} - <i>into private protocols</i>"
row_in_repository_public: "%{protocol} - <i>into Team protocols</i>"
row_in_repository_private: "%{protocol} - <i>into My protocols</i>"
steps:
completed: 'Completed'
uncompleted: 'Uncompleted'