diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 0ca22843..52807f0b 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -35,7 +35,6 @@ class DmsfController < ApplicationController before_action :find_folder_by_title, only: [:show] before_action :get_query, only: [:expand_folder, :show, :trash, :empty_trash, :index] before_action :get_project_roles, only: [:new, :edit, :create, :save] - before_action :text_formating, only: [:show, :edit, :edit_root] accept_api_auth :show, :create, :save, :delete @@ -709,8 +708,4 @@ class DmsfController < ApplicationController members: { project_id: @project.id }).distinct end - def text_formating - @wiki = Setting.text_formatting != 'HTML' - end - end diff --git a/app/controllers/dmsf_files_controller.rb b/app/controllers/dmsf_files_controller.rb index 0f6e2afb..12d821ed 100644 --- a/app/controllers/dmsf_files_controller.rb +++ b/app/controllers/dmsf_files_controller.rb @@ -83,7 +83,6 @@ class DmsfFilesController < ApplicationController @file_manipulation_allowed = User.current.allowed_to?(:file_manipulation, @project) @revision_count = @file.dmsf_file_revisions.visible.all.size @revision_pages = Paginator.new @revision_count, params['per_page'] ? params['per_page'].to_i : 25, params['page'] - @wiki = Setting.text_formatting != 'HTML' respond_to do |format| format.html { diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb index 63d2a44c..4e4313c1 100644 --- a/app/controllers/dmsf_upload_controller.rb +++ b/app/controllers/dmsf_upload_controller.rb @@ -29,7 +29,6 @@ class DmsfUploadController < ApplicationController before_action :authorize_global, only: [:upload, :delete_dmsf_attachment, :delete_dmsf_link_attachment] before_action :find_folder, except: [:upload, :commit, :delete_dmsf_attachment, :delete_dmsf_link_attachment] before_action :permissions, except: [:upload, :commit, :delete_dmsf_attachment, :delete_dmsf_link_attachment] - before_action :wiki, only: [:multi_upload, :upload_files] helper :all helper :dmsf_workflows @@ -145,8 +144,4 @@ class DmsfUploadController < ApplicationController render_403 end - def wiki - @wiki = Setting.text_formatting != 'HTML' - end - end diff --git a/app/views/dmsf/_description.html.erb b/app/views/dmsf/_description.html.erb index 654805c0..e4e1004f 100644 --- a/app/views/dmsf/_description.html.erb +++ b/app/views/dmsf/_description.html.erb @@ -22,14 +22,8 @@ <% if @project %>
- <%= f.text_area :description, rows: 8, class: @wiki ? 'wiki-edit' : 'dmsf-description' %> + <%= f.text_area :description, rows: 8, class: 'wiki-edit dmsf-description' %>
<% dir = @folder.inherited_permissions_from %> @@ -140,6 +140,6 @@
- <%= f.text_area :dmsf_description, rows: 8, class: @wiki ? 'wiki-edit' : 'dmsf-description', - label: l(:field_description) %> + <%= f.text_area :dmsf_description, rows: 8, class: 'wiki-edit dmsf-description', label: l(:field_description) %>
- <%= f.text_area :description, rows: 6, class: wiki ? 'wiki-edit' : 'dmsf-description' %> + <%= f.text_area :description, rows: 6, class: 'wiki-edit dmsf-description' %>
- <%= f.text_area :comment, rows: 2, label: l(:label_comment), class: wiki ? 'wiki-edit' : 'dmsf-description' %> + <%= f.text_area :comment, rows: 2, label: l(:label_comment), class: 'wiki-edit dmsf-description' %>
<%= label_tag "commited_files[#{i}][description]", l(:label_description) %> <%= text_area_tag "commited_files[#{i}][description]", upload.description, rows: 6, - class: wiki ? 'wiki-edit' : 'dmsf-description' %> + class: 'wiki-edit dmsf-description' %>
<%= label_tag "commited_files[#{i}][comment]", l(:label_comment) %> - <%= text_area_tag "commited_files[#{i}][comment]", upload.comment, rows: 2, - class: wiki ? 'wiki-edit' : 'dmsf-description' %> + <%= text_area_tag "commited_files[#{i}][comment]", upload.comment, rows: 2, class: 'wiki-edit dmsf-description' %>