summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/leap.scss13
-rw-r--r--app/views/layouts/_content.html.haml19
-rw-r--r--app/views/layouts/_header.html.haml10
-rw-r--r--app/views/layouts/_messages.html.haml11
-rw-r--r--app/views/layouts/application.html.haml14
5 files changed, 46 insertions, 21 deletions
diff --git a/app/assets/stylesheets/leap.scss b/app/assets/stylesheets/leap.scss
index 577d211..4a3ca03 100644
--- a/app/assets/stylesheets/leap.scss
+++ b/app/assets/stylesheets/leap.scss
@@ -38,6 +38,10 @@
padding-bottom: 0;
}
+.hidden {
+ display: none;
+}
+
//
// ICONS
//
@@ -50,8 +54,6 @@
@include ie7-restore-right-whitespace();
line-height: 32px;
vertical-align: middle;
- //background-image: $iconSpritePath;
- //background-position: 14px 14px;
background-repeat: no-repeat;
margin-top: 1px;
}
@@ -74,7 +76,7 @@ input.large {
}
//
-// BOOSTRAP TWEAKS
+// BOOTSTRAP TWEAKS
//
//
@@ -155,6 +157,11 @@ input, textarea {
// SIDE NAVIGATION
//
+.user_heading {
+ margin: 1em 0;
+ font-weight: bold;
+}
+
.sidenav {
@extend .nav-tabs;
@extend .nav-stacked;
diff --git a/app/views/layouts/_content.html.haml b/app/views/layouts/_content.html.haml
new file mode 100644
index 0000000..19af627
--- /dev/null
+++ b/app/views/layouts/_content.html.haml
@@ -0,0 +1,19 @@
+-#
+-# Partial for displaying the page content. This is the only place that content should be displayed.
+-#
+
+- if content_for?(:content)
+ - content = yield(:content)
+- else
+ - content = yield
+
+- if @show_navigation
+ .span2
+ = render 'layouts/navigation'
+ .span10
+ = render 'layouts/messages'
+ = content
+- else
+ .span12
+ = render 'layouts/messages'
+ = content
diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml
index aa4054b..854ab40 100644
--- a/app/views/layouts/_header.html.haml
+++ b/app/views/layouts/_header.html.haml
@@ -1,3 +1,9 @@
-- if user
- %strong.user_address
+- if admin?
+ %ul.nav.nav-tabs
+ %li{:class => ("active" if controller?('users', 'email_settings', 'overviews') || params[:user_id])}
+ = link_to t(:users), users_path
+ %li{:class => ("active" if controller?('tickets') && !params[:user_id])}
+ = link_to t(:tickets), tickets_path
+- if user && @show_navigation
+ .user_heading
= user.email_address
diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml
index a3bbbac..7ff985f 100644
--- a/app/views/layouts/_messages.html.haml
+++ b/app/views/layouts/_messages.html.haml
@@ -1,5 +1,6 @@
-- flash.each do |name, msg|
- - if msg.is_a?(String)
- %div{:class => "alert alert-#{name == :notice ? "success" : "error"}"}
- %a.close{"data-dismiss" => "alert"} ×
- = content_tag :div, format_flash(msg), :id => "flash_#{name}"
+#messages
+ - flash.each do |name, msg|
+ - if msg.is_a?(String)
+ %div{:class => "alert alert-#{name == :notice ? "success" : "error"}"}
+ %a.close{"data-dismiss" => "alert"} ×
+ = content_tag :div, format_flash(msg), :id => "flash_#{name}"
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index e185f26..db612b7 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -1,3 +1,4 @@
+- @show_navigation = true if @show_navigation.nil?
!!!
%html
%head
@@ -20,16 +21,7 @@
.row-fluid
.span12
= render 'layouts/header'
- .row-fluid
- .span2
- = render 'layouts/navigation'
- .span10
- = render 'layouts/messages'
- = yield
- - else
- .row-fluid
- .span12
- = render 'layouts/messages'
- = yield
+ .row-fluid
+ = render 'layouts/content'
#footer
= render 'layouts/footer'