forked from beef/redmine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provides a MultiSelect capability for custom_fields
This commit provides various fixes to support 'multi-select' custom fields. These render as comma seperate single line lists when issues are displayed and drop-down lists when editing the issue. Filtering is also supported, allowing for filtering by: 'all' values have been selected 'no' values have been selected 1 or more specified values have been selected 1 or more specific values have not been selected (returns issues where none have been selected currently) I hope this proves useful for others.
- Loading branch information
Showing
7 changed files
with
128 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
<div class="splitcontentleft"> | ||
<% i = 0 %> | ||
<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %> | ||
<% @issue.custom_field_values.each do |value| %> | ||
<% i = 0 | ||
not_split_yet= true | ||
total_size= @issue.custom_field_values.inject(0) do |total_size, value| | ||
total_size + get_display_size_value(value) | ||
end | ||
split_on = (total_size / 2.0).ceil - 1 | ||
@issue.custom_field_values.each do |value| %> | ||
<p><%= custom_field_tag_with_label :issue, value %></p> | ||
<% if i == split_on -%> | ||
<% if i+ get_display_size_value(value) >= split_on && not_split_yet | ||
not_split_yet= false-%> | ||
</div><div class="splitcontentright"> | ||
<% end -%> | ||
<% i += 1 -%> | ||
<% i += get_display_size_value(value) -%> | ||
<% end -%> | ||
</div> | ||
<div style="clear:both;"> </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90213d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make this work for current available redmine 1.2?
90213d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, but I've not got the time or access to a 1.2v of redmine atm I'm afraid :(
90213d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is sad. Would be a great feature. And it seems there is currently no progress on this feature.