fixes done

This commit is contained in:
Gopesh Tulsyan 2014-05-16 21:01:03 +05:30
parent d498178513
commit 2d01bcad17
2 changed files with 49 additions and 51 deletions

View file

@ -20,7 +20,7 @@
= simple_format(conference.venue.description, class: 'lead') = simple_format(conference.venue.description, class: 'lead')
.col-md-2 .col-md-2
.btn-group-vertical .btn-group-vertical
- if @conference && controller.class.name != "ConferenceController" - if !@conference || @conference != conference
= link_to "View Conference", conference_path(conference.short_title), :class =>"btn btn-default" = link_to "View Conference", conference_path(conference.short_title), :class =>"btn btn-default"
- if conference.registration_open? - if conference.registration_open?
- if conference.user_registered?(current_user) - if conference.user_registered?(current_user)

View file

@ -7,59 +7,57 @@
%span.icon-bar %span.icon-bar
%span.icon-bar %span.icon-bar
%span.icon-bar %span.icon-bar
- if @conference && controller.class.name == "ConferenceController" - if @conference
= link_to @conference.title, "#", :class => 'navbar-brand' = link_to @conference.title, "#", :class => 'navbar-brand'
- else - else
= link_to CONFIG['name'], root_path, :class => 'navbar-brand', :title => "Open Source Event Manager" = link_to CONFIG['name'], root_path, :class => 'navbar-brand', :title => "Open Source Event Manager"
.collapse.navbar-collapse .collapse.navbar-collapse
- if content_for?(:splash_header) = yield(:splash_header)
= yield(:splash_header) - if @conference && !@conference.short_title.nil?
%p.navbar-text
= @conference.short_title
- if user_signed_in?
- if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
- if controller.class.name.split("::").first=="Admin"
- if @conference and not @conference.short_title.nil?
= render 'layouts/admin_menu'
%ul.nav.navbar-nav.navbar-right
%li.dropdown
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
- if not current_user.person.public_name.empty?
#{current_user.person.public_name}
-else
#{current_user.email}
= image_tag(current_user.person.gravatar_url(:size => "18"), :title => "Yo #{current_user.person.public_name}!")
%b.caret
%ul.dropdown-menu
= render 'layouts/user_menu'
- else - else
- if @conference && !@conference.short_title.nil? %ul.nav.navbar-nav.navbar-right
%p.navbar-text - if current_page?(new_registration_path('user'))
= @conference.short_title %li.active
- if user_signed_in? = link_to(new_registration_path('user')) do
- if has_role?(current_user, "admin") || has_role?(current_user, "organizer") %span.glyphicon.glyphicon-heart
- if controller.class.name.split("::").first=="Admin" Sign Up
- if @conference and not @conference.short_title.nil? - else
= render 'layouts/admin_menu' %li
%ul.nav.navbar-nav.navbar-right = link_to(new_registration_path('user')) do
%li.dropdown %span.glyphicon.glyphicon-heart
Sign Up
%li.dropdown.visible-desktop
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"} %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
- if not current_user.person.public_name.empty? %span.glyphicon.glyphicon-user
#{current_user.person.public_name} Sign In
-else %span.caret
#{current_user.email} .dropdown-menu{:style => "padding: 17px;"}
= image_tag(current_user.person.gravatar_url(:size => "18"), :title => "Yo #{current_user.person.public_name}!") = form_tag user_session_path do
%b.caret = text_field_tag 'user[email]', nil, id: 'user_email_dd'
%ul.dropdown-menu = password_field_tag 'user[password]', nil, id: 'user_password_dd'
= render 'layouts/user_menu' %label.checkbox
- else = check_box_tag 'user[remember_me]'
%ul.nav.navbar-nav.navbar-right Remember me
- if current_page?(new_registration_path('user')) %button.btn.btn-block Sign in
%li.active %br
= link_to(new_registration_path('user')) do = link_to "Forgot your password?", new_password_path('user')
%span.glyphicon.glyphicon-heart %li.hidden-lg
Sign Up = link_to('Sign In', new_user_session_path)
- else
%li
= link_to(new_registration_path('user')) do
%span.glyphicon.glyphicon-heart
Sign Up
%li.dropdown.visible-desktop
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
%span.glyphicon.glyphicon-user
Sign In
%span.caret
.dropdown-menu{:style => "padding: 17px;"}
= form_tag user_session_path do
= text_field_tag 'user[email]', nil, id: 'user_email_dd'
= password_field_tag 'user[password]', nil, id: 'user_password_dd'
%label.checkbox
= check_box_tag 'user[remember_me]'
Remember me
%button.btn.btn-block Sign in
%br
= link_to "Forgot your password?", new_password_path('user')
%li.hidden-lg
= link_to('Sign In', new_user_session_path)