From 393d0c6dfd108b75a972deca46b9fc06b6a66c99 Mon Sep 17 00:00:00 2001 From: Gal Bracha Date: Tue, 10 Jan 2017 19:36:03 +0200 Subject: [PATCH] Made the roles design a bit nicer ui --- app/views/camps/_form.haml | 7 ++++--- app/views/camps/_person_fields.haml | 29 +++++++++++++++-------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/app/views/camps/_form.haml b/app/views/camps/_form.haml index 661b30e0..c75d5e7d 100755 --- a/app/views/camps/_form.haml +++ b/app/views/camps/_form.haml @@ -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 diff --git a/app/views/camps/_person_fields.haml b/app/views/camps/_person_fields.haml index 75316d8c..a1e8092d 100644 --- a/app/views/camps/_person_fields.haml +++ b/app/views/camps/_person_fields.haml @@ -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'