From d7eba89227c9d806570f69a649fdc6d41eff08c2 Mon Sep 17 00:00:00 2001 From: Juzer Shakir Date: Wed, 20 Dec 2023 12:24:02 +0530 Subject: [PATCH] show custom titles --- app/views/layouts/application.html.erb | 2 +- app/views/sabeels/active.html.erb | 2 ++ app/views/sabeels/edit.html.erb | 2 ++ app/views/sabeels/inactive.html.erb | 4 +++- app/views/sabeels/index.html.erb | 2 ++ app/views/sabeels/new.html.erb | 2 ++ app/views/sabeels/show.html.erb | 2 ++ app/views/sabeels/stats.html.erb | 2 ++ app/views/sessions/new.html.erb | 2 ++ app/views/thaalis/all.html.erb | 2 ++ app/views/thaalis/complete.html.erb | 2 ++ app/views/thaalis/edit.html.erb | 2 ++ app/views/thaalis/index.html.erb | 2 ++ app/views/thaalis/new.html.erb | 2 ++ app/views/thaalis/pending.html.erb | 2 ++ app/views/thaalis/show.html.erb | 2 ++ app/views/thaalis/stats.html.erb | 2 ++ app/views/transactions/all.html.erb | 2 ++ app/views/transactions/edit.html.erb | 2 ++ app/views/transactions/new.html.erb | 2 ++ app/views/transactions/show.html.erb | 2 ++ app/views/users/edit.html.erb | 2 ++ app/views/users/index.html.erb | 2 ++ app/views/users/new.html.erb | 2 ++ app/views/users/show.html.erb | 2 ++ 25 files changed, 50 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 809c66a7..870477fe 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ - FMB + <%= content_for(:title) || "FMB" %> <%= csrf_meta_tags %> <%= csp_meta_tag %> diff --git a/app/views/sabeels/active.html.erb b/app/views/sabeels/active.html.erb index 20e49d8b..a4789128 100644 --- a/app/views/sabeels/active.html.erb +++ b/app/views/sabeels/active.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Active Sabeels - #{@apt.titleize}" %> + <%# * Title %>

Active Sabeels: <%= @apt.titleize %>

diff --git a/app/views/sabeels/edit.html.erb b/app/views/sabeels/edit.html.erb index 93dc567c..35369b97 100644 --- a/app/views/sabeels/edit.html.erb +++ b/app/views/sabeels/edit.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Edit Sabeel" %> +

Edit Sabeel

<%= render "form" %> diff --git a/app/views/sabeels/inactive.html.erb b/app/views/sabeels/inactive.html.erb index 320f25a7..7c675879 100644 --- a/app/views/sabeels/inactive.html.erb +++ b/app/views/sabeels/inactive.html.erb @@ -1,5 +1,7 @@ +<% content_for :title, "Inactive Sabeels - #{@apt.titleize}" %> + <%# * Title %> -

Inactive Sabeels: <%= @apt.titleize.to_s %>

+

Inactive Sabeels: <%= @apt.titleize %>

<%# * show all sabeels %> <%= render "shared/results", model: "sabeels", url: sabeels_inactive_path(format: :turbo_stream) %> diff --git a/app/views/sabeels/index.html.erb b/app/views/sabeels/index.html.erb index 38006112..6309e12f 100644 --- a/app/views/sabeels/index.html.erb +++ b/app/views/sabeels/index.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Sabeels" %> + <%# * Title %>

Sabeels

diff --git a/app/views/sabeels/new.html.erb b/app/views/sabeels/new.html.erb index 6446f94e..fedcbdec 100644 --- a/app/views/sabeels/new.html.erb +++ b/app/views/sabeels/new.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "New Sabeel" %> +

New Sabeel

<%= render "form" %> diff --git a/app/views/sabeels/show.html.erb b/app/views/sabeels/show.html.erb index c8a51a84..d41c2b3b 100644 --- a/app/views/sabeels/show.html.erb +++ b/app/views/sabeels/show.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, @sabeel.name %> + <%= render @sabeel %> <%# * action buttons %> diff --git a/app/views/sabeels/stats.html.erb b/app/views/sabeels/stats.html.erb index 39bdfbb9..2d307b86 100644 --- a/app/views/sabeels/stats.html.erb +++ b/app/views/sabeels/stats.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Sabeel Statistics" %> + <%# * Title %>

Sabeel Statistics: <%= CURR_YR %>

diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index f1c65c56..d2039d69 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Login" %> + <%# * Title %>

Faizul Mawaid il Burhaniyah

diff --git a/app/views/thaalis/all.html.erb b/app/views/thaalis/all.html.erb index 2f1fe96a..8452ed4e 100644 --- a/app/views/thaalis/all.html.erb +++ b/app/views/thaalis/all.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Thaalis in #{@year}" %> + <%# * Title %>

Thaalis in <%= @year.to_s %>

diff --git a/app/views/thaalis/complete.html.erb b/app/views/thaalis/complete.html.erb index 97b88736..40f6dc31 100644 --- a/app/views/thaalis/complete.html.erb +++ b/app/views/thaalis/complete.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Completed Takhmeens in #{@year}" %> + <%# * Title %>

Completed Takhmeens in <%= @year.to_s %>

diff --git a/app/views/thaalis/edit.html.erb b/app/views/thaalis/edit.html.erb index 4e82dcd4..9565b1e1 100644 --- a/app/views/thaalis/edit.html.erb +++ b/app/views/thaalis/edit.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Edit Thaali" %> +

Edit Thaali

<%= render "form", url_helper: thaali_path %> diff --git a/app/views/thaalis/index.html.erb b/app/views/thaalis/index.html.erb index f8078acb..a775777e 100644 --- a/app/views/thaalis/index.html.erb +++ b/app/views/thaalis/index.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Thaalis" %> + <%# * Title %>

Thaalis in <%= CURR_YR %>

diff --git a/app/views/thaalis/new.html.erb b/app/views/thaalis/new.html.erb index 7cdce93d..9d93268d 100644 --- a/app/views/thaalis/new.html.erb +++ b/app/views/thaalis/new.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "New Thaali" %> +

New Thaali

<%= render "form", url_helper: sabeel_thaalis_path %> diff --git a/app/views/thaalis/pending.html.erb b/app/views/thaalis/pending.html.erb index 8376a364..8f48454b 100644 --- a/app/views/thaalis/pending.html.erb +++ b/app/views/thaalis/pending.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Pending Takhmeens in #{@year}" %> + <%# * Title %>

Pending Takhmeens in <%= @year.to_s %>

diff --git a/app/views/thaalis/show.html.erb b/app/views/thaalis/show.html.erb index e85ccc29..6ba9984d 100644 --- a/app/views/thaalis/show.html.erb +++ b/app/views/thaalis/show.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Thaali no. #{@thaali.number}" %> + <%= render @thaali %> <%# * action buttons %> diff --git a/app/views/thaalis/stats.html.erb b/app/views/thaalis/stats.html.erb index 2790e9d7..1596af74 100644 --- a/app/views/thaalis/stats.html.erb +++ b/app/views/thaalis/stats.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Thaali Statstics" %> + <%# * Title %>

Thaali Statistics

diff --git a/app/views/transactions/all.html.erb b/app/views/transactions/all.html.erb index f4c14e91..28a96017 100644 --- a/app/views/transactions/all.html.erb +++ b/app/views/transactions/all.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Transactions" %> + <%# * Title %>

Transactions

diff --git a/app/views/transactions/edit.html.erb b/app/views/transactions/edit.html.erb index caa5c41b..e067d7f9 100644 --- a/app/views/transactions/edit.html.erb +++ b/app/views/transactions/edit.html.erb @@ -1,5 +1,7 @@ <%# locals: (total_balance: @transaction.thaali_balance + @transaction.amount_was) -%> +<% content_for :title, "Edit Transaction" %> +

Edit Transaction

<%= render "form", url_helper: transaction_path, total_balance: %> diff --git a/app/views/transactions/new.html.erb b/app/views/transactions/new.html.erb index 364e945f..824a71fd 100644 --- a/app/views/transactions/new.html.erb +++ b/app/views/transactions/new.html.erb @@ -1,5 +1,7 @@ <%# locals: (total_balance: @thaali.balance) -%> +<% content_for :title, "New Transaction" %> +

New Transaction

<%= render "form", url_helper: thaali_transactions_path, total_balance: %> diff --git a/app/views/transactions/show.html.erb b/app/views/transactions/show.html.erb index f0ae1091..1ec8dab4 100644 --- a/app/views/transactions/show.html.erb +++ b/app/views/transactions/show.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Recipe: #{@transaction.recipe_no}" %> + <%= render @transaction %> <%# * action buttons %> diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 89728d96..0bb4e359 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Change Password" %> + <%# * Title %>

Change Password

diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 8d188594..125934ac 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Users" %> + <%# * Title %>

All Users

diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 8f6a67bf..f969785f 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -1,5 +1,7 @@ <%# locals: (roles: Role.all.map { [_1.name.capitalize, _1.id] }) %> +<% content_for :title, "New User" %> + <%# * Title %>

New User

diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 0a958cda..572a9bf9 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "User: #{@user.name}" %> + <%= render @user %> <%# * action buttons %>