Access to user's preferencies via properties
This commit is contained in:
parent
d8e7413da3
commit
303d235324
@ -576,7 +576,7 @@ class DmsfController < ApplicationController
|
||||
|
||||
def tree_view
|
||||
tag = params[:custom_field_id].present? && params[:custom_value].present?
|
||||
@tree_view = (User.current.pref[:dmsf_tree_view] == '1') && (!%w(atom xml json).include?(params[:format])) && !tag
|
||||
@tree_view = (User.current.pref.dmsf_tree_view == '1') && (!%w(atom xml json).include?(params[:format])) && !tag
|
||||
end
|
||||
|
||||
def copy_folder(folder)
|
||||
|
||||
@ -358,7 +358,7 @@ class DmsfFilesController < ApplicationController
|
||||
|
||||
def tree_view
|
||||
tag = params[:custom_field_id].present? && params[:custom_value].present?
|
||||
@tree_view = (User.current.pref[:dmsf_tree_view] == '1') && (!%w(atom xml json).include?(params[:format])) && !tag
|
||||
@tree_view = (User.current.pref.dmsf_tree_view == '1') && (!%w(atom xml json).include?(params[:format])) && !tag
|
||||
end
|
||||
|
||||
end
|
||||
@ -93,7 +93,7 @@ module RedmineDmsf
|
||||
end
|
||||
|
||||
def view_issues_edit_notes_bottom_style(context={})
|
||||
if (User.current.pref[:dmsf_attachments_upload_choice] == 'Attachments') ||
|
||||
if (User.current.pref.dmsf_attachments_upload_choice == 'Attachments') ||
|
||||
!allowed_to_attach_documents(context[:container])
|
||||
''
|
||||
else
|
||||
@ -148,7 +148,7 @@ module RedmineDmsf
|
||||
container = context[:container]
|
||||
if allowed_to_attach_documents(container)
|
||||
html = (description ? '<p' : '<div')
|
||||
html << " style=\"#{(User.current.pref[:dmsf_attachments_upload_choice] == 'Attachments') ? 'display: none;' : ''}\">"
|
||||
html << " style=\"#{(User.current.pref.dmsf_attachments_upload_choice == 'Attachments') ? 'display: none;' : ''}\">"
|
||||
if label
|
||||
html << "<label>#{l(:label_document_plural)}</label>"
|
||||
html << "<span class=\"attachments-container dmsf_uploader\">"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user