You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_general.html.erb 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <%= form_tag({:action => 'edit'}) do %>
  2. <div class="box tabular settings">
  3. <p><%= setting_text_field :app_title, :size => 30 %></p>
  4. <p><%= setting_text_area :welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit' %></p>
  5. <%= wikitoolbar_for 'settings_welcome_text' %>
  6. <p><%= setting_text_field :per_page_options, :size => 20 %>
  7. <em class="info"><%= l(:text_comma_separated) %></em></p>
  8. <p><%= setting_text_field :search_results_per_page, :size => 6 %>
  9. <p><%= setting_text_field :activity_days_default, :size => 6 %> <%= l(:label_day_plural) %></p>
  10. <p><%= setting_text_field :host_name, :size => 60 %>
  11. <em class="info"><%= l(:label_example) %>: <%= @guessed_host_and_path %></em></p>
  12. <p><%= setting_select :protocol, [['HTTP', 'http'], ['HTTPS', 'https']] %></p>
  13. <p><%= setting_select :text_formatting, Redmine::WikiFormatting.formats_for_select, :blank => :label_none %>
  14. <span id="common_mark_info" class="<%= "hidden" unless Setting.text_formatting == "common_mark" %>">
  15. <label class="block">
  16. <%= check_box_tag(nil, '', Redmine::Configuration['common_mark_enable_hardbreaks'] == true, disabled: true) %>
  17. Hardbreaks
  18. </label>
  19. <em class="info">
  20. <%= l(:text_setting_config_change) %>
  21. </em>
  22. </span>
  23. </p>
  24. <p><%= setting_check_box :cache_formatted_text %></p>
  25. <p><%= setting_select :wiki_compression, [['Gzip', 'gzip']], :blank => :label_none %></p>
  26. <p><%= setting_text_field :feeds_limit, :size => 6 %></p>
  27. <%= call_hook(:view_settings_general_form) %>
  28. </div>
  29. <%= submit_tag l(:button_save) %>
  30. <% end %>
  31. <%= javascript_tag do %>
  32. $('#settings_text_formatting').on('change', function(e){
  33. const formatter = e.target.value;
  34. const parent_block = document.getElementById("common_mark_info");
  35. if (formatter == "common_mark") {
  36. parent_block.classList.remove('hidden');
  37. } else {
  38. parent_block.classList.add('hidden');
  39. }
  40. });
  41. <% end %>