Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/models/redmine_ckeditor_setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ def self.toolbar_location
setting["toolbar_location"] || "top"
end

def self.show_bottom_bar
setting[:show_bottom_bar].present? && setting[:show_bottom_bar].to_i == 1
end

def self.width
setting["width"]
end
Expand Down
5 changes: 5 additions & 0 deletions app/views/settings/_ckeditor.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
<%= content_tag :label, l(:ckeditor_toolbar_location) %>
<%= select_tag "settings[toolbar_location]", RedmineCkeditor.toolbar_location_options %>
</p>
<p>
<%= content_tag :label, l(:ckeditor_show_bottom_bar) %>
<%= hidden_field_tag "settings[show_bottom_bar]", 0 %>
<%= check_box_tag "settings[show_bottom_bar]", 1, RedmineCkeditorSetting.show_bottom_bar %>
</p>
<p>
<%= content_tag :label, l(:ckeditor_toolbar_buttons) %>
</p>
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ en:
ckeditor_toolbar_can_collapse: Toolbar can collapse
ckeditor_toolbar_location: Toolbar location
ckeditor_toolbar_buttons: Toolbar buttons
ckeditor_show_bottom_bar: Show bottom bar
ckeditor_width: Width
ckeditor_height: Height
add: Add
Expand Down
1 change: 1 addition & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ fr:
ckeditor_startup_show_blocks: Montrer les blocs au démarrage
ckeditor_toolbar_can_collapse: La barre d'outil peut être réduite
ckeditor_toolbar_location: "Emplacement de la barre d'outil"
ckeditor_show_bottom_bar: "Afficher la barre de navigation inférieure"
ckeditor_toolbar_buttons: "Préférences de la barre d'outil CKEditor"
ckeditor_width: Largeur
ckeditor_height: Hauteur
Expand Down
4 changes: 3 additions & 1 deletion lib/redmine_ckeditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ def options(scope_object = nil)
:toolbarLocation => RedmineCkeditorSetting.toolbar_location,
:toolbar => RedmineCkeditorSetting.toolbar,
:width => RedmineCkeditorSetting.width,
:height => RedmineCkeditorSetting.height
:height => RedmineCkeditorSetting.height,
:removePlugins => ckeditor_config[:removePlugins] + (RedmineCkeditorSetting.show_bottom_bar ? '':',elementspath'),
:resize_enabled => RedmineCkeditorSetting.show_bottom_bar
}))
end

Expand Down