Workflows index
This commit is contained in:
@@ -6,4 +6,14 @@ module ApplicationHelper
|
||||
|
||||
url_for(controller: controller_name, action: :index, project:)
|
||||
end
|
||||
|
||||
def mask_icon(icon, **options)
|
||||
# Renders a span as a masked icon
|
||||
case options[:class]
|
||||
when String then options[:class] += ' mask-icon'
|
||||
when nil then options[:class] = 'mask-icon'
|
||||
else options[:class] = Array(options[:class]) + ['mask-icon']
|
||||
end
|
||||
content_tag(:span, '', style: "--icon: url(#{image_path(icon)})", **options)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
module ProjectAdmin::WorkflowsHelper
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ProjectAdminHelper
|
||||
def project_admin_frame(project, &)
|
||||
tabs_id = 'project_admin_tabs'
|
||||
tabs = ProjectAdmin::TabsViewModel.new(project, frame: :project_admin, id: tabs_id)
|
||||
content = capture(&) if block_given?
|
||||
|
||||
render partial: 'project_admin/frame', locals: { id: :project_admin, tabs:, tabs_id:, content: }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user