summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/wiki_controller.rb1
-rw-r--r--app/views/attachments/_form.html.erb1
-rw-r--r--config/initializers/30-redmine.rb20
3 files changed, 12 insertions, 10 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index 36b90da77..bcb3b0891 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -240,6 +240,7 @@ class WikiController < ApplicationController
# don't load text
@versions = @page.content.versions.
select("id, author_id, comments, updated_on, version").
+ preload(:author).
reorder('version DESC').
limit(@version_pages.per_page + 1).
offset(@version_pages.offset).
diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb
index c8bb84123..e5b10fb55 100644
--- a/app/views/attachments/_form.html.erb
+++ b/app/views/attachments/_form.html.erb
@@ -15,6 +15,7 @@
<% if saved_attachments.present? %>
<% saved_attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>">
+ <%= sprite_icon('attachment', icon_only: true, size: 16, css_class: 'svg-attachment') %>
<%= text_field_tag("#{attachment_param}[p#{i}][filename]", attachment.filename, :class => 'filename') %>
<% if attachment.container_id.present? %>
<%= link_to sprite_icon('del', l(:button_delete), icon_only: true), "#", :onclick => "$(this).closest('.attachments_form').find('.add_attachment').show(); $(this).parent().remove(); return false;", :class => 'icon-only icon-del' %>
diff --git a/config/initializers/30-redmine.rb b/config/initializers/30-redmine.rb
index d6477faca..16bcebec4 100644
--- a/config/initializers/30-redmine.rb
+++ b/config/initializers/30-redmine.rb
@@ -10,7 +10,17 @@ Rails.application.config.to_prepare do
ActiveSupport::XmlMini.backend = 'Nokogiri'
Redmine::Preparation.prepare
+end
+
+# Load the secret token from the Redmine configuration file
+secret = Redmine::Configuration['secret_token']
+if secret.present?
+ RedmineApp::Application.config.secret_token = secret
+end
+Redmine::PluginLoader.load
+
+Rails.application.config.to_prepare do
Doorkeeper.configure do
orm :active_record
@@ -76,17 +86,7 @@ Rails.application.config.to_prepare do
Doorkeeper::AuthorizationsController.layout "base"
Doorkeeper::AuthorizedApplicationsController.layout "base"
Doorkeeper::AuthorizedApplicationsController.main_menu = false
-end
-
-# Load the secret token from the Redmine configuration file
-secret = Redmine::Configuration['secret_token']
-if secret.present?
- RedmineApp::Application.config.secret_token = secret
-end
-Redmine::PluginLoader.load
-
-Rails.application.config.to_prepare do
default_paths = []
default_paths << Rails.root.join("app/assets/javascripts")
default_paths << Rails.root.join("app/assets/images")