mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-25 21:47:03 +08:00
Fix generation of docx report, fix rendering of modals [SCI-8911] (#5831)
This commit is contained in:
parent
962400b952
commit
8aa06bf4af
5 changed files with 6 additions and 14 deletions
|
|
@ -42,11 +42,6 @@ class GlobalActivitiesController < ApplicationController
|
|||
end
|
||||
@activity_types = Activity.activity_types_list
|
||||
|
||||
@user_list = User.where(id: current_user.teams.joins(:users).group('users.id').select('users.id'))
|
||||
.distinct
|
||||
.order(full_name: :asc)
|
||||
.pluck(:full_name, :id)
|
||||
|
||||
activities = ActivitiesService.load_activities(current_user, selected_teams, activity_filters)
|
||||
|
||||
@grouped_activities = activities.group_by do |activity|
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ class MyModuleTagsController < ApplicationController
|
|||
render json: {
|
||||
html_module_header: render_to_string(
|
||||
partial: 'my_modules/tags',
|
||||
locals: { my_module: @my_module, editable: can_manage_my_module?(@my_module) }
|
||||
locals: { my_module: @my_module, editable: can_manage_my_module?(@my_module) },
|
||||
formats: :html
|
||||
)
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -115,9 +115,7 @@ class MyModulesController < ApplicationController
|
|||
MyModule: [@my_module.id]
|
||||
}
|
||||
@activity_types = Activity.activity_types_list
|
||||
@user_list = User.where(id: UserTeam.where(team: current_user.teams).select(:user_id))
|
||||
.distinct
|
||||
.pluck(:full_name, :id)
|
||||
|
||||
activities = ActivitiesService.load_activities(current_user, current_team, activity_filters)
|
||||
|
||||
@grouped_activities = activities.group_by do |activity|
|
||||
|
|
|
|||
|
|
@ -175,9 +175,7 @@ class RepositoriesController < ApplicationController
|
|||
|
||||
def rename_modal
|
||||
render json: {
|
||||
html: render_to_string(
|
||||
partial: 'rename_repository_modal'
|
||||
)
|
||||
html: render_to_string(partial: 'rename_repository_modal', formats: :html)
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ module SmartAnnotations
|
|||
def parse_users_annotations(user, team, text)
|
||||
@text = text.gsub(USER_REGEX) do |el|
|
||||
match = el.match(USER_REGEX)
|
||||
user = User.find_by_id(match[2].base62_decode)
|
||||
user = team.users.find_by(id: match[2].base62_decode)
|
||||
next unless user
|
||||
next if UserTeam.where(user: user, team: team).blank?
|
||||
|
||||
user.full_name
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue