summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/application.js5
-rw-r--r--app/views/home/index.html.haml11
-rw-r--r--app/views/layouts/_messages.html.haml5
-rw-r--r--app/views/layouts/_navigation.html.haml9
-rw-r--r--app/views/layouts/application.html.haml5
5 files changed, 25 insertions, 10 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index f7ca1ec..23d7fef 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -16,5 +16,10 @@
//= require users
//= require_tree .
//= require bootstrap
+//= require jquery.pjax
+
+$(function() {
+ $('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]');
+});
//= require rails.validations
//= require rails.validations.simple_form
diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml
index 9e68674..dd7e5aa 100644
--- a/app/views/home/index.html.haml
+++ b/app/views/home/index.html.haml
@@ -1,11 +1,14 @@
+%h1 spacer for firefox
+%h1 spacer for firefox
Try to fetch a
= link_to "cert", cert_path
%p
-Try to create a
+Create a
= link_to "ticket", new_ticket_path
-%p
-See all
-= link_to "tickets", tickets_path
+- if logged_in?
+ %p
+ See all
+ = link_to "tickets", tickets_path
diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml
new file mode 100644
index 0000000..80e34d4
--- /dev/null
+++ b/app/views/layouts/_messages.html.haml
@@ -0,0 +1,5 @@
+- 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, msg, :id => "flash_#{name}"
diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml
index b75eed7..e72586a 100644
--- a/app/views/layouts/_navigation.html.haml
+++ b/app/views/layouts/_navigation.html.haml
@@ -1,6 +1,7 @@
= link_to "Leap Web", root_path, :class => 'brand'
-%ul.nav
- // = render '/tickets/nav'
+.nav-collapse.collapse
+ %ul.nav
+ // = render '/tickets/nav'
-%ul.nav.pull-right
- = render '/sessions/nav'
+ %ul.nav.pull-right
+ = render '/sessions/nav'
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index a57d65e..b0644f2 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -18,6 +18,7 @@
.content
.row
.span12
- //= render 'layouts/messages'
- = yield
+ = render 'layouts/messages' # TODO: In firefox, these are hidden by header
+ %div{"data-pjax-container" => ""}
+ = yield
%footer