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.

_repositories.rhtml 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <% form_tag({:action => 'edit', :tab => 'repositories'}) do %>
  2. <fieldset class="box tabular settings enabled_scm">
  3. <legend><%= l(:setting_enabled_scm) %></legend>
  4. <table>
  5. <tr>
  6. <th></th>
  7. <th></th>
  8. <th></th>
  9. <th><%= l(:text_scm_command) %></th>
  10. <th><%= l(:text_scm_command_version) %></th>
  11. </tr>
  12. <% Redmine::Scm::Base.all.collect do |choice| %>
  13. <% scm_class = "Repository::#{choice}".constantize %>
  14. <% text, value = (choice.is_a?(Array) ? choice : [choice, choice]) %>
  15. <% setting = :enabled_scm %>
  16. <tr>
  17. <td>
  18. <%=
  19. check_box_tag(
  20. "settings[#{setting}][]",
  21. value,
  22. Setting.send(setting).include?(value))
  23. %>
  24. </td>
  25. <td class="scm_name">
  26. <%= text.to_s %>
  27. </td>
  28. <td>
  29. <%=
  30. image_tag(
  31. (scm_class.scm_available ? 'true.png' : 'exclamation.png'),
  32. :style => "vertical-align:bottom;"
  33. )
  34. %>
  35. </td>
  36. <td>
  37. <%= scm_class.scm_command %>
  38. </td>
  39. <td>
  40. <%= scm_class.scm_version_string %>
  41. </td>
  42. </tr>
  43. <% end %>
  44. </table>
  45. <p class="scm_config">
  46. <%= l(:text_scm_config) %>
  47. </p>
  48. </fieldset>
  49. <div class="box tabular settings">
  50. <p><%= setting_check_box :autofetch_changesets %></p>
  51. <p><%= setting_check_box :sys_api_enabled,
  52. :onclick =>
  53. "if (this.checked) { Form.Element.enable('settings_sys_api_key'); } else { Form.Element.disable('settings_sys_api_key'); }" %></p>
  54. <p><%= setting_text_field :sys_api_key,
  55. :size => 30,
  56. :id => 'settings_sys_api_key',
  57. :disabled => !Setting.sys_api_enabled?,
  58. :label => :setting_mail_handler_api_key %>
  59. <%= link_to_function l(:label_generate_key),
  60. "if ($('settings_sys_api_key').disabled == false) { $('settings_sys_api_key').value = randomKey(20) }" %>
  61. </p>
  62. <p><%= setting_text_field :repositories_encodings, :size => 60 %><br />
  63. <em><%= l(:text_comma_separated) %></em></p>
  64. <p><%= setting_text_field :repository_log_display_limit, :size => 6 %></p>
  65. </div>
  66. <fieldset class="box tabular settings">
  67. <legend><%= l(:text_issues_ref_in_commit_messages) %></legend>
  68. <p><%= setting_text_field :commit_ref_keywords, :size => 30 %><br />
  69. <em><%= l(:text_comma_separated) %></em></p>
  70. <p><%= setting_text_field :commit_fix_keywords, :size => 30 %>
  71. &nbsp;<%= l(:label_applied_status) %>: <%= setting_select :commit_fix_status_id,
  72. [["", 0]] +
  73. IssueStatus.find(:all).collect{
  74. |status| [status.name, status.id.to_s]
  75. },
  76. :label => false %>
  77. &nbsp;<%= l(:field_done_ratio) %>: <%= setting_select :commit_fix_done_ratio,
  78. (0..10).to_a.collect {|r| ["#{r*10} %", "#{r*10}"] },
  79. :blank => :label_no_change_option,
  80. :label => false %>
  81. <br /><em><%= l(:text_comma_separated) %></em></p>
  82. <p><%= setting_check_box :commit_logtime_enabled,
  83. :onclick =>
  84. "if (this.checked) { Form.Element.enable('settings_commit_logtime_activity_id'); } else { Form.Element.disable('settings_commit_logtime_activity_id'); }"%></p>
  85. <p><%= setting_select :commit_logtime_activity_id,
  86. [[l(:label_default), 0]] +
  87. TimeEntryActivity.shared.all.collect{|activity| [activity.name, activity.id.to_s]},
  88. :disabled => !Setting.commit_logtime_enabled?%></p>
  89. </fieldset>
  90. <%= submit_tag l(:button_save) %>
  91. <% end %>