diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/_navbar.html.haml | 43 | ||||
-rw-r--r-- | app/views/layouts/application.html.haml | 9 | ||||
-rw-r--r-- | app/views/users/_index_core.html.haml | 14 |
3 files changed, 44 insertions, 22 deletions
diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 4005e28..d6a8422 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -1,21 +1,34 @@ .navbar.navbar-inverse.navbar-fixed-top .navbar-inner - .container-fluid + .container + %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))} + Gemeinschaft 5 + %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"} %span.icon-bar %span.icon-bar - %span.icon-bar - %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))} Gemeinschaft 5 - .nav-collapse.collapse - %p.navbar-text.pull-right - - if current_user - %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} - = current_user - %ul.nav - %li.active - %a{:href => "#"} Home - %li - %a{:href => "#about"} About + %span.icon-bar + + - if current_user + .nav-collapse.collapse + %ul.nav + %li + %a{:href => "#about"} About + %li.pull_right + %a{:href => "#contact"} Contact + + - if current_user + %ul.nav.pull-right + - if current_page?(tenant_user_path(current_user.current_tenant, current_user)) + %li.active + %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} + = current_user + - else + %li + %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} + = current_user + %li - %a{:href => "#contact"} Contact - / /.nav-collapse + %a.navbar-link{:href => log_out_path} + %i.icon-off.icon-white + diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 8caee14..74331af 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -15,10 +15,6 @@ /[if lt IE 9] <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> %body - = render 'layouts/navbar' - - = render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder, :separator => "/" - .container .row .span12 @@ -28,6 +24,11 @@ %a.close{"data-dismiss" => "alert"} × = msg + - if current_user + = render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder, :separator => "/" + + = render 'layouts/navbar' + = yield .row diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index b0efaef..7f2251a 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -11,10 +11,18 @@ - for user in users - cache(['user_table_row', I18n.locale, current_user, user]) do %tr - %td - = image_tag user.image_url(:mini).to_s if user.image_url(:mini) + %td + - if user.image? + =image_tag(user.image_url(:mini).to_s, :class => 'img-rounded') + - else + - if user.male? + = image_tag 'icons/user-male-16x.png', :class => 'img-rounded' + - else + = image_tag 'icons/user-female-16x.png', :class => 'img-rounded' %td= user.user_name - %td= user.email + %td + - if !user.email.blank? + = mail_to user.email, (Haml::Engine.new("%i.icon-envelope").render + ' ' + user.email) %td= user.first_name %td= user.last_name =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @tenant, :child => user}
\ No newline at end of file |