Class: PerUserStatus::Hooks

Inherits:
Redmine::Hook::ViewListener
  • Object
show all
Defined in:
lib/per_user_status/hooks.rb

Overview

Add custom CSS file to layout and includes an additional input field into the account settings and the user’s administration pages

Defined Under Namespace

Classes: FormExtender

Instance Method Summary collapse

Instance Method Details

#view_layouts_base_html_head(_context) ⇒ Object

Inject stylesheet tags

Parameters:

  • _context (Hash)

    ignored



7
8
9
# File 'lib/per_user_status/hooks.rb', line 7

def view_layouts_base_html_head(_context)
  stylesheet_link_tag "per_user_status", plugin: "per_user_status"
end

#view_my_account(context) ⇒ Object

Inject input field into “My account” form

Parameters:

  • context (Hash)

    hook context



13
14
15
# File 'lib/per_user_status/hooks.rb', line 13

def (context)
  extend_form(context)
end

#view_users_form(context) ⇒ Object

Inject input field into “Edit user” form

Parameters:

  • context (Hash)

    hook context



19
20
21
# File 'lib/per_user_status/hooks.rb', line 19

def view_users_form(context)
  extend_form(context)
end