[#4420] Add the options for Retainers to select which month to display. (UI only).
This commit is contained in:
1 parent
d3052d7d54
commit
ad6766fd2f
3 files changed
+32
-2
No files matched your search
@@ -85,4 +85,15 @@ module ContractsHelper
|
||||
def format_value_field_for_contracts(value)
|
||||
number_with_precision(value, :precision => Contract::ViewPrecision, :delimiter => ',')
|
||||
end
|
||||
|
||||
def retainer_period_options(deliverable)
|
||||
options = []
|
||||
options << content_tag(:option, l(:label_all).capitalize, :value => '')
|
||||
|
||||
deliverable.months.collect do |month|
|
||||
options << content_tag(:option, month.strftime("%B %Y"), :value => month.strftime("%Y-%m"))
|
||||
end
|
||||
|
||||
options
|
||||
end
|
||||
end
|
||||
@@ -122,8 +122,8 @@
|
||||
<% if deliverable.retainer? %>
|
||||
<form action="">
|
||||
<fieldset>
|
||||
<select name="m">
|
||||
<option value="1">TODO: Release 2</option>
|
||||
<select name="retainer_period_change_<%= h(deliverable.id) %>" id="retainer_period_change_<%= h(deliverable.id) %>">
|
||||
<%= retainer_period_options(deliverable) %>
|
||||
</select>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
Reference in new issue
Block a user