Skip to content

Commit

Permalink
Merge pull request #329 from enoodle/feature/adding_dreams_approval_s…
Browse files Browse the repository at this point in the history
…tatus

adding dream approval field to Dream (Camp)
  • Loading branch information
enoodle authored Feb 19, 2019
2 parents 52a7fe2 + 74a30c5 commit cc2de27
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/views/camps/_form.haml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@
= t("form_dream_name")
= @camp.name

- if current_user && (current_user.guide || current_user.admin)
.combo
= form.label t("approve_dream")
= form.check_box :approved_status

.menu-heading
%ul
%li
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ en:
form_dream_name_en_label: Dream name in English (required)
form_dream_name_label: Dream name (required)
form_dream_name_guidetext_html: What's your dream prototype called?
approve_dream: approve dream
form_subtitle_en_label: Summarize your dream in English (required)
form_subtitle_label: Summarize your dream (required)
form_subtitle_guidetext_html: Brief summary of the dream prototype you are applying
Expand Down
1 change: 1 addition & 0 deletions config/locales/he.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ he:
form_dream_id: "מספר החלום"
form_dream_name_guidetext_html: "איך קוראים לחלום שלך?"
form_dream_name_en_label: "שם החלום באנגלית (נדרש)"
approve_dream: אשר חלום
form_subtitle_label: "סיכום החלום במשפט (נדרש)"
form_subtitle_guidetext_html: "סיכום קצר של החלום שאת מציעה. סיכום זה יופיע בעמוד הראשי של האתר וגם בתוכנייה של מידברן (ולכן חשוב למלא במדויק). תעשי את זה קצר, עד 256 תווים."
form_subtitle_en_label: "סיכום החלום במשפט באנגלית (נדרש)"
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20190218195040_add_approval_status_to_camp.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddApprovalStatusToCamp < ActiveRecord::Migration
def change
add_column :camps, :approved_status, :boolean, :default => false
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20190121165734) do
ActiveRecord::Schema.define(version: 20190218195040) do

create_table "active_admin_comments", force: :cascade do |t|
t.string "namespace", :index=>{:name=>"index_active_admin_comments_on_namespace"}
Expand Down Expand Up @@ -177,6 +177,7 @@
t.integer "camp_manager_id"
t.integer "requested_funds"
t.integer "requested_funds_fallback"
t.boolean "approved_status", :default=>false
end

create_table "grants", force: :cascade do |t|
Expand Down

0 comments on commit cc2de27

Please sign in to comment.