mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 11:57:16 +08:00
Fix hoover tooltip for company logo [SCI-7766] (#4827)
This commit is contained in:
parent
1e01d1f2b7
commit
56fb8a4efa
3 changed files with 5 additions and 4 deletions
|
@ -7,7 +7,7 @@ class LabelTemplatesController < ApplicationController
|
||||||
before_action :check_view_permissions, except: %i(create duplicate set_default delete update)
|
before_action :check_view_permissions, except: %i(create duplicate set_default delete update)
|
||||||
before_action :check_manage_permissions, only: %i(create duplicate set_default delete update)
|
before_action :check_manage_permissions, only: %i(create duplicate set_default delete update)
|
||||||
before_action :load_label_templates, only: %i(index datatable)
|
before_action :load_label_templates, only: %i(index datatable)
|
||||||
before_action :load_label_template, only: %i(show set_default update)
|
before_action :load_label_template, only: %i(show set_default update template_tags)
|
||||||
|
|
||||||
layout 'fluid'
|
layout 'fluid'
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ class LabelTemplatesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def template_tags
|
def template_tags
|
||||||
render json: LabelTemplates::TagService.new(current_team).tags
|
render json: LabelTemplates::TagService.new(current_team, @label_template).tags
|
||||||
end
|
end
|
||||||
|
|
||||||
def zpl_preview
|
def zpl_preview
|
||||||
|
|
|
@ -15,7 +15,7 @@ class LabelTemplateSerializer < ActiveModel::Serializer
|
||||||
return {} unless can_manage_label_templates?(object.team)
|
return {} unless can_manage_label_templates?(object.team)
|
||||||
{
|
{
|
||||||
update: label_template_path(object),
|
update: label_template_path(object),
|
||||||
fields: template_tags_label_templates_path
|
fields: template_tags_label_templates_path(id: object.id)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,8 +9,9 @@ module LabelTemplates
|
||||||
{ key: 'added_by', tag: '{{ADDED_BY}}' }
|
{ key: 'added_by', tag: '{{ADDED_BY}}' }
|
||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
def initialize(team)
|
def initialize(team, label_template)
|
||||||
@team = team
|
@team = team
|
||||||
|
@label_template = label_template
|
||||||
end
|
end
|
||||||
|
|
||||||
def tags
|
def tags
|
||||||
|
|
Loading…
Add table
Reference in a new issue