diff --git a/app/views/audits/index.html.haml b/app/views/audits/index.html.haml
index 5ee1eca1..eccd1a38 100644
--- a/app/views/audits/index.html.haml
+++ b/app/views/audits/index.html.haml
@@ -1,4 +1,6 @@
- model_class = Audit
+- content_for :title do
+ Audits
= form_tag({}, { :class => 'form-horizontal', :method => :get }) do
.mb-3
diff --git a/app/views/barcodes/index.html.haml b/app/views/barcodes/index.html.haml
index 8a32054a..ab31c913 100644
--- a/app/views/barcodes/index.html.haml
+++ b/app/views/barcodes/index.html.haml
@@ -1,4 +1,6 @@
- model_class = Barcode
+- content_for :title do
+ Barcodes
- content_for :actions do
%li.nav-item
= link_to 'new barcode', [:new, :barcode], class: "nav-link"
diff --git a/app/views/barcodes/new.html.haml b/app/views/barcodes/new.html.haml
index 8bb00460..cf93625b 100644
--- a/app/views/barcodes/new.html.haml
+++ b/app/views/barcodes/new.html.haml
@@ -1,3 +1,5 @@
+- content_for :title do
+ Add barcode
.page-header
%h1
New Barcode
diff --git a/app/views/drinks/edit.html.haml b/app/views/drinks/edit.html.haml
index 32cb0077..274101c7 100644
--- a/app/views/drinks/edit.html.haml
+++ b/app/views/drinks/edit.html.haml
@@ -1,4 +1,6 @@
- model_class = Drink
+- content_for :title do
+ Edit drink
.page-header
%h1=t '.title', :default => [:'helpers.titles.edit', 'Edit %{model}'], :model => model_class.model_name.human
= render :partial => "form"
diff --git a/app/views/drinks/index.html.haml b/app/views/drinks/index.html.haml
index 0528f1d4..58800764 100644
--- a/app/views/drinks/index.html.haml
+++ b/app/views/drinks/index.html.haml
@@ -1,4 +1,6 @@
- model_class = Drink
+- content_for :title do
+ Drinks
- content_for :actions do
%li.nav-item
= link_to 'new drink', [:new, :drink], class: "nav-link"
diff --git a/app/views/drinks/new.html.haml b/app/views/drinks/new.html.haml
index c3ff34d2..a1574fa9 100644
--- a/app/views/drinks/new.html.haml
+++ b/app/views/drinks/new.html.haml
@@ -1,3 +1,5 @@
+- content_for :title do
+ Add drink
.page-header
%h1
New Drink
diff --git a/app/views/drinks/show.html.haml b/app/views/drinks/show.html.haml
index edf274cc..0e514984 100644
--- a/app/views/drinks/show.html.haml
+++ b/app/views/drinks/show.html.haml
@@ -1,4 +1,6 @@
= render @drink
+- content_for :title do
+ Drink
.form-actions
= link_to t('.back', :default => t("helpers.links.back")), drinks_path, :class => 'btn'
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index a03743e9..a8e2e120 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -7,7 +7,7 @@
%meta(name="apple-mobile-web-app-capable" content="yes")
%meta(name="mobile-web-app-capable" content="yes")
%meta(name="apple-mobile-web-app-status-bar-style" content="black")
- %title= content_for?(:title) ? yield(:title) : "Mete"
+ %title= content_for?(:title) ? "Mete ++ " + yield(:title) : "Mete"
= csrf_meta_tags
= stylesheet_link_tag "application", :media => "all"
%link{ rel: "apple-touch-icon", sizes: "144x144", href: image_path("/apple-touch-icon-144x144-precomposed.png") }
diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml
index ab49fd1c..273e1120 100644
--- a/app/views/users/edit.html.haml
+++ b/app/views/users/edit.html.haml
@@ -1,4 +1,6 @@
- model_class = User
+- content_for :title do
+ Edit user
.page-header
%h1=t '.title', :default => t('helpers.titles.edit', :model => model_class.model_name.human, :default => "Edit #{model_class.model_name.human}")
= render :partial => "form"
diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml
index dddabbdc..823f6e87 100644
--- a/app/views/users/index.html.haml
+++ b/app/views/users/index.html.haml
@@ -1,4 +1,6 @@
- model_class = User
+- content_for :title do
+ Tap-In
- content_for :actions do
%li.nav-item
= link_to 'new user', [:new, :user], class: "nav-link"
diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml
index 943e6ace..9304f65b 100644
--- a/app/views/users/new.html.haml
+++ b/app/views/users/new.html.haml
@@ -1,3 +1,5 @@
+- content_for :title do
+ Add user
.page-header
%h1
Welcome, fellow hacker
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index f3c7e244..d2c6cf8e 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -1,4 +1,6 @@
- model_class = User
+- content_for :title do
+ User #{@user.name}
- content_for :actions do
%li.nav-item
= link_to 'edit user', edit_user_path(@user), class: "nav-link"
diff --git a/app/views/users/stats.html.haml b/app/views/users/stats.html.haml
index 4f29a2ab..9e71d90a 100644
--- a/app/views/users/stats.html.haml
+++ b/app/views/users/stats.html.haml
@@ -1,4 +1,6 @@
- model_class = User
+- content_for :title do
+ Stats
%ul
%li User count: #{@user_count}
%li Balance sum: #{show_amount @balance_sum}