introduce organizations
This commit is contained in:
parent
bf54487a19
commit
8edf896d86
21 changed files with 345 additions and 4 deletions
13
app/views/organizations/_form.html.haml
Normal file
13
app/views/organizations/_form.html.haml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
= semantic_form_for(@organization) do |f|
|
||||
= f.inputs name: 'Organization details' do
|
||||
= f.input :name, as: :string, required: true
|
||||
= f.input :description, input_html: { rows: 5 }, placeholder: 'Decribe about your organization..'
|
||||
= image_tag f.object.picture.thumb.url if f.object.picture?
|
||||
- if @organization.picture
|
||||
= image_tag(@organization.picture.thumb.url, width: '20%')
|
||||
= f.input :picture
|
||||
%p.text-right
|
||||
- if @organization.new_record?
|
||||
= f.submit 'Create Organization', class: 'btn btn-success'
|
||||
- else
|
||||
= f.submit 'Update Organization', class: 'btn btn-success'
|
||||
4
app/views/organizations/edit.html.haml
Normal file
4
app/views/organizations/edit.html.haml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
.container
|
||||
.row
|
||||
.col-md-12
|
||||
= render 'form'
|
||||
17
app/views/organizations/index.html.haml
Normal file
17
app/views/organizations/index.html.haml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
.container
|
||||
.row
|
||||
.col-md-12.page-header
|
||||
%h1
|
||||
Organizations
|
||||
.btn-group.pull-right
|
||||
= link_to 'Add new', new_organization_path, class: 'btn btn-mini btn-success'
|
||||
- @organizations.each do |organization|
|
||||
.col-md-4
|
||||
.thumbnail
|
||||
= image_tag(organization.picture.thumb.url, width: '20%')
|
||||
.caption
|
||||
%h4
|
||||
= organization.name
|
||||
%button.btn.btn-success Conferences
|
||||
= link_to 'Edit', edit_organization_path(organization), class: 'btn btn-mini btn-default'
|
||||
|
||||
4
app/views/organizations/new.html.haml
Normal file
4
app/views/organizations/new.html.haml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
.container
|
||||
.row
|
||||
.col-md-12
|
||||
= render 'form'
|
||||
Loading…
Add table
Add a link
Reference in a new issue