From 1acc49c29f3f060271f661986f54f8b1acd3ee7b Mon Sep 17 00:00:00 2001 From: Rohith Varma Buddaraju Date: Wed, 23 Jun 2021 17:12:49 +0530 Subject: [PATCH] Fixed views --- app/controller/adminbook.php | 4 +++- app/views/templates/adminbook.twig | 2 +- app/views/templates/adminhome.twig | 2 +- app/views/templates/adminreq.twig | 2 +- app/views/templates/adminsignin.twig | 3 +++ app/views/templates/base.twig | 35 ++++++++++++++++++++++++---- app/views/templates/bookdel.twig | 4 ++-- app/views/templates/bookreg.twig | 10 ++++---- app/views/templates/userbook.twig | 2 +- app/views/templates/userdets.twig | 4 ++-- app/views/templates/userhome.twig | 2 +- app/views/templates/usersignin.twig | 6 ++--- app/views/templates/usersignup.twig | 14 +++++------ 13 files changed, 60 insertions(+), 30 deletions(-) diff --git a/app/controller/adminbook.php b/app/controller/adminbook.php index 3dc3755..173657f 100644 --- a/app/controller/adminbook.php +++ b/app/controller/adminbook.php @@ -10,7 +10,9 @@ public function get(){ header("Location: /illegal"); }else{ $books = \Models\Admin::get_books(); - $books["users"] = str_replace(";",",",$books["users"]); + foreach($books as $b){ + $b["users"] = str_replace(";",",",$b["users"]); + } echo \View\Loader::make()->render("templates/adminbook.twig", array( books => $books )); diff --git a/app/views/templates/adminbook.twig b/app/views/templates/adminbook.twig index 34db807..404854e 100644 --- a/app/views/templates/adminbook.twig +++ b/app/views/templates/adminbook.twig @@ -17,6 +17,6 @@
- +
{% endblock %} \ No newline at end of file diff --git a/app/views/templates/adminhome.twig b/app/views/templates/adminhome.twig index f3fd737..59cd4f5 100644 --- a/app/views/templates/adminhome.twig +++ b/app/views/templates/adminhome.twig @@ -14,6 +14,6 @@
- +
{% endblock %} \ No newline at end of file diff --git a/app/views/templates/adminreq.twig b/app/views/templates/adminreq.twig index 529136f..770b228 100644 --- a/app/views/templates/adminreq.twig +++ b/app/views/templates/adminreq.twig @@ -13,7 +13,7 @@ {% endfor %}
- +
{% endblock %} diff --git a/app/views/templates/adminsignin.twig b/app/views/templates/adminsignin.twig index c22a347..048202f 100644 --- a/app/views/templates/adminsignin.twig +++ b/app/views/templates/adminsignin.twig @@ -11,6 +11,9 @@
+
+ +
{% if error %} Invalid Username or password {% endif %} diff --git a/app/views/templates/base.twig b/app/views/templates/base.twig index 90b421a..d189867 100644 --- a/app/views/templates/base.twig +++ b/app/views/templates/base.twig @@ -22,7 +22,8 @@ } input { font-size: 1vw; - padding: 0px 100px; + text-align: center; + width: 12vw; color: white; background-color: #8750A9; } @@ -38,16 +39,40 @@ color: white; background-color: #8750A9; } + .text{ + font-size: 1vw; + padding: 2px; + display: grid; + grid-template-columns: 1fr 2fr; + } + + .label{ + text-align: right; + } + + .myinput{ + font-size: 1vw; + padding: 0px; + color: black; + background-color: white; + width: 20vw; + } .text input{ - margin-left: 0px; font-size: 1vw; - padding: 10px 50px; + padding-bottom: 5px; color: black; background-color: white; + width: 20vw; + text-align: left; } - .text{ + .invert { + color: #8750A9; font-size: 1vw; - padding: 2px; + text-align: center; + width: 12vw; + background-color: white; + border: 2px solid #8750A9; + } {% block title %}{% endblock %} diff --git a/app/views/templates/bookdel.twig b/app/views/templates/bookdel.twig index 7e0a62f..3766cb3 100644 --- a/app/views/templates/bookdel.twig +++ b/app/views/templates/bookdel.twig @@ -5,11 +5,11 @@ {% block body %}

Welcome to Book Deletion

-
Book ID:
+
Book ID:

- +
{% if stat == 1 %} Deletion Successful diff --git a/app/views/templates/bookreg.twig b/app/views/templates/bookreg.twig index b6cc9f3..c512ce7 100644 --- a/app/views/templates/bookreg.twig +++ b/app/views/templates/bookreg.twig @@ -5,14 +5,14 @@ {% block body %}

Book Registraion

-
Book Name:
-
Author:
-
Publisher:
-
Quantity:
+
Book Name:

+
Author:

+
Publisher:

+
Quantity:

- +
{% if stat == 1 %} Registraion Successful diff --git a/app/views/templates/userbook.twig b/app/views/templates/userbook.twig index f273c03..9da2d8c 100644 --- a/app/views/templates/userbook.twig +++ b/app/views/templates/userbook.twig @@ -12,7 +12,7 @@ {% endfor %}
- +
{% endblock %} diff --git a/app/views/templates/userdets.twig b/app/views/templates/userdets.twig index 313ae91..e5438d5 100644 --- a/app/views/templates/userdets.twig +++ b/app/views/templates/userdets.twig @@ -5,7 +5,7 @@ {% block body %}

User Details Search

-
Username: +
Username:

@@ -20,6 +20,6 @@ Search Results No details found {% endif %}
- +
{% endblock %} \ No newline at end of file diff --git a/app/views/templates/userhome.twig b/app/views/templates/userhome.twig index 3d2652f..a5c9e9c 100644 --- a/app/views/templates/userhome.twig +++ b/app/views/templates/userhome.twig @@ -8,7 +8,7 @@
- +
Books Checked Out By You diff --git a/app/views/templates/usersignin.twig b/app/views/templates/usersignin.twig index 2d0f15b..8675b3c 100644 --- a/app/views/templates/usersignin.twig +++ b/app/views/templates/usersignin.twig @@ -4,14 +4,14 @@ {% block body %}

Welcome User

-
Username: +
Username:

-
Password: +
Password:

- + {% if error %} diff --git a/app/views/templates/usersignup.twig b/app/views/templates/usersignup.twig index 34aff3d..6736185 100644 --- a/app/views/templates/usersignup.twig +++ b/app/views/templates/usersignup.twig @@ -5,14 +5,14 @@ {% block body %}

Welcome to User Registration

-
Name:

-
Email Id:

-
Phone Number:

-
Username:
+
Name:

+
Email Id:

+
Phone Number:

+
Username:

-
Password:
+
Password:

-
Reenter Password:

+
Reenter Password:

{% if error == 1 %} @@ -22,6 +22,6 @@ Registration Success Registration Failed {% endif %}
- + {% endblock %}
Book IdNameAuthorPublisherAction