]> git.parisson.com Git - teleforma.git/commitdiff
various fixes after dorothee tests
authorYoan Le Clanche <yoan@ellington.pilotsystems.net>
Wed, 26 Sep 2018 13:09:35 +0000 (15:09 +0200)
committerYoan Le Clanche <yoan@ellington.pilotsystems.net>
Wed, 26 Sep 2018 13:09:35 +0000 (15:09 +0200)
teleforma/static/teleforma/css/teleforma.css
teleforma/templates/teleforma/appointments.html
teleforma/views/appointment.py
teleforma/views/core.py

index 96ce800604c295a26f7cbe1f0c2fac445b90ac6a..facc4cef379cf72aa8579cde07948f5ca0ebc63a 100644 (file)
@@ -1154,6 +1154,21 @@ a.image-link {
     color: #000; /*#6A0307;*/
 }
 
+.appointment a button{
+       background: #444;
+       color: #fff;
+       border: 3px double #ccc;
+       padding: .1em .5em;
+       font-weight: bold;
+       cursor: pointer;
+       border-radius: 8px;
+       font-size: 100%;
+       padding: 5px 15px;      
+}
+.appointment a button:hover{
+       background: #000;
+}
+
 #action_blue {
     background-color: #357ae8;
     color: #FFF;
@@ -1936,6 +1951,102 @@ form.add_actus #id_text_parent{
     color: #BB0000;
 }
 
+
+.select-day{
+       margin-bottom: 15px;
+}
+
+.select-day .next_day,
+.select-day .previous_day{
+       cursor: pointer;
+       border: 1px solid #ccc;
+       background: #FFF;
+       padding: 2px 5px 2px 5px;
+       color: #444;
+       border-radius: 4px;
+       position: relative;
+       top: 2px;
+}
+.booking_day table{
+       margin:0;
+    padding:0;
+    background:none;
+    border:none;
+    border-collapse:collapse;
+    border-spacing:0;
+}
+
+.booking_day table tr th{
+    padding: 5px 15px;
+}
+
+.booking_day table tr td{
+    padding: 0;
+       text-align: center;
+}
+
+.booking_day table tr td button[type="submit"]{
+       padding: 5px 15px;
+       margin: 5px;
+       cursor: pointer;
+       background: #92b220;
+       color: #FFF;
+       font-size: 12px;
+       font-weight: bold;
+       border: 0;
+}
+
+.booking_day table tr td button[type="submit"]:hover{
+       background: #8aa81e;
+}
+
+.cancel_form button[type="submit"]{
+       padding: 2px 15px;
+       margin: 5px;
+       cursor: pointer;
+       font-weight: bold;
+}
+
+.booking_day table tr td strong{
+       font-size: 12px;
+       color: #444;
+}
+
+.ui-dialog .ui-dialog-titlebar-close{
+       position: relative;
+}
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus {
+    padding: 1px !important;
+}
+
+.ui-dialog .ui-dialog-titlebar-close.ui-state-hover{
+       border: 0;
+       background: transparent;
+       font-weight: bold;
+       color: #000;
+}
+
+.ui-dialog .ui-dialog-titlebar-close:before{
+       content: "X";
+       position: absolute;
+       top: 2px;
+       left: 3px;
+       color: #000;
+}
+
+#content ul.messages{
+       list-style: none;
+       padding: 0;
+    padding-left: 0px;
+       padding-left: 0;
+       font-size: 0.8em;
+       clear: both;
+}
+
+#content ul.messages li{
+       padding: 4px 10px;
+}
+
 /*! jQuery UI - v1.9.2 - 2018-09-18
 * http://jqueryui.com
 * Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.button.css, jquery.ui.dialog.css, jquery.ui.theme.css
index 811ece1313f9c5aa6f07608da1a1b1f8f1d14b99..933ee8826990f789e0da22e09c6647edcb70069b 100644 (file)
                         <table border="1">
                             <thead>
                             <tr>
-                                <th style="display:none">
+                                <th>
                                     Heure d'arrivé
                                 </th>
-                                <th>
+                                <th style="display:none">
                                     Heure de début
                                 </th>
                                 <th style="display:none">
                             {% for groupslot in day.slots.all %}
                                 {% for slot in groupslot.slots %}
                                     <tr>
-                                        <td class="arrival" style="display:none">
+                                        <td class="arrival">
                                             {{ slot.arrival|date:'H:i' }}
                                         </td>
-                                        <td class="start">
+                                        <td class="start" style="display:none">
                                             {{ slot.start|date:'H:i' }}
                                         </td>
                                         <td class="end" style="display:none">
index 269a8125a92a97b539fc4fe222621c0d7945deea..d1d04194b280fba1d2335bd972514995b6cb555f 100644 (file)
@@ -124,7 +124,9 @@ class Appointments(View):
                  'date': ap.real_date,
                  'student': ap.student,
                  'main_text': ap.period.appointment_mail_text }
+        # DEBUG
         data['mto'] = "gael@pilotsystems.net"
+        data['mto'] = "dorothee.lavalle@pre-barreau.com"
 
         subject_template = 'teleforma/messages/email_appointment_sujet.txt'
         message_template = 'teleforma/messages/email_appointment.txt'
index 5068513693b6e73a03d046b87e793be8e914e03b..31d9acff91a725ab8446b88f89075063119c32f8 100644 (file)
@@ -297,7 +297,8 @@ class CourseListView(CourseAccessMixin, ListView):
         context['doc_types'] = DocumentType.objects.all()
         context['list_view'] = True
         context['courses'] = sorted(context['all_courses'], key=lambda k: k['date'], reverse=True)[:1]
-        context['hasAppointment'] = AppointmentPeriod.objects.filter(period=context['period']).count()
+        is_student = self.request.user.student.all().count()
+        context['hasAppointment'] = AppointmentPeriod.objects.filter(period=context['period']).count() and is_student
 
         home = Home.objects.all()
         if home: