Skip to content

Commit

Permalink
Merge pull request #57 from Midburn/feat/roles-design
Browse files Browse the repository at this point in the history
Made the roles design a bit nicer ui
  • Loading branch information
rootux authored Jan 10, 2017
2 parents 8423896 + 393d0c6 commit f7dd526
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
7 changes: 4 additions & 3 deletions app/views/camps/_form.haml
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,12 @@
.combo
= t("form_project_management_crew_desc")

#responsibles.col-xs-12
#responsibles
= form.fields_for :people do |person|
= render 'person_fields', :f => person, :camp_id => @camp.id
.links
= link_to_add_association t('add_a_new_person'), form, :people, render_options: { locals: { camp_id: @camp.id } }, class: 'btn btn-default'

.links.col-xs-12
= link_to_add_association t('add_a_new_person'), form, :people, render_options: { locals: { camp_id: @camp.id } }, class: 'btn btn-default'

%br
%br
Expand Down
29 changes: 15 additions & 14 deletions app/views/camps/_person_fields.haml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
.nested-fields
= t("activerecord.attributes.person.name")
= f.text_field :name, class: 'form-control'
= t("activerecord.attributes.person.email")
= f.text_field :email, class: 'form-control'
= t("activerecord.attributes.person.phone")
= f.text_field :phone_number, class: 'form-control'
= t("activerecord.attributes.person.background")
= f.text_field :background, class: 'form-control'
= t("activerecord.attributes.person.roles")
= f.collection_check_boxes(:role_ids, Role.all, :id, :identifier) do |b|
= b.label { b.check_box + ' ' + t("project_roles." + b.text) }
%br
= link_to_remove_association t("remove_person"), f, class: 'remove_person fa fa-trash'
.nested-fields.panel.panel-default.col-md-7
.panel-body
= t("activerecord.attributes.person.name")
= f.text_field :name, class: 'form-control'
= t("activerecord.attributes.person.email")
= f.text_field :email, class: 'form-control'
= t("activerecord.attributes.person.phone")
= f.text_field :phone_number, class: 'form-control'
= t("activerecord.attributes.person.background")
= f.text_field :background, class: 'form-control'
= t("activerecord.attributes.person.roles")
= f.collection_check_boxes(:role_ids, Role.all, :id, :identifier) do |b|
= b.label { b.check_box + ' ' + t("project_roles." + b.text) }
%br
= link_to_remove_association t("remove_person"), f, class: 'remove_person fa fa-trash'

0 comments on commit f7dd526

Please sign in to comment.