Merge branch 'Ducz0r-lm-sci-2431-fix'

This commit is contained in:
Luka Murn 2018-06-12 17:45:28 +02:00
commit 24b925c419
12 changed files with 185 additions and 166 deletions

View file

@ -322,13 +322,17 @@ a[data-toggle="tooltip"] {
@include box-shadow(0 4px 0 $brand-primary);
margin-bottom: 4px;
a,
a:hover,
a:focus {
background: $color-white;
& > a,
& > a:hover,
& > a:focus {
background: transparent;
color: $color-emperor;
font-weight: bold;
}
ul .active-item {
font-weight: bold;
}
}
}
}
@ -500,12 +504,27 @@ a[data-toggle="tooltip"] {
}
}
.protocols-datatable table {
tbody tr.selected {
& > td:nth-child(3), td:nth-child(4) {
color: $color-emperor;
& a {
.protocols-datatable {
.dataTables_wrapper {
margin-top: 15px;
clear: both;
.dataTables_length {
float: left;
}
.dataTables_filter {
float: right;
}
}
table {
tbody tr.selected {
& > td:nth-child(3), td:nth-child(4) {
color: $color-emperor;
& a {
color: $color-emperor;
}
}
}
}
@ -765,50 +784,25 @@ ul.double-line > li {
ul.content-activities {
li.activity-item {
border-radius: .25em;
background-color: $color-white;
border: 1px solid $color-concrete;
border-bottom: 1px solid $color-concrete;
padding: 8px 0;
.activity-item-date {
min-width: 150px;
display: table-cell;
vertical-align: middle;
border-top-left-radius: .25em;
border-bottom-left-radius: .25em;
border: 3px solid $color-alto;
background-color: $color-alto;
padding-left: 10px;
padding-right: 10px;
padding: 0 10px;
vertical-align: top;
text-align: center;
}
.activity-item-text {
display: table-cell;
padding: 3px 10px;
padding: 0 10px;
text-align: justify;
}
}
}
ul.content-module-activities {
li.activity-item {
margin-bottom: 15px;
.activity-item-date {
font-size: 1.2em;
background-color: $color-alto;
border-color: $color-alto;
padding-top: 5px;
padding-bottom: 5px;
}
.activity-item-text {
padding-top: 5px;
padding-bottom: 5px;
}
}
}
.step {
.panel-heading a[data-toggle] {
color: inherit;

View file

@ -3,7 +3,7 @@
<div class="content-pane">
<div class="container" id="global-activity-page">
<div>
<ul id="list-activities" class="no-style content-activities content-module-activities">
<ul id="list-activities" class="no-style content-activities">
<% if @vars[:activities].empty? %>
<li><em><%= t'activities.index.no_activities' %></em></li>
<% else %>

View file

@ -12,7 +12,7 @@
type: 'button',
id: 'edit-canvas-button',
data: { action: 'edit' },
class: 'ajax btn btn-default' do %>
class: 'ajax btn btn-primary' do %>
<span class="fas fa-pencil-alt"></span>
<span class="hidden-xs"><%=t 'experiments.canvas.canvas_edit' %></span>
<% end %>
@ -41,17 +41,6 @@
<% 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>
@ -68,4 +57,3 @@
<%= javascript_include_tag("eventPause-min") %>
<%= javascript_include_tag("projects/canvas") %>
<%= javascript_include_tag("experiments/dropdown_actions") %>

View file

@ -1,5 +1,5 @@
<!-- Show recent activities -->
<ul id="list-activities" class="no-style content-activities content-module-activities">
<ul id="list-activities" class="no-style content-activities">
<% @activities.each do |act| %>
<%= render partial: "my_modules/activities/activity.html.erb", locals: { activity: act } %>
<% end %>

View file

@ -4,101 +4,121 @@
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<div class="content-pane" id="projects-index">
<% 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">
<%= bootstrap_form_for @project, remote: true do |f| %>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="new-project-modal-label"><%= t("projects.index.modal_new_project.modal_title") %></h4>
</div>
<div class="modal-body">
<%= render partial: "new.html.erb", locals: { form: f, teams: @teams } %>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
<%= f.submit t("projects.index.modal_new_project.create"), class: "btn btn-success" %>
</div>
<% 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">
<%= bootstrap_form_for @project, remote: true do |f| %>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="new-project-modal-label"><%= t("projects.index.modal_new_project.modal_title") %></h4>
</div>
<div class="modal-body">
<%= render partial: "new.html.erb", locals: { form: f, teams: @teams } %>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
<%= f.submit t("projects.index.modal_new_project.create"), class: "btn btn-success" %>
</div>
</div>
</div>
<% end %>
</div>
<% end %>
<div class="content-pane" id="projects-index">
<% if @projects_tree.empty? %>
<div class="jumbotron text-center" style="margin-top:12%">
<strong><%=t 'projects.index.no_projects.text' %></strong>
<% if @teams.exists? && can_create_projects?(current_team) %>
<h2><strong><%=t 'projects.index.no_projects.title' %><strong></h2>
<br />
<a class="btn btn-primary btn-lg"
id="new-project-btn">
<span class="glyphicon glyphicon-plus"></span>
<span class="hidden-xs"><%= t('projects.index.no_projects.create_new_button') %></span>
</a>
<% else %>
<p><strong><%=t 'projects.index.no_projects.no_permission_title' %></strong></p>
<% end %>
</div>
<% else %>
<!-- Edit project modal -->
<div class="modal" id="edit-project-modal" tabindex="-1" role="dialog" aria-labelledby="edit-project-modal-label">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="edit-project-modal-label"></h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
<button type="button" class="btn btn-success" data-action="submit"><%=t "projects.index.modal_edit_project.submit" %></button>
</div>
</div>
</div>
</div>
<!-- Manage users modal -->
<div class="modal" id="project-actions-modal" tabindex="-1" role="dialog" aria-labelledby="project-actions-modal-label">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="project-actions-modal-label"></h4>
</div>
<div class="modal-body"></div>
<div class="modal-footer"></div>
</div>
</div>
</div>
<div id="projects-toolbar">
<form class="form-inline" action="<%= projects_path %>">
<div class="form-group">
<% if @teams.exists? && can_create_projects?(current_team) %>
<!-- new project button -->
<a class="btn btn-primary pull-right" id="new-project-btn">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "projects.index.new" %></span>
</a>
<% end %>
<!-- 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 %>
</ul>
</div>
</div>
</form>
</div>
<%= render partial: "projects/index/team_projects",
locals: { projects: @projects_tree } %>
<% end %>
<!-- Edit project modal -->
<div class="modal" id="edit-project-modal" tabindex="-1" role="dialog" aria-labelledby="edit-project-modal-label">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="edit-project-modal-label"></h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
<button type="button" class="btn btn-success" data-action="submit"><%=t "projects.index.modal_edit_project.submit" %></button>
</div>
</div>
</div>
</div>
<!-- Manage users modal -->
<div class="modal" id="project-actions-modal" tabindex="-1" role="dialog" aria-labelledby="project-actions-modal-label">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="project-actions-modal-label"></h4>
</div>
<div class="modal-body"></div>
<div class="modal-footer"></div>
</div>
</div>
</div>
<div id="projects-toolbar">
<form class="form-inline" action="<%= projects_path %>">
<div class="form-group">
<% if @teams.exists? && can_create_projects?(current_team) %>
<!-- new project button -->
<a class="btn btn-primary pull-right" id="new-project-btn">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "projects.index.new" %></span>
</a>
<% end %>
<!-- 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 %>
</ul>
</div>
</div>
</form>
</div>
<%= render partial: "projects/index/team_projects",
locals: { projects: @projects_tree } %>
</div>
<% end %>
<%= javascript_include_tag "projects/index", "data-turbolinks-track" => true %>

View file

@ -35,18 +35,21 @@
disabled>
</select>
<% else %>
<p><%=t 'projects.reports.new.save_PDF_to_inventory_modal.no_inventories' %></p>
<br />
<p><em><%=t 'projects.reports.new.save_PDF_to_inventory_modal.no_inventories' %></em></p>
<% end %>
<div class="save-PDF-to-inventory-alerts" id="save-PDF-to-inventory-warnings"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t 'general.cancel' %></button>
<button
id="savePDFtoInventorySubmit"
type="button"
class="btn btn-primary"
disabled
><%=t 'general.save' %></button>
<% if @available_repositories && @available_repositories.length > 0 %>
<button
id="savePDFtoInventorySubmit"
type="button"
class="btn btn-primary"
disabled
><%=t 'general.save' %></button>
<% end %>
</div>
</div>
</div>

View file

@ -28,14 +28,14 @@
</span>
<% @repository_row.repository_cells.each do |repository_cell| %>
<br>
<% if repository_cell.value_type == 'RepositoryAssetValue' %>
<%= render partial: "shared/asset_link", locals: { asset: repository_cell.value.asset, display_image_tag: false }, formats: :html %>
<% else %>
<span>
<%= t "repository_row.modal_info.custom_field", cf: repository_cell.repository_column.name %>
<%= custom_auto_link(repository_cell.value.formatted, simple_format: false, team: current_team) %>
<% if repository_cell.value_type == 'RepositoryAssetValue' %>
<%= render partial: "shared/asset_link", locals: { asset: repository_cell.value.asset, display_image_tag: false }, formats: :html %>
<% else %>
<%= custom_auto_link(repository_cell.value.formatted, simple_format: false, team: current_team) %>
<% end %>
</span>
<% end %>
<% end %>
</p>

View file

@ -21,7 +21,7 @@
<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>
<p><strong><%=t 'libraries.index.no_libraries.no_permission_title' %></strong></p>
<% end %>
</div>
</div>

View file

@ -7,8 +7,8 @@
class: 'file-preview-link',
id: "modal_link#{asset.id}",
data: { no_turbolink: true, id: true, status: 'asset-present', 'preview-url': asset_file_preview_path(asset) } do %>
<p><%= truncate(asset.file_file_name,
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
<span><%= truncate(asset.file_file_name,
length: Constants::FILENAME_TRUNCATION_LENGTH) %></span>
<% end %>
</span>
<% else %>
@ -19,8 +19,17 @@
<% if asset.is_image? && display_image_tag %>
<%= image_tag asset.url(:medium) %>
<% end %>
<p><%= truncate(asset.file_file_name,
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
<% if display_image_tag %>
<p>
<%= truncate(asset.file_file_name,
length: Constants::FILENAME_TRUNCATION_LENGTH) %>
</p>
<% else %>
<span>
<%= truncate(asset.file_file_name,
length: Constants::FILENAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
<% end %>
<% end %>
<% else %>

View file

@ -107,7 +107,7 @@
<ul class="dropdown-menu repositories-dropdown-menu" aria-labelledby="repositoriesDropdownMenuLink">
<% @my_module.experiment.project.team.repositories.order(created_at: :asc).each do |repository| %>
<li>
<a class="dropdown-item"
<a class="dropdown-item <%= "active-item" if module_repository_page? && @repository == repository %>"
href="<%= repository_my_module_url(id: @my_module, repository_id: repository) %>"
title="<%= repository.name %>"
data-no-turbolink="true">

View file

@ -47,7 +47,7 @@ class Constants
# Comments limited query/display elements for pages
COMMENTS_SEARCH_LIMIT = 10
# Activity limited query/display elements for pages
ACTIVITY_AND_NOTIF_SEARCH_LIMIT = 10
ACTIVITY_AND_NOTIF_SEARCH_LIMIT = 20
# Maximum number of users that can be invited in a single action
INVITE_USERS_LIMIT = 20

View file

@ -211,6 +211,11 @@ en:
index:
head_title: "Home"
archive: "Archive"
no_projects:
text: "You don't have any active projects."
title: "Please create your Project"
create_new_button: "New Project"
no_permission_title: "You don't have permission to create new project. Please contact your team administrator."
new: "New Project"
visibility_private: "Project is visible to project members only."
visibility_public: "Project is visible to all team members."
@ -336,7 +341,7 @@ en:
inventory: "Select inventory:"
inventory_column: "Select inventory column:"
inventory_item: "Select inventory item:"
no_inventories: "No inventories available!"
no_inventories: "No inventories to save this PDF to."
success_flash: "Report successfully saved to Inventory item."
asset_present_warning_html: "The selected cell already contains a file. If you would like to replace the file click Save. Replacing the file will have the following consequences: <ul><li>previous file will be permanently deleted;</li><li>new file will be added to the Inventory item.</li></ul>"
no_items: "Selected Inventory does not contain any items yet. Add the first item"
@ -637,14 +642,14 @@ en:
import_to_linked_task_rep: "Are you sure you wish to load protocol from repository? This action will overwrite the current protocol in the task and unlink it from repository. The current protocol will remain unchanged in repository."
load: "Load"
copy_to_repository_modal:
title: "Copy protocol to repository"
title: "Copy to protocol repository"
name_label: "Repository protocol name"
name_placeholder: "My protocol"
type_label: "Copy to"
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_label: "Link task to this protocol repository"
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."
confirm: "Copy"
@ -779,11 +784,11 @@ en:
modal_move_module:
title: "Move task to experiment"
confirm: "Move"
no_experiments: "There are no other experiments."
no_experiments: "No experiments to move this task to."
modal_move_module_group:
title: "Move workflow to experiment"
confirm: "Move"
no_experiments: "There are no other experiments."
no_experiments: "No experiments to move this workflow to."
modal_delete_module:
title: "Archive task"
confirm: "Archive"