User/Person models merge

This commit is contained in:
Stella Rouzi 2014-06-23 19:07:50 +03:00
parent 66b84e3660
commit 23bf55b66c
80 changed files with 1064 additions and 1221 deletions

View file

@ -42,12 +42,12 @@
%section#information
= f.inputs :name => "Your Information" do
= semantic_fields_for @person do |p|
= p.input :public_name, :as => :string, :required => true
= p.input :company, :as => :string, :label => "Affiliation", :hint => "This could be a company, a user group, or nothing at all."
= p.input :biography, :required => true, :input_html => {:rows => 5, :class => 'span11', "onkeyup" => "word_count(this, 'biography-count', 150)"}
= semantic_fields_for @user do |u|
= u.input :name, :as => :string, :required => true
= u.input :affiliation, :as => :string, :hint => "This could be a company, a user group, or nothing at all."
= u.input :biography, :required => true, :input_html => {:rows => 5, :class => 'span11', "onkeyup" => "word_count(this, 'biography-count', 150)"}
You have used
%span#biography-count #{@person.biography_word_count}
%span#biography-count #{@user.biography_word_count}
words. Biographies are limited to 150 words.
%br
%br

View file

@ -4,7 +4,7 @@
= "My Proposals for #{@conference.title}"
- if @conference.cfp_open? || organizer_or_admin?
= link_to "New Proposal", new_conference_proposal_path(@conference.short_title), :class => "btn btn-primary pull-right"
- if @person.proposal_count(@conference) > 0
- if @user.proposal_count(@conference) > 0
.row
.col-md-12
%table.table.table-bordered.table-striped

View file

@ -57,15 +57,15 @@
.col-md-8
%h3
by
= @speaker.public_name
= @speaker.name
(
= @speaker.email
)
- if @speaker.company?
- if @speaker.affiliation?
%br
%span.muted
from
= @speaker.company
= @speaker.affiliation
-if @speaker.biography?
= simple_format(@speaker.biography)
.col-md-4