[#4477] Added a paid field to track when a FixedBudget is spent
This commit is contained in:
1 parent
f8270498f3
commit
d4de581b3c
4 files changed
+20
-1
No files matched your search
@@ -85,6 +85,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<%= fixed_budget.text_field(:markup) %>
|
<%= fixed_budget.text_field(:markup) %>
|
||||||
|
|
||||||
|
<p class="inline-hints">
|
||||||
|
<%= fixed_budget.label(:paid, l(:field_paid), :style => 'display: none;') %><%# Hidden label :| %>
|
||||||
|
<%= l(:field_paid) %>
|
||||||
|
</p>
|
||||||
|
<%= fixed_budget.check_box(:paid) %>
|
||||||
|
|
||||||
<p class="inline-hints" style="display:none;"><%= fixed_budget.label(:description, l(:field_description), :for => "fixed-description#{fixed_budget.object.object_id}")%></p>
|
<p class="inline-hints" style="display:none;"><%= fixed_budget.label(:description, l(:field_description), :for => "fixed-description#{fixed_budget.object.object_id}")%></p>
|
||||||
<%= fixed_budget.text_area(:description, :class => 'wiki-edit', :rows => '5', :id => "fixed-description#{fixed_budget.object.object_id}") %>
|
<%= fixed_budget.text_area(:description, :class => 'wiki-edit', :rows => '5', :id => "fixed-description#{fixed_budget.object.object_id}") %>
|
||||||
<%= wikitoolbar_for "fixed-description#{fixed_budget.object.object_id}" %>
|
<%= wikitoolbar_for "fixed-description#{fixed_budget.object.object_id}" %>
|
||||||
|
|||||||
@@ -72,3 +72,4 @@ en:
|
|||||||
text_flash_deliverable_destroyed: "Deliverable: {{name}} was successfully destroyed."
|
text_flash_deliverable_destroyed: "Deliverable: {{name}} was successfully destroyed."
|
||||||
field_budget: Budget
|
field_budget: Budget
|
||||||
field_markup: Markup
|
field_markup: Markup
|
||||||
|
field_paid: Paid
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
class AddPaidToFixedBudgets < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
add_column :fixed_budgets, :paid, :boolean
|
||||||
|
add_index :fixed_budgets, :paid
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
remove_column :fixed_budgets, :paid
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -406,9 +406,11 @@ class DeliverablesEditTest < ActionController::IntegrationTest
|
|||||||
# * fixed title
|
# * fixed title
|
||||||
# * fixed budget
|
# * fixed budget
|
||||||
# * fixed markup
|
# * fixed markup
|
||||||
|
# * fixed paid checkbox
|
||||||
|
# * fixed paid hidden field
|
||||||
# * total (hidden)
|
# * total (hidden)
|
||||||
assert_select ".date-2010-01" do
|
assert_select ".date-2010-01" do
|
||||||
assert_select "input", :count => 14
|
assert_select "input", :count => 16
|
||||||
assert_select "textarea.wiki-edit", :count => 1 # Fixed description
|
assert_select "textarea.wiki-edit", :count => 1 # Fixed description
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user