Nastya 11 mesiacov pred
rodič
commit
65a2354a52

+ 4 - 1
SharixAdmin/static/drf-yasg/navbar-style.css

@@ -6,6 +6,9 @@
     padding: 0;
     box-sizing: border-box;
 }
+body {
+    height: 130vh;
+}
 
 .nav-item {
     margin-bottom: 6px;
@@ -22,7 +25,7 @@
     display: flex;
     top: 0;
     left: 0;
-    width: 75px;
+    width: 78px;
     height: 40px;
     align-items: center;
     vertical-align: middle;

+ 25 - 5
SharixAdmin/static/drf-yasg/service_type.css

@@ -89,12 +89,15 @@ table.table {
     border-top: 1px #95C0F6;
 } */
 table.table tbody tr:hover {
-    border-bottom: 1.5px solid #95C0F6;
-    border-top: 1.5px solid #95C0F6;
-    border-left: 1.5px solid #95C0F6;
-    border-right: 1.5px solid #95C0F6;
+    box-shadow: 0px 0px 0px 1.5px #95C0F6;
+    border-radius: 10px;
+    border-top: transparent;
+    border-bottom: transparent;
+    border-left: transparent;
+    border-right: transparent;
 }
 
+
 /* test */
 
 .modal {
@@ -155,4 +158,21 @@ table.table tbody tr:hover {
 .modal.fadeOut {
     animation-name: fadeOut;
     animation-duration: 0.4s;
-}
+}
+/* table.table td {
+    border-radius: 10px;
+} */
+
+
+/* tr {
+    box-shadow: 0 0 10px 0;
+    border-radius: 10px;
+} */
+/* tbody tr:last-child {
+    border-radius: 0 0 10px 10px;
+    background-color: #f2f2f2;
+} */
+  
+/* tbody tr:not(:first-child):not(:last-child) {
+    border-radius: 0;
+} */

+ 1 - 1
SharixAdmin/templates/SharixAdmin/index.html

@@ -10,7 +10,7 @@
     <div class="row">
         <div class="col-3" id="leftmainpage">
             <div class="d-flex flex-column p-2" style="width: 100%; min-width: 72px; max-width: 280px; height: 464px; position: sticky; top: 76px;
-            border-radius: 10px; border: 1px solid #D8D8D8; box-shadow: 4px 5px 40px 0px #E5E5E5; align-items: center;">
+            border-radius: 10px; border: 1px solid #D8D8D8; box-shadow: 4px 5px 40px 0px #E5E5E5;">
 
 
               <ul class="nav nav-pills flex-column mb-auto" style="margin-top: 12px;">

+ 20 - 37
SharixAdmin/templates/SharixAdmin/service_type.html

@@ -15,6 +15,8 @@
     color: black;
   }
 </style>
+
+
     
     <div class="container">
       <h1 class="mainHeader">{{ title }}</h1>
@@ -26,42 +28,7 @@
           </div>     
 
 
-        <!-- {% comment %} {% if table.page %}
-          <nav aria-label="...">
-            <ul class="pagination">
-              {% if table.page.has_previous %}
-              <li class="page-item">
-                <a class="page-link" style="width: 10px; text-decoration: none;" href="?page={{ table.page.previous_page_number }}" tabindex="-1">{% trans 'Previous' %}</a>
-              </li>
-              {% else %}
-              <li class="page-item disabled">
-                <span class="page-link">{% trans 'Previous' %}</span>
-              </li>
-              {% endif %}
-              {% for page in table.page_range %}
-                {% if page == table.page.number %}
-                <li class="page-item active">
-                  <span class="page-link" style="width: 30px;">{{ page }} <span class="sr-only">{% trans '(current)' %}</span></span>
-                </li>
-                {% else %}
-                <li class="page-item">
-                  <a class="page-link" style="width: 30px;" href="?page={{page }}">{{ page }}</a>
-                  
-                </li>
-                {% endif %}
-              {% endfor %}
-              {% if table.page.has_next %}
-              <li class="page-item">
-                <a class="page-link" style="width: 30px; text-decoration: none;" href="?page={{ table.page.next_page_number }}">{% trans 'Next' %}</a>
-              </li>
-              {% else %}
-              <li class="page-item disabled">
-                <span class="page-link" style="width: 30px;">{% trans 'Next' %}</span>
-              </li>
-              {% endif %}
-            </ul>
-          </nav>
-        {% endif %} {% endcomment %} -->
+
   </div>
 
   <div class="container text-end mt-2">
@@ -74,7 +41,23 @@
       <div class="modal-content">
           <span id="closeModalBtn" class="close">&times;</span>
           <div class="fields">
-            
+            <h1 class="mb-4">{{ title }}</h1>
+            <form method="post" style="overflow: auto">
+                {% csrf_token %}
+                <div class="container m-2">
+                    {% for field in form %}
+                    {{field.errors}}
+                    <div class="row">
+                        {{field.label_tag}}
+                        {{field}}
+                        <p class="fs-6 fst-italic">{{field.help_text|truncatewords:20}}</p>
+                    </div>
+                    {% endfor %}
+                </div>
+                <div class="text-center mt-2 mb-5">
+                    <input class="btn btn-primary center" type="Submit" name="submit" value="{% trans 'Submit' %}"/>
+                </div>
+            </form>
           </div>
       </div>
   </div>

+ 17 - 29
SharixAdmin/templates/SharixAdmin/service_type_form.html

@@ -1,34 +1,22 @@
 
 {% load i18n %}
 
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title></title>
-</head>
-<body>
-    <h1 class="mb-4">{{ title }}</h1>
-    <form method="post" style="overflow: auto">
-        {% csrf_token %}
-        <div class="container m-2">
-            {% for field in form %}
-            {{field.errors}}
-            <div class="row">
-                {{field.label_tag}}
-                {{field}}
-                <p class="fs-6 fst-italic">{{field.help_text|truncatewords:20}}</p>
-            </div>
-            {% endfor %}
-        </div>
-        <div class="text-center mt-2 mb-5">
-            <input class="btn btn-primary center" type="Submit" name="submit" value="{% trans 'Submit' %}"/>
-        </div>
-    </form>
-</body>
-</html>
-
-
 
+<h1 class="mb-4">{{ title }}</h1>
+<form method="post" style="overflow: auto">
+    {% csrf_token %}
+    <div class="container m-2">
+        {% for field in form %}
+        {{field.errors}}
+        <div class="row">
+            {{field.label_tag}}
+            {{field}}
+            <p class="fs-6 fst-italic">{{field.help_text|truncatewords:20}}</p>
+        </div>
+        {% endfor %}
+    </div>
+    <div class="text-center mt-2 mb-5">
+        <input class="btn btn-primary center" type="Submit" name="submit" value="{% trans 'Submit' %}"/>
+    </div>
+</form>
 

+ 3 - 2
SharixAdmin/views/service_type.py

@@ -8,6 +8,8 @@ from django.urls import reverse
 from SharixAdmin.views.context import get_context
 from django.utils.translation import gettext as _
 
+    
+    
 class ServiceTypeCreate(UserPassesTestMixin, CreateView):
     model = ServiceType
     form_class = ServiceTypeCreateForm
@@ -16,7 +18,7 @@ class ServiceTypeCreate(UserPassesTestMixin, CreateView):
     def get_context_data(self, **kwargs):
         context = super().get_context_data(**kwargs)
         context.update(get_context(self.request, {
-            'title': _('Услуги сервиса'),
+            'title': _('Услуги сервиса test'),
             'object': self.object,
         }))
         return context
@@ -30,7 +32,6 @@ class ServiceTypeCreate(UserPassesTestMixin, CreateView):
             return True
         return False
     
-