Skip to content

Commit

Permalink
Adds page specific html titles
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwerkel committed Sep 17, 2023
1 parent 75c893b commit 872fd6e
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/views/audits/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
- model_class = Audit
- content_for :title do
Audits

= form_tag({}, { :class => 'form-horizontal', :method => :get }) do
.mb-3
Expand Down
2 changes: 2 additions & 0 deletions app/views/barcodes/index.html.haml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions app/views/barcodes/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :title do
Add barcode
.page-header
%h1
New Barcode
Expand Down
2 changes: 2 additions & 0 deletions app/views/drinks/edit.html.haml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 2 additions & 0 deletions app/views/drinks/index.html.haml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions app/views/drinks/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :title do
Add drink
.page-header
%h1
New Drink
Expand Down
2 changes: 2 additions & 0 deletions app/views/drinks/show.html.haml
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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") }
Expand Down
2 changes: 2 additions & 0 deletions app/views/users/edit.html.haml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 2 additions & 0 deletions app/views/users/index.html.haml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions app/views/users/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :title do
Add user
.page-header
%h1
Welcome, fellow hacker
Expand Down
2 changes: 2 additions & 0 deletions app/views/users/show.html.haml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions app/views/users/stats.html.haml
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 872fd6e

Please sign in to comment.