Syntax style + code groomming

This commit is contained in:
Stella Rouzi 2015-10-06 14:15:38 +03:00
parent eface6a91b
commit 759aa54689
16 changed files with 64 additions and 58 deletions

View file

@ -4,9 +4,9 @@
.tabbable
%ul.nav.nav-tabs
%li.active
= link_to "Proposal", "#proposal-content", "data-toggle"=>"tab"
= link_to 'Proposal', '#proposal-content', 'data-toggle' => 'tab'
%li
= link_to 'Commercials', '#commercials-content', 'data-toggle'=>'tab'
= link_to 'Commercials', '#commercials-content', 'data-toggle' => 'tab'
.tab-content
#proposal-content.tab-pane.active
= render 'proposal/proposal_form'
@ -29,7 +29,7 @@
= link_to 'Edit', edit_conference_proposal_commercial_path(@conference.short_title, @event.id, commercial.id), class: 'btn btn-primary'
- if can? :destroy, commercial
= link_to 'Delete', conference_proposal_commercial_path(@conference.short_title, @event.id, commercial.id),
:method => :delete, :data => { :confirm => 'Are you sure?' }, class: 'btn btn-danger'
method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'
- if can? :create, @event.commercials.new
%hr
= link_to 'Add Commercial', new_conference_proposal_commercial_path(@conference.short_title, @event.id), class: 'btn btn-primary'

View file

@ -43,11 +43,11 @@
= f.input :is_highlight
%p.text-right
= link_to '#description', "data-toggle"=>"collapse" do
= link_to '#description', 'data-toggle' => 'collapse' do
Do you require something special?
.collapse#description
= f.input :description, input_html: { rows: 5 }, label: 'Requirements', placeholder: 'Eg. Whiteboard, printer, or something like that.'
%p.text-right
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-success"}, label: 'Update Proposal'
= f.submit 'Update Proposal', class: 'btn btn-success'

View file

@ -11,11 +11,11 @@
- if !current_user
%legend
%span
=link_to('#signup', role: 'tab', "aria-controls" => "home", "data-toggle" => "tab") do
=link_to('#signup', role: 'tab', 'aria-controls' => 'home', 'data-toggle' => 'tab') do
= CONFIG['name']
Account
%span.pull-right#account-already
=link_to('#signin', role: 'tab', "aria-controls" => "home", "data-toggle" => "tab") do
=link_to('#signin', role: 'tab', 'aria-controls' => 'home', 'data-toggle' => 'tab') do
Already have an account?
.tab-content
.tab-pane.active{role: 'tabpanel', id: 'signup'}
@ -25,7 +25,7 @@
= render partial: 'devise/shared/sign_up_form_embedded'
= f.inputs name: 'Proposal Information' do
= f.input :title, as: :string, required: true
= f.input :title, as: :string, required: true, input_html: { required: true }
= f.input :event_type_id, as: :select,
collection: @conference.event_types.map {|type| ["#{type.title} - #{show_time(type.length)}", type.id,
data: { min_words: type.minimum_abstract_length, max_words: type.maximum_abstract_length }]},
@ -38,7 +38,7 @@
:javascript
$("##{@conference.event_types.first.id}-help").collapse('show');
= f.input :abstract, input_html: { rows: 5 },
= f.input :abstract, input_html: { rows: 5, required: true },
required: true, hint: link_to('Tips to improve your presentations', 'http://blog.hubspot.com/blog/tabid/6307/bid/5975/10-Rules-to-Instantly-Improve-Your-Presentations.aspx')
%p
@ -55,12 +55,13 @@
= f.input :require_registration, label: 'Require participants to register to your event'
%p.text-right
= link_to '#description', "data-toggle"=>"collapse", id: 'description_link' do
= link_to '#description', 'data-toggle' => 'collapse', id: 'description_link' do
Do you require something special?
.collapse#description
= f.input :description, input_html: { rows: 5 }, label: 'Requirements', placeholder: 'Eg. Whiteboard, printer, or something like that.'
%p.text-right
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-success"}, label: 'Create Proposal'
= f.submit 'Create Proposal', class: 'btn btn-success'
.tab-pane{role: 'tabpanel', id: 'signin'}
= render partial: 'devise/shared/sign_in_form_embedded'