Add views and helpers for global activities individual cards [SCI-2994][SCI-3024]

This commit is contained in:
Oleksii Kriuchykhin 2019-02-27 16:02:53 +01:00
parent af5cc4a5bb
commit 0930277c4e
23 changed files with 481 additions and 17 deletions

View file

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M3 3h2v2H3V3zm0 4h2v2H3V7zm0 4h2v2H3v-2zm6.334-6.216v2.334H13v1.716H9.334v2.382H13V13H7V3h6v1.784H9.334z" fill="#B3B3B3" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 240 B

View file

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 3c.417 0 .77.146 1.062.437.292.292.438.646.438 1.063v9c0 .417-.146.77-.438 1.062A1.447 1.447 0 0 1 14.5 15h-13c-.417 0-.77-.146-1.063-.438A1.447 1.447 0 0 1 0 13.5v-11c0-.417.146-.77.437-1.063A1.447 1.447 0 0 1 1.5 1h5l2 2h6zm-6.851 7.076c.625 0 1.074-.15 1.349-.447.274-.299.411-.715.411-1.25 0-.237-.035-.452-.106-.646a1.315 1.315 0 0 0-.323-.5 1.452 1.452 0 0 0-.547-.323 2.418 2.418 0 0 0-.784-.114h-1.25v3.28h1.25zm0-5.076c.729 0 1.355.086 1.878.26.523.172.953.41 1.292.713.338.302.588.66.749 1.072.16.411.24.856.24 1.334 0 .516-.082.99-.248 1.42-.165.43-.418.8-.76 1.107-.34.308-.772.548-1.295.72-.523.174-1.141.26-1.856.26h-1.25V15H4V5h3.649z" fill="#B3B3B3" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 791 B

View file

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6.646 14V7.215H4V5h7.938v2.215H9.292V14h4.144c.26 0 .434-.009.542-.022.013-.107.022-.282.022-.542V2.564c0-.26-.009-.435-.022-.542A4.762 4.762 0 0 0 13.436 2H2.564c-.26 0-.435.009-.542.022A4.762 4.762 0 0 0 2 2.564v10.872c0 .26.009.434.022.542.107.013.282.022.542.022h4.082zM2.564 0h10.872c.892 0 1.215.093 1.54.267.327.174.583.43.757.756.174.326.267.65.267 1.54v10.873c0 .892-.093 1.215-.267 1.54-.174.327-.43.583-.756.757-.326.174-.65.267-1.54.267H2.563c-.892 0-1.215-.093-1.54-.267a1.817 1.817 0 0 1-.757-.756C.093 14.65 0 14.327 0 13.437V2.563c0-.892.093-1.215.267-1.54.174-.327.43-.583.756-.757C1.35.093 1.673 0 2.563 0z" fill="#B3B3B3" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 761 B

View file

@ -0,0 +1,56 @@
/* global animateSpinner */
'use strict';
(function() {
function initExpandCollapseAllButtons() {
$('#global-activities-colapse-all').on('click', function() {
$('.activities-group').collapse('hide');
});
$('#global-activities-expand-all').on('click', function() {
$('.activities-group').collapse('show');
});
}
function initExpandCollapseButton() {
$('.activities-group').on('hide.bs.collapse', function() {
$('#' + $(this)
.attr('id') + '-button').find('.fas').removeClass('fa-caret-down');
$('#' + $(this)
.attr('id') + '-button').find('.fas').addClass('fa-caret-right');
});
$('.activities-group').on('show.bs.collapse', function() {
$('#' + $(this)
.attr('id') + '-button').find('.fas').removeClass('fa-caret-right');
$('#' + $(this)
.attr('id') + '-button').find('.fas').addClass('fa-caret-down');
});
}
function initShowMoreButton() {
var moreButton = $('.btn-more-activities');
moreButton.on('click', function(ev) {
ev.preventDefault();
animateSpinner(null, true);
$.ajax({
url: $('.global-activities_activities-list').data('activities-url'),
data: { from_date: moreButton.data('next-date') },
dataType: 'json',
type: 'POST',
success: function(json) {
$('.global-activities_activities-list').html(json.activities_html);
if (json.more_activities === true) {
moreButton.data('next-date', json.next_date);
} else {
moreButton.addClass('hidden');
}
animateSpinner(null, false);
}
});
});
}
initExpandCollapseAllButtons();
initExpandCollapseButton();
initShowMoreButton();
}());

View file

@ -34,10 +34,49 @@
grid-area: activities;
overflow-y: scroll;
min-height: 600px;
.activities-counter-label {
margin-left: 10px;
}
.activities-group {
list-style: none;
padding-left: 0;
}
.activities-group-expand-button {
color: $color-emperor;
}
.activity-card {
border-radius: 5px;
margin-right: 10px;
padding: 5px;
&:hover {
background-color: $brand-primary-light;
}
.atwho-user-popover {
padding-left: 0;
}
.activity-timestamp {
color: $color-silver-chalice;
}
.navigational-breadcrumbs {
color: $color-silver-chalice;
}
}
}
.global-activities__top-actions{
.global-activities__top-actions {
grid-area: actions;
a {
color: $color-emperor;
}
}
.global-activities__search-container{

View file

@ -139,7 +139,10 @@ module ApplicationHelper
end
# Generate smart annotation link for one user object
def popover_for_user_name(user, team = nil, skip_user_status = false)
def popover_for_user_name(user,
team = nil,
skip_user_status = false,
skip_avatar = false)
user_still_in_team = user.teams.include?(team)
user_description = %(<div class='col-xs-4'>
@ -166,10 +169,16 @@ module ApplicationHelper
user_name = user.full_name
html = if skip_avatar
''
else
raw("<img src='#{user_avatar_absolute_url(user, :icon_small)}'" \
"alt='avatar' class='atwho-user-img-popover'" \
" ref='#{'missing-img' if missing_avatar(user, :icon_small)}'>")
end
html =
raw("<img src='#{user_avatar_absolute_url(user, :icon_small)}'" \
"alt='avatar' class='atwho-user-img-popover'" \
" ref='#{'missing-img' if missing_avatar(user, :icon_small)}'>") +
raw(html) +
raw('<a onClick="$(this).popover(\'show\')" ' \
'class="atwho-user-popover" data-container="body" ' \
'data-html="true" tabindex="0" data-trigger="focus" ' \

View file

@ -0,0 +1,74 @@
# frozen_string_literal: true
module GlobalActivitiesHelper
include ActionView::Helpers::AssetTagHelper
include ActionView::Helpers::UrlHelper
include InputSanitizeHelper
def generate_activity_content(activity)
parameters = {}
activity.values[:parameters].each do |key, value|
parameters[key] =
if value.is_a? String
value
else
public_send("activity_#{value[:type].underscore}_link",
value[:id],
value[:name])
end
end
I18n.t("activities.content.#{activity.type_of}_html", parameters)
end
def team_link(id, name)
team = Team.find_by_id(id)
return name unless team
route_to_other_team projects_path(team: team), team, team.name
end
def activity_project_link(id, name)
project = Project.find_by_id(id)
return name unless project
link_to project.name, project_path(project)
end
def activity_experiment_link(id, name)
experiment = Experiment.find_by_id(id)
return name unless experiment
link_to experiment.name, canvas_experiment_path(experiment)
end
def activity_my_module_link(id, name)
task = MyModule.find_by_id(id)
return name unless task
link_to experiment.name, protocols_my_module_path(task)
end
def activity_protocol_link(id, name)
protocol = Protocol.find_by_id(id)
return name unless protocol
if protocol.in_repository?
route_to_other_team protocols_path, protocol.team, protocol.name
else
link_to protocol.name, protocols_my_module_path(protocol.my_module)
end
end
def activity_result_link(id, name)
result = Result.find_by_id(id)
return name unless result
link_to result.name, results_my_module_path(result.my_module)
end
def activity_inventory_link(id, name)
inventory = Repository.find_by_id(id)
return name unless inventory
link_to inventory.name, repository_path(inventory)
end
def activity_inventory_item_link(id, name)
item = RepositoryRow.find_by_id(id)
return name unless item
link_to item.name, repository_path(item.repository)
end
end

View file

@ -7,15 +7,17 @@ module SearchHelper
experiments.uniq
end
def route_to_other_team(path, search_team, text)
def route_to_other_team(path, search_team, text, html = {})
if search_team != current_team
link_to text,
path,
data: { turbolinks: false,
confirm: t('users.settings.changed_team_in_search',
team: search_team.name) }
html.merge(
data: { turbolinks: false,
confirm: t('users.settings.changed_team_in_search',
team: search_team.name) }
)
else
link_to text, path, data: { turbolinks: false }
link_to text, path, html.merge(data: { turbolinks: false })
end
end

View file

@ -0,0 +1,24 @@
<div class="activity-card">
<div class="row">
<div class="col-xs-12">
<% if activity.owner.present? %>
<%= popover_for_user_name(activity.owner, activity.team, false, true) %>
<% else %>
<strong><%= activity.owner_id %></strong>
<% end %>
<%= generate_activity_content(activity) %>
</div>
</div>
<div class="pull-left activity-timestamp">
<%= activity.created_at.strftime('%H:%M') %>
</div>
<div class="row navigational-breadcrumbs">
<% if activity.subject_type.present? %>
<%= render partial: "global_activities/references/#{activity.subject_type.underscore}.html.erb",
locals: { subject: activity.subject, breadcrumbs: activity.values[:breadcrumbs] } %>
<% else %>
<%= render partial: "global_activities/references/result.html.erb",
locals: { subject: activity.subject, breadcrumbs: activity.values[:breadcrumbs] } %>
<% end %>
</div>
</div>

View file

@ -0,0 +1,28 @@
<% @grouped_activities.each do |date, activities| %>
<div class="row">
<div class="col-sm-4 col-md-2">
<a class="activities-group-expand-button"
href="#"
id="activities-group-<%= date %>-button"
data-toggle="collapse"
data-turbolinks="false"
data-target="#activities-group-<%= date %>">
<span class="fas fa-caret-down"></span>
<%= l(Time.parse(date), format: :full_date) %>
</a>
</div>
<div class="col-sm-8 col-md-10">
<div class="activities-counter-label">
<strong><%= activities.length %></strong>
<%= t("activities.index.#{'activity'.pluralize(activities.length)}_counter_label") %>
</div>
<ul class="collapse in activities-group" id="activities-group-<%= date %>">
<% activities.each do |activity| %>
<li class="activity-card">
<%= render partial: 'activity.html.erb', locals: { activity: activity } %>
</li>
<% end %>
</ul>
</div>
</div>
<% end %>

View file

@ -1,3 +1,5 @@
<% provide :head_title, t('nav.label.activities') %>
<div class="global-activities__container">
<br>
<div class="global-activities__top">
@ -6,9 +8,15 @@
<div class="global-activities__main">
<div class="global-activities__top-actions">
<span><i class="fas fa-caret-square-down"></i> Expand All</span>
<a id="global-activities-expand-all" href="#" data-turbolinks="false">
<i class="fas fa-caret-square-down"></i>
<%= t('activities.index.expand_all') %>
</a>
&nbsp;&nbsp;
<span><i class="fas fa-caret-square-up"></i> Colapse All</span>
<a id="global-activities-colapse-all" href="#" data-turbolinks="false">
<i class="fas fa-caret-square-up"></i>
<%= t('activities.index.collapse_all') %>
</a>
</div>
<div class="global-activities__search-container">
<div class="input-group">
@ -18,10 +26,15 @@
</span>
</div>
</div>
<div class="global-activities_activities-list">
<h2>list of activities</h2>
<div class="global-activities_activities-list" data-activities-url="<%= global_activities_path %>">
<%= render partial: "activity_list.html.erb" %>
</div>
<div class="text-center">
<a class="btn btn-default btn-more-activities <%= 'hidden' unless @more_activities %>"
data-next-date="<%= @next_date %>">
<%= t'activities.index.more_activities' %>
</a>
</div>
</div>
<div class="global-activities__side">
@ -29,3 +42,5 @@
</div>
</div>
<%= javascript_include_tag 'global_activities/index.js' %>

View file

@ -0,0 +1,14 @@
<%= render partial: "global_activities/references/project.html.erb",
locals: { subject: subject&.project } %>
<div class="col-xs-2">
<%= image_tag 'icon_small/experiment.svg' %>
<% if subject %>
<%= link_to experiment_path(subject), title: subject.name do %>
<%= subject.name.truncate(Constants::NAME_TRUNCATION_LENGTH) %>
<% end %>
<% else %>
<span title="<%= breadcrumbs[:experiment] %>">
<%= breadcrumbs[:experiment].truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
</div>

View file

@ -0,0 +1,14 @@
<%= render partial: "global_activities/references/experiment.html.erb",
locals: { subject: subject&.experiment } %>
<div class="col-xs-2">
<%= image_tag 'icon_small/task.svg' %>
<% if subject %>
<%= link_to my_module_path(subject), title: subject.name do %>
<%= subject.name.truncate(Constants::NAME_TRUNCATION_LENGTH) %>
<% end %>
<% else %>
<span title="<%= breadcrumbs[:my_module] %>">
<%= breadcrumbs[:my_module].truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
</div>

View file

@ -0,0 +1,14 @@
<%= render partial: "global_activities/references/team.html.erb",
locals: { subject: subject&.team } %>
<div class="col-xs-2">
<%= image_tag 'icon_small/project.svg' %>
<% if subject %>
<%= link_to project_path(subject), title: subject.name do %>
<%= subject.name.truncate(Constants::NAME_TRUNCATION_LENGTH) %>
<% end %>
<% else %>
<span title="<%= breadcrumbs[:project] %>">
<%= breadcrumbs[:project].truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
</div>

View file

@ -0,0 +1,19 @@
<%= render partial: "global_activities/references/my_module.html.erb",
locals: { subject: subject&.my_module } %>
<div class="col-xs-2">
<span class="fas fa-edit"></span>
<% if subject %>
<% if subject.in_repository %>
<%= route_to_other_team protocols_path(team: subject.team),
subject.team,
subject.name.truncate(Constants::NAME_TRUNCATION_LENGTH),
title: subject.name %>
<% else %>
<%= link_to truncated_name, protocols_my_module_path(subject.my_module), title: subject.name %>
<% end %>
<% else %>
<span title="<%= breadcrumbs[:protocol] %>">
<%= breadcrumbs[:protocol].truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
</div>

View file

@ -0,0 +1,14 @@
<%= render partial: "global_activities/references/team.html.erb",
locals: { subject: subject&.team } %>
<div class="col-xs-2">
<%= image_tag 'icon_small/report.png' %>
<% if subject %>
<%= link_to reports_path(subject), title: subject.name do %>
<%= subject.name.truncate(Constants::NAME_TRUNCATION_LENGTH) %>
<% end %>
<% else %>
<span title="<%= breadcrumbs[:report] %>">
<%= breadcrumbs[:report].truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
</div>

View file

@ -0,0 +1,14 @@
<%= render partial: "global_activities/references/team.html.erb",
locals: { subject: subject&.team } %>
<div class="col-xs-2">
<span class="fas fa-list-alt"></span>
<% if subject %>
<%= link_to repositories_path(subject), title: subject.name do %>
<%= subject.name.truncate(Constants::NAME_TRUNCATION_LENGTH) %>
<% end %>
<% else %>
<span title="<%= breadcrumbs[:repository] %>">
<%= breadcrumbs[:repository].truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
</div>

View file

@ -0,0 +1,14 @@
<%= render partial: "global_activities/references/my_module.html.erb",
locals: { subject: subject&.my_module } %>
<div class="col-xs-2">
<%= image_tag 'icon_small/result.png' %>
<% if subject %>
<%= link_to results_my_module_path(subject.my_module), title: subject.name do %>
<%= subject.name.truncate(Constants::NAME_TRUNCATION_LENGTH) %>
<% end %>
<% else %>
<span title="<%= breadcrumbs[:result] %>">
<%= breadcrumbs[:result].truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
</div>

View file

@ -0,0 +1,13 @@
<div class="col-xs-2">
<span class="fas fa-users"></span>
<% if subject %>
<%= route_to_other_team projects_path(team: subject.id),
subject,
subject.name.truncate(Constants::NAME_TRUNCATION_LENGTH),
title: subject.name %>
<% else %>
<span title="<%= breadcrumbs[:team] %>">
<%= breadcrumbs[:team].truncate(Constants::NAME_TRUNCATION_LENGTH) %>
</span>
<% end %>
</div>

View file

@ -89,6 +89,7 @@ Rails.application.config.assets.precompile +=
Rails.application.config.assets.precompile +=
%w(repositories/my_module_repository.js)
Rails.application.config.assets.precompile += %w(activities/index.js)
Rails.application.config.assets.precompile += %w(global_activities/index.js)
Rails.application.config.assets.precompile += %w(repository_columns/index.js)
Rails.application.config.assets.precompile += %w(repositories/show.js)
Rails.application.config.assets.precompile += %w(sidebar_toggle.js)

View file

@ -1304,8 +1304,12 @@ en:
activities:
index:
today: "Today"
more_activities: "More Activities"
more_activities: "Show more activities"
no_activities: "No activities!"
activity_counter_label: " activity"
activities_counter_label: " activities"
expand_all: "Expand all"
collapse_all: "Collapse all"
modal:
modal_title: "Activities"
create_project: "<i>%{user}</i> created project <strong>%{project}</strong>."
@ -1372,6 +1376,98 @@ en:
create_report: "<i>%{user}</i> created report <strong>%{report}</strong>."
delete_report: "<i>%{user}</i> deleted report <strong>%{report}</strong>."
edit_report: "<i>%{user}</i> edited report <strong>%{report}</strong>."
content:
create_project_html: "created project %{project}."
rename_project_html: "renamed project %{project}."
change_project_visibility_html: "changed project %{project}'s visibility to %{visibility}."
archive_project_html: "moved project %{project} to archive."
restore_project_html: "restored project %{project} from archive."
add_comment_to_project_html: "commented on project %{project}."
edit_project_comment_html: "edited comment on project %{project}."
delete_project_comment_html: "deleted comment on project %{project}."
create_report_html: "created report %{report}."
edit_report_html: "edited report %{report}."
delete_report_html: "deleted report %{report}."
add_result_html: "added %{result_type} result %{result} to task."
edit_result_html: "edited %{result_type} result %{result}."
add_comment_to_result_html: "commented on result %{result}."
edit_result_comment_html: "edited comment on result %{result}."
delete_result_comment_html: "deleted comment on result %{result}."
archive_result_html: "archived %{result_type] result %{result}."
destroy_result_html: "deleted %{result_type] result %{result}."
create_module_html: "created task %{task}."
clone_module_html: "copied task %{new_task} from task %{original_task} as template."
archive_module_html: "archived task %{task}."
restore_module_html: "restored task %{task} from archive."
add_comment_to_module_html: "commented on task %{task}."
edit_module_comment_html: "edited comment on task %{task}."
delete_module_comment_html: "deleted comment on task %{task}."
change_module_description_html: "edited task %{task]'s description."
create_step_html: "created protocol step %{step_num} %{step_name]."
edit_step_html: "edited protocol step %{step_num] %{step_name]."
destroy_step_html: "deleted protocol step %{step_num} %{step_name}."
load_protocol_from_repository_html: "loaded protocol %{protocol] to task %{task} from Protocol repository."
load_protocol_from_file_html: "loaded protocol %{protocol] to task %{task} from file."
revert_protocol_html: "reverted protocol %{protocol] to Protocol repository version."
check_step_checklist_item_html: completed checklist item %{checkbox] (%{completed_counter} completed) in step %{step_num} %{step_name}."
uncheck_step_checklist_item_html: "uncompleted checklist item %{checkbox] (%{completed_counter} completed) in step %{step_num} %{step_name}."
add_comment_to_step_html: "commented on step %{step_num} %{step_name}."
edit_step_comment_html: "edited comment on step %{step_num} %{step_name}."
delete_step_comment_html: "deleted comment on step %{step_num} %{step_name}."
complete_step_html: "completed step %{step_num} %{step_name} (%{completed_counter} completed)."
uncomplete_step_html: "uncompleted step %{step_num} %{step_name} (%{completed_counter} completed)."
uncomplete_task_html: "uncompleted task %{task}."
complete_task_html: "completed task %{task}."
assign_repository_record_html: "assigned inventory item(s) %{items} from inventory %{inventory} to task %{task}."
unassign_repository_record_html: "unassigned inventory item(s) %{items} from inventory %{inventory} to task %{task}."
assign_user_to_project_html: "assigned user %{user} with user role %{role} to project %{project}."
unassign_user_from_project_html: "removed user %{user} from project %{project}."
change_user_role_on_project_html: "changed %{user}'s role on project %{project} to %{role}."
assign_user_to_module_html: "assigned user %{user} to task %{task}."
unassign_user_from_module_html: "removed user %{user} from task %{task}."
create_experiment_html: "created experiment %{experiment}."
edit_experiment_html: "edited experiment %{experiment}."
move_experiment_html: "moved experiment %{experiment} from project %{original_project} to project %{new_project}."
clone_experiment_html: "copied experiment %{new_experiment} from experiment %{original_experiment} as a template."
archive_experiment_html: "archived experiment %{experiment}."
start_edit_wopi_file_result_html: "edited Office online file %{file_name} on result %{result_name}: %{action}."
start_edit_wopi_file_step_html: "edited Office online file %{file_name} on step %{step_num} %{step_name}: %{action}."
restore_experiment_html: "restored experiment %{experiment}"
rename_task_html: "renamed task %{task}"
move_task_html: "moved task %{task} from experiment %{experiment_original} to experiment %{experiment_new}"
archive_task_html: "archived task %{task}"
set_task_due_date_html: "set due date %{date} on task %{task}"
change_task_due_date_html: "changed due date %{date} on task %{task}"
remove_task_due_date_html: "removed due date %{date} on task %{task}"
add_task_tag_html: "added tag %{tag} to task %{task}"
edit_task_tag_html: "edited tag %{tag} on task %{task}"
remove_task_tag_html: "removed tag %{tag} from task %{task}"
create_inventory_html: "created inventory %{inventory}"
rename_inventory_html: "renamed inventory %{inventory}"
delete_inventory_html: "deleted inventory %{inventory}"
create_item_inventory_html: "created inventory item %{item}"
edit_item_inventory_html: "edited inventory item %{item}"
delete_item_inventory_html: "deleted inventory item %{item}"
create_column_inventory_html: "created column %{column} in inventory %{inventory}"
edit_column_inventory_html: "edited column %{column} in inventory %{inventory}"
delete_column_inventory_html: "deleted column %{column} in inventory %{inventory}"
create_protocol_in_repository_html: "created protocol %{protocol} in Protocol repository"
add_step_to_protocol_repository_html: "created protocol %{protocol}'s step %{step} in Protocol repository"
edit_step_in_protocol_repository_html: "edited protocol %{protocol}'s step %{step} in Protocol repository"
delete_step_in_protocol_repository_html: "deleted protocol %{protocol}'s step %{step} in Protocol repository"
edit_description_in_protocol_repository_html: "edited protocol %{protocol}'s description in Protocol repository"
edit_keywords_in_protocol_repository_html: "edited protocol %{protocol}'s keywords in Protocol repository"
edit_authors_in_protocol_repository_html: "edited protocol %{protocol}'s authors in Protocol repository"
archive_protocol_in_repository_html: "archived protocol %{protocol} in Protocol repository"
restore_protocol_in_repository_html: "restored protocol %{protocol} from archive in Protocol repository"
move_protocol_in_repository_html: "moved protocol %{protocol} from %{protocol_storage}"
import_protocol_in_repository_html: "imported protocol %{protocol} to Protocol repository from file"
export_protocol_in_repository_html: "exported protocol %{protocol} from Protocol repository"
invite_user_to_team_html: "invited user %{user} to team %{team} with user role %{user_role}"
remove_user_from_team_html: "removed user %{user} from team %{team}"
change_users_role_on_team_html: "changed %{user}'s role in team %{team} to %{role}"
export_projects_html: "exported project(s) %{projects} to .zip"
export_inventory_items_html: "exported inventory item(s) from %{inventory}"
user_my_modules:
new:

View file

@ -649,6 +649,7 @@ Rails.application.routes.draw do
end
resources :global_activities, only: [:index]
post 'global_activities', to: 'global_activities#index'
namespace :global_activities do
get 'search_subjects', to: 'global_activities#search_subjects',
as: 'search_subjects'

View file

@ -24,7 +24,7 @@
"@fortawesome/fontawesome-free": "^5.2.0",
"babel-eslint": "^8.2.6",
"babel-plugin-transform-react-jsx-source": "^6.22.0",
"eslint": "^5.3.0",
"eslint": "^5.14.1",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-airbnb-base": "^13.0.0",
"eslint-config-google": "^0.9.1",