OpenProject is the leading open source project management software.
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.
 
 
 
 
 
 
openproject/app/views/shared/_settings.html.erb

69 lines
2.5 KiB

<% content_for :header_tags do %>
<%= javascript_include_tag 'lib/jquery-1.5.1.min.js', :plugin => 'redmine_backlogs' %>
<script type="text/javascript">
jQuery.noConflict();
jQuery(function($) {
var enable_apply = function () {
var tasktracker,
submit,
disable;
tasktracker = $("#settings_task_tracker").val();
submit = $('input[type=submit]');
disable = false;
$("#settings_story_trackers :selected").each(function(i, selected) {
disable = disable || ($(selected).attr('value') === tasktracker);
});
if (disable) {
submit.attr('disabled', 'disabled');
}
else {
submit.removeAttr('disabled');
}
};
$("#settings_task_tracker").change(enable_apply);
$("#settings_story_trackers").change(enable_apply);
enable_apply();
});
</script>
<% end %>
<p>
<%= label_tag("settings[story_trackers]", l(:backlogs_story_tracker)) %>
<%= select_tag("settings[story_trackers]",
options_from_collection_for_select(Tracker.all, :id, :name, Story.trackers), :multiple => true) %>
</p>
<p>
<%= label_tag("settings[task_tracker]", l(:backlogs_task_tracker)) %>
<%= select_tag("settings[task_tracker]",
options_from_collection_for_select(Tracker.all, :id, :name, Task.tracker)) %>
</p>
<p>
<%= label_tag("settings[show_statistics]", l('backlogs.show_statistics')) %>
<%= check_box_tag("settings[show_statistics]",
"1",
Setting.plugin_redmine_backlogs[:show_statistics]) %>
</p>
<p>
<%= label_tag("settings[points_burn_direction]", l(:backlogs_points_burn_direction)) %>
<%= select_tag("settings[points_burn_direction]",
options_for_select([[l(:label_points_burn_up), 'up'], [l(:label_points_burn_down), 'down']],
Setting.plugin_redmine_backlogs[:points_burn_direction])) %>
</p>
<p>
<%= label_tag("settings[card_spec]", l(:backlogs_card_specification)) %>
<%= select_tag("settings[card_spec]",
options_for_select(TaskboardCard::PageLayout::LABELS.keys.sort.collect{|label| [label, label]},
Setting.plugin_redmine_backlogs[:card_spec])) %>
</p>
<p>
<%= label_tag("settings[wiki_template]", l(:backlogs_wiki_template)) %>
<%= text_field_tag("settings[wiki_template]",
Setting.plugin_redmine_backlogs[:wiki_template]) %>
</p>