The working basics
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
= form_for @organization do |f|
|
||||
.columns
|
||||
- if @organization.errors.any?
|
||||
#error_explanation
|
||||
%h2= "#{pluralize(@organization.errors.count, "error")} prohibited this organization from being saved:"
|
||||
%ul
|
||||
- @organization.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
= field f, :name, :text_field
|
||||
= field f, :slug, :text_field
|
||||
|
||||
.columns.medium-4
|
||||
-#%h2=_'organization.create.intro-title', :t
|
||||
-#%p=_'organization.create.intro', :p
|
||||
=# field f, :avatar, :image_field
|
||||
= field f, :avatar, :image_field, @organization.avatar_url
|
||||
-#= field f, :year_founded, :number_field
|
||||
=# f.label :avatar do
|
||||
=# %div
|
||||
=# = image_tag(@organization.avatar_url || ''
|
||||
=# = f.hidden_field :avatar_cache
|
||||
.columns.medium-8
|
||||
= field f, :email_address, :email_field
|
||||
-#= field f, :url, :text_field
|
||||
= f.fields_for :locations do |b|
|
||||
= field_set_tag 'Location' do
|
||||
= field b, :country, :country_select, {help: 'Select a Country'}
|
||||
- cc = @organization.locations && @organization.locations[b.index].country ? @organization.locations[b.index].country : 'US'
|
||||
= field b, :territory, :subregion_select, cc, html: {class: @organization.locations[b.index].country ? 'can' : 'cant', data: {:country => cc}}
|
||||
= field b, :city, :text_field
|
||||
= field b, :street, :text_field
|
||||
= field b, :postal_code, :text_field
|
||||
-#= field f, :logo, :text_field
|
||||
-#= field f, :avatar, :text_field
|
||||
-#= field f, :requires_approval, :check_box
|
||||
-#= field f, :secret_question, :text_field
|
||||
-#= field f, :secret_answer, :text_field
|
||||
-#= field f, :location_id, :number_field
|
||||
-#= field f, :user_organization_replationship_id, :number_field
|
||||
.columns
|
||||
= field f, :info, :text_area
|
||||
= actions :save
|
||||
@@ -0,0 +1,5 @@
|
||||
- page_style :form
|
||||
|
||||
= tabs!
|
||||
.row
|
||||
= render 'form'
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
- page_style :form
|
||||
|
||||
= tabs!
|
||||
.row
|
||||
= form_for @organization do |f|
|
||||
.columns.medium-4
|
||||
%h2=_'organization.members.help.title', :t
|
||||
%p=_'organization.members.help', :p
|
||||
.columns.medium-8
|
||||
= field f, :cover, :image_field, @organization.cover_url
|
||||
= field f, :year_founded, :number_field
|
||||
= actions :save
|
||||
@@ -0,0 +1,41 @@
|
||||
%h1 Listing organizations
|
||||
|
||||
%table
|
||||
%tr
|
||||
%th Name
|
||||
%th Slug
|
||||
%th Email address
|
||||
%th Url
|
||||
%th Year founded
|
||||
%th Info
|
||||
%th Logo
|
||||
%th Avatar
|
||||
%th Requires approval
|
||||
%th Secret question
|
||||
%th Secret answer
|
||||
%th User organization replationship
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
|
||||
- @organizations.each do |organization|
|
||||
%tr
|
||||
%td= organization.name
|
||||
%td= organization.slug
|
||||
%td= organization.email_address
|
||||
%td= organization.url
|
||||
%td= organization.year_founded
|
||||
%td= organization.info
|
||||
%td= organization.logo
|
||||
%td= organization.avatar
|
||||
%td= organization.requires_approval
|
||||
%td= organization.secret_question
|
||||
%td= organization.secret_answer
|
||||
%td= organization.user_organization_replationship_id
|
||||
%td= link_to 'Show', organization
|
||||
%td= link_to 'Edit', edit_organization_path(organization)
|
||||
%td= link_to 'Destroy', organization, :method => :delete, :data => { :confirm => 'Are you sure?' }
|
||||
|
||||
%br
|
||||
|
||||
= link_to 'New Organization', new_organization_path
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
- page_style :form
|
||||
|
||||
= tabs!
|
||||
.row
|
||||
= form_for @organization do |f|
|
||||
.columns.medium-4
|
||||
%h2=_'organization.members.help.title', :t
|
||||
%p=_'organization.members.help', :p
|
||||
.columns.medium-8
|
||||
.clearfix
|
||||
= f.fields_for :user_organization_relationships, :include_id => true do |u|
|
||||
= field u, :id, :user_select_field, @organization.users[u.index], attrs: [@organization.user_organization_relationships[u.index]]
|
||||
= actions :save
|
||||
@@ -0,0 +1,5 @@
|
||||
-# banner_title 'Register a New Organization'
|
||||
- page_style :form
|
||||
|
||||
.row
|
||||
= render 'form'
|
||||
@@ -0,0 +1,18 @@
|
||||
- page_style 'organization'
|
||||
- banner_image @organization.cover_url
|
||||
- content_for :banner do
|
||||
.row
|
||||
.columns.medium-6.info
|
||||
%h1=@organization.name
|
||||
%h2=@organization.locations[0].city + (@organization.locations[0].territory ? ' ' + @organization.locations[0].territory : '') + ', ' + Carmen::Country.coded(@organization.locations[0].country).name
|
||||
.columns.medium-6
|
||||
%figure
|
||||
= image_tag(@organization.avatar_url)
|
||||
|
||||
%p#notice= notice
|
||||
|
||||
= tabs!
|
||||
|
||||
.row
|
||||
.columns
|
||||
=p @organization, :info
|
||||
Reference in New Issue
Block a user