From 7df40e56c7f0b88c70d59b990eb558c60d5a71de Mon Sep 17 00:00:00 2001 From: mlorb Date: Tue, 8 May 2018 16:33:42 +0200 Subject: [PATCH] UI/UX restyle - fixes throughout application part one --- .../javascripts/my_modules/protocols.js.erb | 3 + app/assets/javascripts/protocols/index.js | 3 + app/assets/javascripts/protocols/steps.js.erb | 10 +- .../reports/reports_datatable.js.erb | 3 + .../repositories/repository_datatable.js.erb | 3 + .../javascripts/users/settings/teams/show.js | 5 +- app/assets/stylesheets/constants.scss | 18 +- app/assets/stylesheets/partials/_sidebar.scss | 1 + app/assets/stylesheets/projects.scss | 4 +- .../stylesheets/themes/main_navigation.scss | 1 + .../stylesheets/themes/repositories.scss | 10 +- app/assets/stylesheets/themes/scinote.scss | 26 +- app/helpers/application_helper.rb | 8 +- app/helpers/secondary_navigation_helper.rb | 12 +- app/views/activities/index.html.erb | 34 +- app/views/experiments/canvas.html.erb | 104 +-- app/views/experiments/module_archive.html.erb | 46 +- app/views/my_modules/_module_header.html.erb | 10 +- app/views/my_modules/_result.html.erb | 2 +- app/views/my_modules/activities.html.erb | 34 +- app/views/my_modules/archive.html.erb | 26 +- app/views/my_modules/protocols.html.erb | 20 +- app/views/my_modules/repository.html.erb | 68 +- app/views/my_modules/results.html.erb | 80 +-- app/views/projects/archive.html.erb | 86 +-- .../projects/archive/_team_projects.html.erb | 2 - .../projects/experiment_archive.html.erb | 46 +- app/views/projects/index.html.erb | 10 +- app/views/projects/show.html.erb | 88 ++- app/views/protocols/_header.html.erb | 12 +- .../_import_json_protocol_p_desc.html.erb | 2 +- .../_import_json_protocol_s_desc.html.erb | 2 +- .../import_export/_preview_templates.html.erb | 2 +- app/views/protocols/index.html.erb | 266 ++++---- .../_protocol_preview_modal_body.html.erb | 14 +- app/views/reports/index.html.erb | 76 ++- app/views/repositories/index.html.erb | 33 +- app/views/repositories/show.html.erb | 248 +++---- app/views/repository_columns/index.html.erb | 3 +- app/views/search/index.html.erb | 636 +++++++++--------- app/views/shared/_left_menu_bar.html.erb | 12 +- .../shared/_secondary_navigation.html.erb | 30 +- app/views/shared/_sidebar.html.erb | 2 +- app/views/shared/sidebar/_projects.html.erb | 2 +- app/views/steps/_step.html.erb | 12 +- app/views/user_notifications/index.html.erb | 43 +- app/views/users/registrations/edit.html.erb | 7 +- .../settings/account/addons/index.html.erb | 3 +- .../account/preferences/index.html.erb | 3 +- app/views/users/settings/teams/index.html.erb | 5 +- app/views/users/settings/teams/show.html.erb | 13 +- config/locales/en.yml | 90 +-- 52 files changed, 1196 insertions(+), 1083 deletions(-) diff --git a/app/assets/javascripts/my_modules/protocols.js.erb b/app/assets/javascripts/my_modules/protocols.js.erb index 3b2f3384e..73bbdae52 100644 --- a/app/assets/javascripts/my_modules/protocols.js.erb +++ b/app/assets/javascripts/my_modules/protocols.js.erb @@ -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"]; diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index f609a0699..ac6fdfb36 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -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"]; diff --git a/app/assets/javascripts/protocols/steps.js.erb b/app/assets/javascripts/protocols/steps.js.erb index 69fe217a0..b09cab854 100644 --- a/app/assets/javascripts/protocols/steps.js.erb +++ b/app/assets/javascripts/protocols/steps.js.erb @@ -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(' ' + 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(' ' + data.new_title); } - - button.find("button").html(data.new_title); }, error: function (data) { console.log ("error"); diff --git a/app/assets/javascripts/reports/reports_datatable.js.erb b/app/assets/javascripts/reports/reports_datatable.js.erb index 48c35055e..7175e51d3 100644 --- a/app/assets/javascripts/reports/reports_datatable.js.erb +++ b/app/assets/javascripts/reports/reports_datatable.js.erb @@ -146,6 +146,9 @@ 'sWidth': '1%', 'render': renderCheckboxHTML }], + 'oLanguage': { + 'sSearch': "Filter:" + }, 'fnDrawCallback': tableDrowCallback, 'createdRow': appendEditPathToRow }); diff --git a/app/assets/javascripts/repositories/repository_datatable.js.erb b/app/assets/javascripts/repositories/repository_datatable.js.erb index 8d8093df5..a8081ae55 100644 --- a/app/assets/javascripts/repositories/repository_datatable.js.erb +++ b/app/assets/javascripts/repositories/repository_datatable.js.erb @@ -92,6 +92,9 @@ var RepositoryDatatable = (function(global) { "class='record-info-link'>" + data + ''; } }], + oLanguage: { + sSearch: "Filter:" + }, rowCallback: function(row, data) { // Get row ID var rowId = data.DT_RowId; diff --git a/app/assets/javascripts/users/settings/teams/show.js b/app/assets/javascripts/users/settings/teams/show.js index 0ba029f14..8183b9b64 100644 --- a/app/assets/javascripts/users/settings/teams/show.js +++ b/app/assets/javascripts/users/settings/teams/show.js @@ -120,7 +120,10 @@ function initUsersTable() { { data: "3" }, { data: "4" }, { data: "5" } - ] + ], + oLanguage: { + sSearch: "Filter:" + } }); } diff --git a/app/assets/stylesheets/constants.scss b/app/assets/stylesheets/constants.scss index 35d308d18..4e2aa5c3b 100644 --- a/app/assets/stylesheets/constants.scss +++ b/app/assets/stylesheets/constants.scss @@ -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; diff --git a/app/assets/stylesheets/partials/_sidebar.scss b/app/assets/stylesheets/partials/_sidebar.scss index ec830b72e..72e3f07d9 100644 --- a/app/assets/stylesheets/partials/_sidebar.scss +++ b/app/assets/stylesheets/partials/_sidebar.scss @@ -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; diff --git a/app/assets/stylesheets/projects.scss b/app/assets/stylesheets/projects.scss index 7d992987a..2651b54d5 100644 --- a/app/assets/stylesheets/projects.scss +++ b/app/assets/stylesheets/projects.scss @@ -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; diff --git a/app/assets/stylesheets/themes/main_navigation.scss b/app/assets/stylesheets/themes/main_navigation.scss index 12b455848..6d7fcd602 100644 --- a/app/assets/stylesheets/themes/main_navigation.scss +++ b/app/assets/stylesheets/themes/main_navigation.scss @@ -2,6 +2,7 @@ @import "mixins"; #main-nav { + box-shadow: 0 3px 6px $color-alto; margin-bottom: 0; } diff --git a/app/assets/stylesheets/themes/repositories.scss b/app/assets/stylesheets/themes/repositories.scss index 81f9a7a6b..e1cbb9d74 100644 --- a/app/assets/stylesheets/themes/repositories.scss +++ b/app/assets/stylesheets/themes/repositories.scss @@ -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; } diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index c99424a57..80bc9fd8d 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -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; } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cb7c7b3ac..0625b8a70 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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) diff --git a/app/helpers/secondary_navigation_helper.rb b/app/helpers/secondary_navigation_helper.rb index de5477453..28f203f52 100644 --- a/app/helpers/secondary_navigation_helper.rb +++ b/app/helpers/secondary_navigation_helper.rb @@ -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 diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index 1db715a76..35788b9ef 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -1,24 +1,26 @@ <% provide :head_title, t('nav.label.activities') %> -
-
-
    - <% if @vars[:activities].empty? %> -
  • <%= t'activities.index.no_activities' %>
  • - <% else %> - <% @vars[:activities].each do |activity| %> - <%= render 'activity.html.erb', activity: activity %> +
    +
    +
    +
      + <% if @vars[:activities].empty? %> +
    • <%= t'activities.index.no_activities' %>
    • + <% else %> + <% @vars[:activities].each do |activity| %> + <%= render 'activity.html.erb', activity: activity %> + <% end %> <% end %> +
    + <% if @vars[:more_activities_url].present? && @vars[:page] == 1 %> + <% end %> -
- <% if @vars[:more_activities_url].present? && @vars[:page] == 1 %> - - <% end %>
diff --git a/app/views/experiments/canvas.html.erb b/app/views/experiments/canvas.html.erb index d3fec473c..d5716e770 100644 --- a/app/views/experiments/canvas.html.erb +++ b/app/views/experiments/canvas.html.erb @@ -2,61 +2,63 @@ <%= render partial: "shared/sidebar" %> <%= render partial: "shared/secondary_navigation" %> -
-
-
- <% 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 %> - - - <% end %> - - - - <%= render partial: 'experiments/dropdown_actions.html.erb', - locals: { project: @project, experiment: @experiment } %> - - <% end %> -
- -
- <%=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 %> - - <% end %> - <%=link_to canvas_medium_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "medium_zoom" do %> - - <% end %> - <%=link_to canvas_small_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "small_zoom" do %> - - <% end %> -
-
- - <% 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 %> - - <%=t 'experiments.new.create' %> +
+
+
+
+ <% 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 %> + + + <% end %> + + + + <%= render partial: 'experiments/dropdown_actions.html.erb', + locals: { project: @project, experiment: @experiment } %> + + <% end %> +
+ +
+ <%=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 %> + <% end %> - <% end %> + <%=link_to canvas_medium_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "medium_zoom" do %> + + <% end %> + <%=link_to canvas_small_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "small_zoom" do %> + + <% end %> +
+
+ + <% 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 %> + + <%=t 'experiments.new.create' %> + <% end %> + <% end %> +
-
-
- <%= render partial: 'canvas/full_zoom', locals: { experiment: @experiment, my_modules: @active_modules } %> +
+ <%= render partial: 'canvas/full_zoom', locals: { experiment: @experiment, my_modules: @active_modules } %> +
diff --git a/app/views/experiments/module_archive.html.erb b/app/views/experiments/module_archive.html.erb index e41c671a1..855949dd9 100644 --- a/app/views/experiments/module_archive.html.erb +++ b/app/views/experiments/module_archive.html.erb @@ -2,27 +2,29 @@ <%= render partial: "shared/sidebar" %> <%= render partial: "shared/secondary_navigation" %> -<% if @experiment.archived_modules.count > 0 %> -
- <% @experiment.archived_modules.each_with_index do |my_module, i| %> -
- <%= render partial: "experiments/module_archive/my_module.html.erb", locals: { my_module: my_module} %> -
- <% if (i+1) % 6 == 0 %> -
+
+ <% if @experiment.archived_modules.count > 0 %> +
+ <% @experiment.archived_modules.each_with_index do |my_module, i| %> +
+ <%= render partial: "experiments/module_archive/my_module.html.erb", locals: { my_module: my_module} %> +
+ <% if (i+1) % 6 == 0 %> +
+ <% end %> + <% if (i+1) % 4 == 0 %> +
+ <% end %> + <% if (i+1) % 3 == 0 %> +
+ <% end %> <% end %> - <% if (i+1) % 4 == 0 %> -
- <% end %> - <% if (i+1) % 3 == 0 %> -
- <% end %> - <% end %> -
-<% else %> -
-
- <%=t "experiments.module_archive.no_archived_modules" %>
-
-<% end %> + <% else %> +
+
+ <%=t "experiments.module_archive.no_archived_modules" %> +
+
+ <% end %> +
diff --git a/app/views/my_modules/_module_header.html.erb b/app/views/my_modules/_module_header.html.erb index b8d932514..3806eb640 100644 --- a/app/views/my_modules/_module_header.html.erb +++ b/app/views/my_modules/_module_header.html.erb @@ -1,6 +1,6 @@
-
+
@@ -10,7 +10,7 @@
-
+
<% 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 %> @@ -38,7 +38,7 @@
-
+
@@ -51,7 +51,7 @@
-
+
<% if can_manage_module?(@my_module) %> @@ -74,7 +74,7 @@
-
+
<% 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 %> diff --git a/app/views/my_modules/_result.html.erb b/app/views/my_modules/_result.html.erb index 8bee5659f..4f5aaff63 100644 --- a/app/views/my_modules/_result.html.erb +++ b/app/views/my_modules/_result.html.erb @@ -1,6 +1,6 @@
- + <% if result.is_text %> <% elsif result.is_table %> diff --git a/app/views/my_modules/activities.html.erb b/app/views/my_modules/activities.html.erb index c6be0e62e..5365906b8 100644 --- a/app/views/my_modules/activities.html.erb +++ b/app/views/my_modules/activities.html.erb @@ -2,24 +2,26 @@ <%= render partial: "shared/sidebar" %> <%= render partial: "shared/secondary_navigation" %> -
- <% if @activities.length == 0 %> -
- <%= t 'my_modules.activities.no_activities' %> -
- <% else %> -
<%= javascript_include_tag("my_modules/activities") %> diff --git a/app/views/my_modules/archive.html.erb b/app/views/my_modules/archive.html.erb index cd698b95f..57d3994eb 100644 --- a/app/views/my_modules/archive.html.erb +++ b/app/views/my_modules/archive.html.erb @@ -2,17 +2,23 @@ <%= render partial: "shared/sidebar" %> <%= render partial: "shared/secondary_navigation" %> -
-
- <% 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 %> - <%=t "my_modules.module_archive.no_archived_results" %> - <% end %> +
+
+
+ <% 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 %> +
+
+ <%=t "my_modules.module_archive.no_archived_results" %> +
+
+ <% end %>
diff --git a/app/views/my_modules/protocols.html.erb b/app/views/my_modules/protocols.html.erb index 89e2be322..6ad77a783 100644 --- a/app/views/my_modules/protocols.html.erb +++ b/app/views/my_modules/protocols.html.erb @@ -4,18 +4,20 @@ <%= render partial: "shared/sidebar" %> <%= render partial: "shared/secondary_navigation" %> -<%= render partial: "module_header" %> +
+ <%= render partial: "module_header" %> -
-
- <%= render partial: "my_modules/protocols/protocol_status_bar.html.erb" %> +
+
+ <%= render partial: "my_modules/protocols/protocol_status_bar.html.erb" %> +
+ <%= render partial: "my_modules/protocols/protocol_buttons.html.erb" %> + <%= render partial: "my_modules/state_buttons.html.erb" %>
- <%= render partial: "my_modules/protocols/protocol_buttons.html.erb" %> - <%= render partial: "my_modules/state_buttons.html.erb" %> -
-
- <%= render partial: "protocols/steps.html.erb" %> +
+ <%= render partial: "protocols/steps.html.erb" %> +
diff --git a/app/views/my_modules/repository.html.erb b/app/views/my_modules/repository.html.erb index a524cd49d..c06b4281c 100644 --- a/app/views/my_modules/repository.html.erb +++ b/app/views/my_modules/repository.html.erb @@ -5,43 +5,45 @@ <%= render partial: "shared/sidebar" %> <%= render partial: "shared/secondary_navigation" %> -

<%= @repository.name %>

+
+

<%= @repository.name %>

-
- - -
+
+ + +
-
- <%= render partial: "repositories/columns_reorder_dropdown" %> -
+
+ <%= render partial: "repositories/columns_reorder_dropdown" %> +
- + -
- <%= 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) - } - %> +
+ <%= 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) + } + %> +
<%= stylesheet_link_tag 'datatables' %> diff --git a/app/views/my_modules/results.html.erb b/app/views/my_modules/results.html.erb index 9ce275075..5a8fa7188 100644 --- a/app/views/my_modules/results.html.erb +++ b/app/views/my_modules/results.html.erb @@ -3,48 +3,50 @@ <%= render partial: "shared/secondary_navigation" %> <%= render partial: 'shared/drag_n_drop_overlay' %> -
-
- - +
+
+
+ + +
+ + <% if can_manage_module?(@my_module) %> + + + + + + + + + + + + + + <% end %>
- <% if can_manage_module?(@my_module) %> - - - - - - - - - - - - - +
+ +
+ <% ordered_result_of(@my_module).each do |result| %> + <%= render partial: "result", locals: { result: result } %> <% end %> -
- -
- -
-<% ordered_result_of(@my_module).each do |result| %> - <%= render partial: "result", locals: { result: result } %> -<% end %> +
<%= javascript_include_tag "handsontable.full.min" %> diff --git a/app/views/projects/archive.html.erb b/app/views/projects/archive.html.erb index 89bb349ee..7c472c447 100644 --- a/app/views/projects/archive.html.erb +++ b/app/views/projects/archive.html.erb @@ -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 %> -
+
+ <% if @archived_projects_by_teams.length > 0 %> +
-
+ -
- - +
+
+
+ <% @archived_projects_by_teams.each do |team, projects| %> + <%= render partial: 'projects/archive/team_projects', + locals: {team: team, projects: projects} %> + <% end %> + <% else %> +
+
+

<%=t "projects.index.no_archived_projects" %>

+
+
+
+
+ <%= link_to t("projects.index.back_to_projects_index"), projects_path, data: { turbolinks: 'false' } %> +
+
+ +
+
- -
- - <% @archived_projects_by_teams.each do |team, projects| %> - <%= render partial: 'projects/archive/team_projects', - locals: {team: team, projects: projects} %> <% end %> -<% else %> - -
-
-
- -
-
-

<%=t "projects.index.no_archived_projects" %>

-
-
-
-
- <%= link_to t("projects.index.back_to_projects_index"), projects_path, data: { turbolinks: 'false' } %> -
-
-<% end %> +
diff --git a/app/views/projects/archive/_team_projects.html.erb b/app/views/projects/archive/_team_projects.html.erb index d15b74bba..c501786c5 100644 --- a/app/views/projects/archive/_team_projects.html.erb +++ b/app/views/projects/archive/_team_projects.html.erb @@ -1,5 +1,3 @@ - -
<% projects.each_index do |i| project = projects[i] %>
diff --git a/app/views/projects/experiment_archive.html.erb b/app/views/projects/experiment_archive.html.erb index dfd294719..3f63279e7 100644 --- a/app/views/projects/experiment_archive.html.erb +++ b/app/views/projects/experiment_archive.html.erb @@ -2,27 +2,29 @@ <%= render partial: "shared/sidebar" %> <%= render partial: "shared/secondary_navigation" %> -<% if @project.archived_experiments.count > 0 %> -
- <% @project.archived_experiments.each_with_index do |experiment, i| %> -
- <%= render partial: "projects/experiment_archive/experiment.html.erb", locals: { experiment: experiment} %> -
- <% if (i+1) % 6 == 0 %> -
+
+ <% if @project.archived_experiments.count > 0 %> +
+ <% @project.archived_experiments.each_with_index do |experiment, i| %> +
+ <%= render partial: "projects/experiment_archive/experiment.html.erb", locals: { experiment: experiment} %> +
+ <% if (i+1) % 6 == 0 %> +
+ <% end %> + <% if (i+1) % 4 == 0 %> +
+ <% end %> + <% if (i+1) % 3 == 0 %> +
+ <% end %> <% end %> - <% if (i+1) % 4 == 0 %> -
- <% end %> - <% if (i+1) % 3 == 0 %> -
- <% end %> - <% end %> -
-<% else %> -
-
- <%=t "projects.experiment_archive.no_archived_experiments" %>
-
-<% end %> + <% else %> +
+
+ <%=t "projects.experiment_archive.no_archived_experiments" %> +
+
+ <% end %> +
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index a915e32a6..bc4ea4e4d 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -1,6 +1,8 @@ <% provide(:head_title, t("projects.index.head_title")) %> <%= render partial: "shared/sidebar" %> +<%= render partial: "shared/secondary_navigation" %> +
<% if can_create_projects?(current_team) %> + <%= javascript_include_tag "projects/index", "data-turbolinks-track" => true %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index a0fe46e52..143ef9b23 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -2,58 +2,56 @@ <%= render partial: "shared/sidebar" %> <%= render partial: "shared/secondary_navigation" %> -
-
-
-
- - - <% 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 %> - - <% end %> - <% end %> -
-
-
-
-

<%= t'projects.show.page_title' %>

+
-
-
- <% @project.active_experiments(@current_sort).each_with_index do |experiment, index| %> - <%= render partial: 'projects/show/experiment', - locals: { experiment: experiment } %> +
+ <% @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 %> +
+ <%= javascript_include_tag("experiments/dropdown_actions") %> <%= javascript_include_tag("projects/show") %> diff --git a/app/views/protocols/_header.html.erb b/app/views/protocols/_header.html.erb index a4e930a1d..ad8455cae 100644 --- a/app/views/protocols/_header.html.erb +++ b/app/views/protocols/_header.html.erb @@ -10,7 +10,7 @@
-
+
@@ -20,7 +20,7 @@
-
+
@@ -30,7 +30,7 @@
-
+
@@ -40,7 +40,7 @@
-
+
<% if can_manage_protocol_in_repository?(@protocol) %> @@ -62,7 +62,7 @@
-
+
-
+
<% if can_manage_protocol_in_repository?(@protocol) %> diff --git a/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb b/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb index a16d6eaef..154c14640 100644 --- a/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb +++ b/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb @@ -2,7 +2,7 @@
- + <%= 1 %>     diff --git a/app/views/protocols/import_export/_import_json_protocol_s_desc.html.erb b/app/views/protocols/import_export/_import_json_protocol_s_desc.html.erb index 86d3b3cdd..5253d2ad3 100644 --- a/app/views/protocols/import_export/_import_json_protocol_s_desc.html.erb +++ b/app/views/protocols/import_export/_import_json_protocol_s_desc.html.erb @@ -8,7 +8,7 @@
- + <%= (counter) %>     diff --git a/app/views/protocols/import_export/_preview_templates.html.erb b/app/views/protocols/import_export/_preview_templates.html.erb index fc4a0488c..c5f6f67df 100644 --- a/app/views/protocols/import_export/_preview_templates.html.erb +++ b/app/views/protocols/import_export/_preview_templates.html.erb @@ -1,7 +1,7 @@

- +   diff --git a/app/views/protocols/index.html.erb b/app/views/protocols/index.html.erb index 032e39c76..437e8e67d 100644 --- a/app/views/protocols/index.html.erb +++ b/app/views/protocols/index.html.erb @@ -1,143 +1,147 @@ <% provide(:head_title, t("protocols.index.head_title")) %> -<% if current_team %> - -
-
- - <% if @type.in? [:public, :private] %> -
- <%= t(@type == :public ? "protocols.index.public_description" : "protocols.index.private_description") %> -
-
- data-url="<%= create_new_modal_protocols_path(team: @current_team, type: @type) %>"> - - - - - - - - - - - - <% if @type == :public %> - - - +
+ <% if current_team %> + +
+
+ + <% if @type.in? [:public, :private] %> +
+ <%= t(@type == :public ? "protocols.index.public_description" : "protocols.index.private_description") %> +
+
-
- - <% if can_create_protocols_in_repository?(@current_team) %> - - <% end %> - - - - -
- - - <% else %> -
- <%= t("protocols.index.archive.description") %> -
- - <% end %> - -
-
- - - - - - - - <% if @type == :public %> - - - <% elsif @type == :private %> - - - <% else %> - - + + + + + <% if @type == :public %> + + + + + <% elsif @type == :private %> + + + + + <% end %> + +
+ + <% if can_create_protocols_in_repository?(@current_team) %> +
- - - -
<%= t("protocols.index.thead_name") %><%= t("protocols.index.thead_keywords") %><%= t("protocols.index.thead_nr_of_linked_children") %><%= t("protocols.index.thead_published_by") %><%= t("protocols.index.thead_published_on") %><%= t("protocols.index.thead_added_by") %><%= t("protocols.index.thead_created_at") %><%= t("protocols.index.thead_archived_by") %><%= t("protocols.index.thead_archived_on") %><%= t("protocols.index.thead_updated_at") %>
+ + + <% end %> + + + + +
+ + + <% else %> +
+ <%= t("protocols.index.archive.description") %> +
+ + <% end %> + +
+
+ + + + + + + + <% if @type == :public %> + + + <% elsif @type == :private %> + + + <% else %> + + + <% end %> + + + + +
<%= t("protocols.index.thead_name") %><%= t("protocols.index.thead_keywords") %><%= t("protocols.index.thead_nr_of_linked_children") %><%= t("protocols.index.thead_published_by") %><%= t("protocols.index.thead_published_on") %><%= t("protocols.index.thead_added_by") %><%= t("protocols.index.thead_created_at") %><%= t("protocols.index.thead_archived_by") %><%= t("protocols.index.thead_archived_on") %><%= t("protocols.index.thead_updated_at") %>
+
-
-<% else %> - -
-

<%=t 'protocols.index.no_teams.title' %>

-

<%=t 'protocols.index.no_teams.text' %>

-

- <%= link_to t('protocols.index.no_teams.btn'), teams_path, class: 'btn btn-primary' %> -

-
-<% end %> + <% else %> + +
+

<%=t 'protocols.index.no_teams.title' %>

+

<%=t 'protocols.index.no_teams.text' %>

+

+ <%= link_to t('protocols.index.no_teams.btn'), teams_path, class: 'btn btn-primary' %> +

+
+ <% end %> +
+
<%= render partial: "protocols/import_export/import_json_protocol_modal.html.erb" %> diff --git a/app/views/protocols/index/_protocol_preview_modal_body.html.erb b/app/views/protocols/index/_protocol_preview_modal_body.html.erb index aa8b04c67..1780de92b 100644 --- a/app/views/protocols/index/_protocol_preview_modal_body.html.erb +++ b/app/views/protocols/index/_protocol_preview_modal_body.html.erb @@ -1,6 +1,6 @@
-
+
@@ -10,7 +10,7 @@
-
+
@@ -20,7 +20,7 @@
-
+
@@ -30,7 +30,7 @@
-
+
@@ -40,7 +40,7 @@
-
+
@@ -50,7 +50,7 @@
-
+
@@ -70,7 +70,7 @@ <% protocol.steps.order(:position).each do |step| %>
">
- <%= step.position + 1 %> + <%= step.position + 1 %>
diff --git a/app/views/reports/index.html.erb b/app/views/reports/index.html.erb index 479ef9bd9..349249ad6 100644 --- a/app/views/reports/index.html.erb +++ b/app/views/reports/index.html.erb @@ -1,45 +1,47 @@ <% provide(:head_title, t('projects.reports.index.head_title').html_safe) %> <%= stylesheet_link_tag 'datatables' %> -
-
-
- <% if can_manage_reports?(current_team) %> - <%= link_to '#', class: 'btn btn-primary', id: 'new-report-btn', 'data-no-turbolink' => true do %> - - +
+
+
+
+ <% if can_manage_reports?(current_team) %> + <%= link_to '#', class: 'btn btn-primary', id: 'new-report-btn', 'data-no-turbolink' => true do %> + + + <% end %> + <%= link_to "", remote: true, class: "btn btn-default", id: "edit-report-btn" do %> + + + <% end %> + <%= link_to "", remote: true, class: "btn btn-default", id: "delete-reports-btn" do %> + + + <% end %> <% end %> - <%= link_to "", remote: true, class: "btn btn-default", id: "edit-report-btn" do %> - - - <% end %> - <%= link_to "", remote: true, class: "btn btn-default", id: "delete-reports-btn" do %> - - - <% end %> - <% end %> +
-
-
-
-
-
- - - - - - - - - - - - - -
<%=t 'projects.reports.index.thead_project_name' %><%=t 'projects.reports.index.thead_name' %><%=t 'projects.reports.index.thead_created_by' %><%=t 'projects.reports.index.thead_last_modified_by' %><%=t 'projects.reports.index.thead_created_at' %><%=t 'projects.reports.index.thead_updated_at' %>
+
+
+
+
+ + + + + + + + + + + + + +
<%=t 'projects.reports.index.thead_project_name' %><%=t 'projects.reports.index.thead_name' %><%=t 'projects.reports.index.thead_created_by' %><%=t 'projects.reports.index.thead_last_modified_by' %><%=t 'projects.reports.index.thead_created_at' %><%=t 'projects.reports.index.thead_updated_at' %>
+
diff --git a/app/views/repositories/index.html.erb b/app/views/repositories/index.html.erb index d6dca19ff..38230ef08 100644 --- a/app/views/repositories/index.html.erb +++ b/app/views/repositories/index.html.erb @@ -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 %> -
- <%=t 'libraries.index.no_libraries.text' %> - <% if can_create_repositories?(current_team) %> -

<%=t 'libraries.index.no_libraries.title' %>

-
- - - - - <% else %> -

<%=t 'libraries.index.no_libraries.no_permission_title' %>

- <% end %> +
+
+ <%=t 'libraries.index.no_libraries.text' %> + <% if can_create_repositories?(current_team) %> +

<%=t 'libraries.index.no_libraries.title' %>

+
+ + + + + <% else %> +

<%=t 'libraries.index.no_libraries.no_permission_title' %>

+ <% end %> +
<% else %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index c1662b303..b6897bd2e 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -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 } %>
-
+
+
- <% if can_create_repository_rows?(@repository.team) %> - - <% end %> + <% if can_create_repository_rows?(@repository.team) %> + + <% end %> -
-