Skip to content

Commit

Permalink
Merge pull request #331 from enoodle/feature/adding_angels
Browse files Browse the repository at this point in the history
adding angel name
  • Loading branch information
enoodle authored Feb 19, 2019
2 parents efe177b + 5a011e8 commit 23673d7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/views/camps/_edit_point_of_contact.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
= simple_form_for @camp, :html => {:dir => I18n.t(:html_direction), :id => 'camp-form' } do |form|
.combo
= t(:angel_name)
= form.text_field :dream_point_of_contact_name, :maxlength => 64, :class => "form-control"
.combo
= t(:contact_email)
= form.text_field :dream_point_of_contact_email, :maxlength => 64, :class => "form-control"
.submit
= form.submit t(:update_point_of_contact), id: 'done-camp', class: 'btn btn-success'
3 changes: 2 additions & 1 deletion app/views/camps/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@
<span class='dream-point-of-contact'>
<span class='glyphicon glyphicon-envelope' aria-hidden="true"></span>&nbsp<%=t :form_dream_point_of_contact_email %>
</span><br>
<% if @camp.creator == current_user %>
<% if @camp.creator == current_user && @camp.dream_point_of_contact_name && @camp.dream_point_of_contact_email %>
<%= @camp.dream_point_of_contact_name %><br>
<%= @camp.dream_point_of_contact_email %>
<% elsif current_user.guide || current_user.admin %>
<%= render 'edit_point_of_contact' %>
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ en:
contact_name: Contact Name
contact_alternative_name: Contact Name
contact_email: Contact Email
angel_name: Angel name
save_camp: Save and continue
done_camp: Done
update_point_of_contact: Update contact
Expand Down
1 change: 1 addition & 0 deletions config/locales/he.yml
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ he:
contact_name: "שם הקבוצה/אמן"
contact_alternative_name: "שם החולם"
contact_email: "אימייל"
angel_name: "שם המלאכית"
save_camp: "שמור והמשך"
done_camp: "סיימתי"
update_point_of_contact: "עדכן איש קשר"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddDreamPointOfContactNameToCamp < ActiveRecord::Migration
def change
add_column :camps, :dream_point_of_contact_name, :string, :limit => 64
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: 20190218195040) do
ActiveRecord::Schema.define(version: 20190219203141) 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 @@ -178,6 +178,7 @@
t.integer "requested_funds"
t.integer "requested_funds_fallback"
t.boolean "approved_status", :default=>false
t.string "dream_point_of_contact_name", :limit=>64
end

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

0 comments on commit 23673d7

Please sign in to comment.