Feature #1102 ยป assign-to-me.patch
| app/views/issues/_form.rhtml (working copy) | ||
|---|---|---|
| 23 | 23 |
<% end %> |
| 24 | 24 | |
| 25 | 25 |
<p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p>
|
| 26 |
<p><%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %></p>
|
|
| 26 |
<p><%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %>
|
|
| 27 |
<%= link_to_function(l(:label_issue_assign_to_me), "setSelectedIndexByValue('issue_assigned_to_id', '#{User.current.id}')") if User.current.logged? and @issue.assignable_users.any? {|u| u.id == User.current.id} %>
|
|
| 28 |
</p> |
|
| 27 | 29 |
<p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %>
|
| 28 | 30 |
<%= prompt_to_remote(l(:label_issue_category_new), |
| 29 | 31 |
l(:label_issue_category_new), 'category[name]', |
| lang/en.yml (working copy) | ||
|---|---|---|
| 257 | 257 |
label_issue_category: Issue category |
| 258 | 258 |
label_issue_category_plural: Issue categories |
| 259 | 259 |
label_issue_category_new: New category |
| 260 |
label_issue_assign_to_me: Assign to me |
|
| 260 | 261 |
label_custom_field: Custom field |
| 261 | 262 |
label_custom_field_plural: Custom fields |
| 262 | 263 |
label_custom_field_new: New custom field |
| public/javascripts/application.js (working copy) | ||
|---|---|---|
| 10 | 10 |
} |
| 11 | 11 |
} |
| 12 | 12 | |
| 13 |
/** |
|
| 14 |
* Sets the selected option for given select +s+ |
|
| 15 |
* to index corresponding |
|
| 16 |
*/ |
|
| 17 |
function setSelectedIndexByValue(id, value) {
|
|
| 18 |
var s = document.getElementById(id); |
|
| 19 |
for (var ii = 0; ii < s.options.length; ii++) {
|
|
| 20 |
if (value == s.options[ii].value) {
|
|
| 21 |
s.selectedIndex = ii; |
|
| 22 |
return; |
|
| 23 |
} |
|
| 24 |
} |
|
| 25 |
} |
|
| 26 | ||
| 13 | 27 |
var fileFieldCount = 1; |
| 14 | 28 | |
| 15 | 29 |
function addFileField() {
|