Skip to content

Commit

Permalink
show custom titles
Browse files Browse the repository at this point in the history
  • Loading branch information
JuzerShakir committed Dec 20, 2023
1 parent 14a0c74 commit d7eba89
Show file tree
Hide file tree
Showing 25 changed files with 50 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>FMB</title>
<title><%= content_for(:title) || "FMB" %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
Expand Down
2 changes: 2 additions & 0 deletions app/views/sabeels/active.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Active Sabeels - #{@apt.titleize}" %>

<%# * Title %>
<h2 class="heading">Active Sabeels: <span class="text-secondary"><%= @apt.titleize %></span></h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/sabeels/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Edit Sabeel" %>

<h2 class="heading mb-3">Edit Sabeel</h2>

<%= render "form" %>
4 changes: 3 additions & 1 deletion app/views/sabeels/inactive.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<% content_for :title, "Inactive Sabeels - #{@apt.titleize}" %>

<%# * Title %>
<h2 class="heading">Inactive Sabeels: <span class="text-secondary"><%= @apt.titleize.to_s %></span></h2>
<h2 class="heading">Inactive Sabeels: <span class="text-secondary"><%= @apt.titleize %></span></h2>

<%# * show all sabeels %>
<%= render "shared/results", model: "sabeels", url: sabeels_inactive_path(format: :turbo_stream) %>
2 changes: 2 additions & 0 deletions app/views/sabeels/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Sabeels" %>

<%# * Title %>
<h2 class="heading">Sabeels</h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/sabeels/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "New Sabeel" %>

<h2 class="heading mb-3">New Sabeel</h2>

<%= render "form" %>
2 changes: 2 additions & 0 deletions app/views/sabeels/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, @sabeel.name %>

<%= render @sabeel %>

<%# * action buttons %>
Expand Down
2 changes: 2 additions & 0 deletions app/views/sabeels/stats.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Sabeel Statistics" %>

<%# * Title %>
<h2 class="heading">Sabeel Statistics: <span class=" text-secondary "><%= CURR_YR %></span></h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Login" %>

<%# * Title %>
<h2 class="heading fs-1">Faizul Mawaid il Burhaniyah</h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/thaalis/all.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Thaalis in #{@year}" %>

<%# * Title %>
<h2 class="heading">Thaalis in <span class="text-secondary"><%= @year.to_s %></span> </h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/thaalis/complete.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Completed Takhmeens in #{@year}" %>

<%# * Title %>
<h2 class="heading">Completed Takhmeens in <span class="text-secondary"> <%= @year.to_s %></span> </h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/thaalis/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Edit Thaali" %>

<h2 class="heading mb-3">Edit Thaali</h2>

<%= render "form", url_helper: thaali_path %>
2 changes: 2 additions & 0 deletions app/views/thaalis/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Thaalis" %>

<%# * Title %>
<h2 class="heading">Thaalis in <span class="text-secondary"><%= CURR_YR %></span></h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/thaalis/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "New Thaali" %>

<h2 class="heading mb-3">New Thaali</h2>

<%= render "form", url_helper: sabeel_thaalis_path %>
2 changes: 2 additions & 0 deletions app/views/thaalis/pending.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Pending Takhmeens in #{@year}" %>

<%# * Title %>
<h2 class="heading">Pending Takhmeens in <span class="text-secondary"> <%= @year.to_s %></span> </h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/thaalis/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Thaali no. #{@thaali.number}" %>

<%= render @thaali %>

<%# * action buttons %>
Expand Down
2 changes: 2 additions & 0 deletions app/views/thaalis/stats.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Thaali Statstics" %>

<%# * Title %>
<h2 class="heading">Thaali Statistics</h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/transactions/all.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Transactions" %>

<%# * Title %>
<h2 class="heading">Transactions</h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/transactions/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<%# locals: (total_balance: @transaction.thaali_balance + @transaction.amount_was) -%>

<% content_for :title, "Edit Transaction" %>

<h2 class="heading mb-3">Edit Transaction</h2>

<%= render "form", url_helper: transaction_path, total_balance: %>
2 changes: 2 additions & 0 deletions app/views/transactions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<%# locals: (total_balance: @thaali.balance) -%>

<% content_for :title, "New Transaction" %>

<h2 class="heading mb-3">New Transaction</h2>

<%= render "form", url_helper: thaali_transactions_path, total_balance: %>
2 changes: 2 additions & 0 deletions app/views/transactions/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Recipe: #{@transaction.recipe_no}" %>

<%= render @transaction %>

<%# * action buttons %>
Expand Down
2 changes: 2 additions & 0 deletions app/views/users/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Change Password" %>

<%# * Title %>
<h2 class="heading mb-3">Change Password</h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/users/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "Users" %>

<%# * Title %>
<h2 class="heading">All Users</h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/users/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<%# locals: (roles: Role.all.map { [_1.name.capitalize, _1.id] }) %>

<% content_for :title, "New User" %>

<%# * Title %>
<h2 class="heading mb-3">New User</h2>

Expand Down
2 changes: 2 additions & 0 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% content_for :title, "User: #{@user.name}" %>

<%= render @user %>

<%# * action buttons %>
Expand Down

0 comments on commit d7eba89

Please sign in to comment.