diff options
Diffstat (limited to 'app')
22 files changed, 30 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de6be79..a8b1c7e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb | |||
@@ -1,2 +1,7 @@ | |||
1 | module ApplicationHelper | 1 | module ApplicationHelper |
2 | |||
3 | def title(text) | ||
4 | content_for :title, text | ||
5 | end | ||
6 | |||
2 | end | 7 | end |
diff --git a/app/views/admin/blogs/drafts.html.haml b/app/views/admin/blogs/drafts.html.haml index 8f2d369..7f6d19d 100644 --- a/app/views/admin/blogs/drafts.html.haml +++ b/app/views/admin/blogs/drafts.html.haml | |||
@@ -1,3 +1,4 @@ | |||
1 | - title "Blog drafts" | ||
1 | %table#entries | 2 | %table#entries |
2 | %tr | 3 | %tr |
3 | %th Title | 4 | %th Title |
diff --git a/app/views/admin/blogs/edit.html.haml b/app/views/admin/blogs/edit.html.haml index f356069..beb7b88 100644 --- a/app/views/admin/blogs/edit.html.haml +++ b/app/views/admin/blogs/edit.html.haml | |||
@@ -1,2 +1,3 @@ | |||
1 | - title "Editing #{@blog.title}" | ||
1 | = form_for @blog, url: admin_blog_url(@blog), html: { id: "entry-form" } do |f| | 2 | = form_for @blog, url: admin_blog_url(@blog), html: { id: "entry-form" } do |f| |
2 | = render partial: "form", locals: { f: f } | 3 | = render partial: "form", locals: { f: f } |
diff --git a/app/views/admin/blogs/index.html.haml b/app/views/admin/blogs/index.html.haml index 427d922..28078f8 100644 --- a/app/views/admin/blogs/index.html.haml +++ b/app/views/admin/blogs/index.html.haml | |||
@@ -1,3 +1,4 @@ | |||
1 | - title "Blogs" | ||
1 | %table#entries | 2 | %table#entries |
2 | %tr | 3 | %tr |
3 | %th Title | 4 | %th Title |
diff --git a/app/views/admin/blogs/new.html.haml b/app/views/admin/blogs/new.html.haml index 0005278..eff1f16 100644 --- a/app/views/admin/blogs/new.html.haml +++ b/app/views/admin/blogs/new.html.haml | |||
@@ -1,2 +1,3 @@ | |||
1 | - title "New blog" | ||
1 | = form_for @blog, url: admin_blogs_url, html: { id: "entry-form" } do |f| | 2 | = form_for @blog, url: admin_blogs_url, html: { id: "entry-form" } do |f| |
2 | = render partial: "form", locals: { f: f } | 3 | = render partial: "form", locals: { f: f } |
diff --git a/app/views/admin/blogs/show.html.haml b/app/views/admin/blogs/show.html.haml index 7875cab..b9acd5d 100644 --- a/app/views/admin/blogs/show.html.haml +++ b/app/views/admin/blogs/show.html.haml | |||
@@ -1,3 +1,4 @@ | |||
1 | - title "Previewing #{@blog.title}" | ||
1 | = render partial: "blogs/blog", object: @blog | 2 | = render partial: "blogs/blog", object: @blog |
2 | %footer#blog-footer | 3 | %footer#blog-footer |
3 | This draft was last updated on | 4 | This draft was last updated on |
diff --git a/app/views/admin/streams/edit.html.haml b/app/views/admin/streams/edit.html.haml index 1b58331..8d910fe 100644 --- a/app/views/admin/streams/edit.html.haml +++ b/app/views/admin/streams/edit.html.haml | |||
@@ -1,2 +1,3 @@ | |||
1 | - title "Editing #{@stream.title}" | ||
1 | = form_for @stream, url: admin_stream_url(@stream), html: { id: "entry-form" } do |f| | 2 | = form_for @stream, url: admin_stream_url(@stream), html: { id: "entry-form" } do |f| |
2 | = render partial: "form", locals: { f: f } | 3 | = render partial: "form", locals: { f: f } |
diff --git a/app/views/admin/streams/index.html.haml b/app/views/admin/streams/index.html.haml index c69c6f9..6903fd1 100644 --- a/app/views/admin/streams/index.html.haml +++ b/app/views/admin/streams/index.html.haml | |||
@@ -1,3 +1,4 @@ | |||
1 | - title "Streams" | ||
1 | %table#entries | 2 | %table#entries |
2 | %tr | 3 | %tr |
3 | %th Title | 4 | %th Title |
diff --git a/app/views/admin/streams/new.html.haml b/app/views/admin/streams/new.html.haml index 52febf5..875805a 100644 --- a/app/views/admin/streams/new.html.haml +++ b/app/views/admin/streams/new.html.haml | |||
@@ -1,2 +1,3 @@ | |||
1 | - title "New stream" | ||
1 | = form_for @stream, url: admin_streams_url, html: { id: "entry-form" } do |f| | 2 | = form_for @stream, url: admin_streams_url, html: { id: "entry-form" } do |f| |
2 | = render partial: "form", locals: { f: f } | 3 | = render partial: "form", locals: { f: f } |
diff --git a/app/views/admin/updates/edit.html.haml b/app/views/admin/updates/edit.html.haml index 5651d23..75a9957 100644 --- a/app/views/admin/updates/edit.html.haml +++ b/app/views/admin/updates/edit.html.haml | |||
@@ -1,2 +1,3 @@ | |||
1 | - title "Editing stream update" | ||
1 | = form_for @update, url: admin_stream_update_url(@stream, @update), html: { id: "entry-form" } do |f| | 2 | = form_for @update, url: admin_stream_update_url(@stream, @update), html: { id: "entry-form" } do |f| |
2 | = render partial: "form", locals: { f: f } | 3 | = render partial: "form", locals: { f: f } |
diff --git a/app/views/admin/updates/new.html.haml b/app/views/admin/updates/new.html.haml index 14c6d77..f6c1c20 100644 --- a/app/views/admin/updates/new.html.haml +++ b/app/views/admin/updates/new.html.haml | |||
@@ -1,2 +1,3 @@ | |||
1 | - title "New stream update" | ||
1 | = form_for @update, url: admin_stream_updates_url(@stream), html: { id: "entry-form" } do |f| | 2 | = form_for @update, url: admin_stream_updates_url(@stream), html: { id: "entry-form" } do |f| |
2 | = render partial: "form", locals: { f: f } | 3 | = render partial: "form", locals: { f: f } |
diff --git a/app/views/blogs/show.html.haml b/app/views/blogs/show.html.haml index 8ab4523..f915e64 100644 --- a/app/views/blogs/show.html.haml +++ b/app/views/blogs/show.html.haml | |||
@@ -1,3 +1,4 @@ | |||
1 | - title @blog.title | ||
1 | .breadcrumb= link_to "← Back to home page", root_path | 2 | .breadcrumb= link_to "← Back to home page", root_path |
2 | = render @blog | 3 | = render @blog |
3 | %footer#blog-footer | 4 | %footer#blog-footer |
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index 2dc668f..8d6680a 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb | |||
@@ -1,3 +1,5 @@ | |||
1 | <% title "Resend confirmation instructions" %> | ||
2 | |||
1 | <h2>Resend confirmation instructions</h2> | 3 | <h2>Resend confirmation instructions</h2> |
2 | 4 | ||
3 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> | 5 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> |
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 1e66f3d..471580a 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb | |||
@@ -1,3 +1,5 @@ | |||
1 | <% "Edit account" %> | ||
2 | |||
1 | <h2>Edit <%= resource_name.to_s.humanize %></h2> | 3 | <h2>Edit <%= resource_name.to_s.humanize %></h2> |
2 | 4 | ||
3 | <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> | 5 | <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> |
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 5a238ce..ad0a77f 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb | |||
@@ -1,3 +1,5 @@ | |||
1 | <% title "Sign up" %> | ||
2 | |||
1 | <h2>Sign up</h2> | 3 | <h2>Sign up</h2> |
2 | 4 | ||
3 | <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> | 5 | <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> |
diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb index 16586bc..8a9097a 100644 --- a/app/views/devise/unlocks/new.html.erb +++ b/app/views/devise/unlocks/new.html.erb | |||
@@ -1,3 +1,5 @@ | |||
1 | <% title "Resend unlock instructions" %> | ||
2 | |||
1 | <h2>Resend unlock instructions</h2> | 3 | <h2>Resend unlock instructions</h2> |
2 | 4 | ||
3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> | 5 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> |
diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index cb48c50..bc07335 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml | |||
@@ -1,7 +1,7 @@ | |||
1 | !!! 5 | 1 | !!! 5 |
2 | %html | 2 | %html |
3 | %head | 3 | %head |
4 | %title Thoughts - Admin | 4 | %title= content_for?(:title) ? "Thoughts - Admin - #{yield(:title)}" : "Thoughts - Admin" |
5 | = csrf_meta_tags | 5 | = csrf_meta_tags |
6 | = stylesheet_link_tag 'admin', media: 'all', 'data-turbolinks-track': 'reload' | 6 | = stylesheet_link_tag 'admin', media: 'all', 'data-turbolinks-track': 'reload' |
7 | = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' | 7 | = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' |
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 2d264a7..8cd06b0 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml | |||
@@ -1,7 +1,7 @@ | |||
1 | !!! 5 | 1 | !!! 5 |
2 | %html | 2 | %html |
3 | %head | 3 | %head |
4 | %title Thoughts | 4 | %title= content_for?(:title) ? "Thoughts - #{yield(:title)}" : "Thoughts" |
5 | = csrf_meta_tags | 5 | = csrf_meta_tags |
6 | = stylesheet_link_tag 'main', media: 'all', 'data-turbolinks-track': 'reload' | 6 | = stylesheet_link_tag 'main', media: 'all', 'data-turbolinks-track': 'reload' |
7 | = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' | 7 | = javascript_include_tag 'application', 'data-turbolinks-track': 'reload' |
diff --git a/app/views/streams/show.html.haml b/app/views/streams/show.html.haml index dcec0a2..8365556 100644 --- a/app/views/streams/show.html.haml +++ b/app/views/streams/show.html.haml | |||
@@ -1,2 +1,3 @@ | |||
1 | - title @stream.title | ||
1 | .breadcrumb= link_to "← Back to home page", root_path | 2 | .breadcrumb= link_to "← Back to home page", root_path |
2 | = render @stream | 3 | = render @stream |
diff --git a/app/views/users/passwords/edit.html.haml b/app/views/users/passwords/edit.html.haml index 3d2d9ee..39db61e 100644 --- a/app/views/users/passwords/edit.html.haml +++ b/app/views/users/passwords/edit.html.haml | |||
@@ -1,3 +1,4 @@ | |||
1 | - title "Change password" | ||
1 | %h2 Change your password | 2 | %h2 Change your password |
2 | = devise_error_messages! | 3 | = devise_error_messages! |
3 | #principal | 4 | #principal |
diff --git a/app/views/users/passwords/new.html.haml b/app/views/users/passwords/new.html.haml index 03d3854..d5972f5 100644 --- a/app/views/users/passwords/new.html.haml +++ b/app/views/users/passwords/new.html.haml | |||
@@ -1,3 +1,4 @@ | |||
1 | - title "Forgot password" | ||
1 | %h2 Forgot your password? | 2 | %h2 Forgot your password? |
2 | = devise_error_messages! | 3 | = devise_error_messages! |
3 | #principal | 4 | #principal |
diff --git a/app/views/users/sessions/new.html.haml b/app/views/users/sessions/new.html.haml index f7c8de9..6b82038 100644 --- a/app/views/users/sessions/new.html.haml +++ b/app/views/users/sessions/new.html.haml | |||
@@ -1,3 +1,4 @@ | |||
1 | - title "Sign in" | ||
1 | #principal | 2 | #principal |
2 | = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| | 3 | = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| |
3 | .field | 4 | .field |