|
17 | 17 | defined( 'ABSPATH' ) || exit; ?> |
18 | 18 |
|
19 | 19 | <?php if ( ( $type != 'digi-group' ) && ( $type != 'digi-workunit' ) ) : ?> |
20 | | - <h3><?php esc_html_e( 'Document unique', 'digirisk' ); ?></h3> |
21 | | - |
22 | | - <div class="wpeo-gridlayout grid-3"> |
23 | | - <p> |
24 | | - <span><?php esc_html_e( 'Date dernière impression:', 'digirisk' ); ?></span> |
25 | | - <span><strong><?php echo ( ! empty( $current_duer ) ) ? $current_duer->data['date']['rendered']['date'] : __( 'N/A', 'digirisk' ); ?></strong></span> |
26 | | - </p> |
27 | | - <p><?php printf( __( 'Mise à jour obligatoire tous les <strong>%d</strong> jours', 'digirisk' ), $general_options['required_duer_day'] ); ?></p> |
28 | | - <p><?php printf( __( 'Nombre de jours restant avant la prochaine mise à jour obligatoire: <strong>%s</strong> jours', 'digirisk' ), ! empty( $date_before_next_duer ) ? $date_before_next_duer : 'N/A' ); ?></p> |
29 | | - </div> |
| 20 | + <h3><?php esc_html_e( 'Document unique', 'digirisk' ); ?></h3> |
| 21 | + |
| 22 | + <div class="wpeo-gridlayout grid-3"> |
| 23 | + <p> |
| 24 | + <span><?php esc_html_e( 'Date dernière impression:', 'digirisk' ); ?></span> |
| 25 | + <span><strong><?php echo ( ! empty( $current_duer ) ) ? $current_duer->data['date']['rendered']['date'] : __( 'N/A', 'digirisk' ); ?></strong></span> |
| 26 | + </p> |
| 27 | + <p><?php printf( __( 'Mise à jour obligatoire tous les <strong>%d</strong> jours', 'digirisk' ), $general_options['required_duer_day'] ); ?></p> |
| 28 | + <p><?php printf( __( 'Nombre de jours restant avant la prochaine mise à jour obligatoire: <strong>%s</strong> jours', 'digirisk' ), ! empty( $date_before_next_duer ) ? $date_before_next_duer : 'N/A' ); ?></p> |
| 29 | + </div> |
| 30 | + |
| 31 | + <h3><?php esc_html_e( 'Accident', 'digirisk' ); ?></h3> |
| 32 | + |
| 33 | + <div class="wpeo-gridlayout grid-3"> |
| 34 | + <p> |
| 35 | + <span><?php esc_html_e( 'Date du dernier accident:', 'digirisk' ); ?></span> |
| 36 | + |
| 37 | + <span><strong><?php echo ( ! empty( $accident ) ) ? $accident->data['accident_date']['rendered']['date'] : __( 'N/A', 'digirisk' ); ?></strong></span> |
| 38 | + </p> |
| 39 | + |
| 40 | + <p> |
| 41 | + <span><?php esc_html_e( 'Nombre de jour sans accident:', 'digirisk' ); ?></span> |
| 42 | + |
| 43 | + <span><strong><?php echo isset($days_without_accident) ? $days_without_accident : __( 'N/A', 'digirisk' ); ?></strong></span> |
| 44 | + </p> |
| 45 | + <p><?php printf( __( 'Unité de Travail concernée: <strong>%s</strong>', 'digirisk' ), ! empty( $accident ) ? $accident->data['place']->data['unique_identifier'] . ' - ' . $accident->data['place']->data['title'] : 'N/A' ); ?></p> |
| 46 | + </div> |
| 47 | +<?php endif; ?> |
30 | 48 |
|
31 | | - <h3><?php esc_html_e( 'Accident', 'digirisk' ); ?></h3> |
| 49 | +<?php $id = ! empty( $_POST['id'] ) ? (int) $_POST['id'] : 0; ?> |
32 | 50 |
|
33 | | - <div class="wpeo-gridlayout grid-3"> |
34 | | - <p> |
35 | | - <span><?php esc_html_e( 'Date du dernier accident:', 'digirisk' ); ?></span> |
| 51 | +<?php if ( $id != 0 && ( ( $type == 'digi-group' ) || ( $type == 'digi-workunit' ) ) ) : |
| 52 | + $society = Society_Class::g()->show_by_type($id) ?> |
36 | 53 |
|
37 | | - <span><strong><?php echo ( ! empty( $accident ) ) ? $accident->data['accident_date']['rendered']['date'] : __( 'N/A', 'digirisk' ); ?></strong></span> |
38 | | - </p> |
39 | 54 |
|
40 | | - <p> |
41 | | - <span><?php esc_html_e( 'Nombre de jour sans accident:', 'digirisk' ); ?></span> |
| 55 | + <?php if ( $type == 'digi-group' ) : ?> |
| 56 | + <h3><?php esc_html_e ('Description d\'un GP' , 'digirisk') ;?></h3> |
| 57 | + <?php endif; ?> |
| 58 | + <?php if ( $type == 'digi-workunit' ) : ?> |
| 59 | + <h3><?php esc_html_e ('Description d\'une UT' , 'digirisk') ;?></h3> |
| 60 | + <?php endif; ?> |
| 61 | + <div class="society-description"> |
| 62 | + <textarea type="text" style="width: 90% !important;" value="<?php printf($society->data['content']);?>" name="societyDescription"><?php printf($society->data['content']);?></textarea> |
| 63 | + <input type="hidden" name="idSociety" value="<?php echo $society->data['id'] ;?>"> |
| 64 | + <input type="hidden" name="action" value="save_society_description"> |
42 | 65 |
|
43 | | - <span><strong><?php echo isset($days_without_accident) ? $days_without_accident : __( 'N/A', 'digirisk' ); ?></strong></span> |
44 | | - </p> |
45 | | - <p><?php printf( __( 'Unité de Travail concernée: <strong>%s</strong>', 'digirisk' ), ! empty( $accident ) ? $accident->data['place']->data['unique_identifier'] . ' - ' . $accident->data['place']->data['title'] : 'N/A' ); ?></p> |
| 66 | + <div class="wpeo-button button-green button-square-50 action-input save active" |
| 67 | + data-parent="society-description"> |
| 68 | + <i class="button-icon fas fa-save"></i> |
| 69 | + </div> |
46 | 70 | </div> |
47 | 71 | <?php endif; ?> |
48 | 72 |
|
49 | | -<h3><?php esc_html_e( 'Analyse par unité de travail ou GP', 'digirisk' ); ?></h3> |
| 73 | +<h3><?php esc_html_e( 'Analyse par unité de travail ou GP', 'digirisk' ); ?> </h3> |
50 | 74 |
|
51 | 75 | <div class="wpeo-gridlayout grid-3"> |
52 | | - <p> |
53 | | - <span><?php esc_html_e( 'Date de l\'action:', 'digirisk' ); ?></span> |
54 | | - <span><strong><?php echo ( ! empty( $historic_update ) && isset( $historic_update['date']['date'] ) ) ? $historic_update['date']['date'] : 'N/A'; ?></strong></span> |
55 | | - </p> |
56 | | - <p><?php printf( __( 'UT ou GP: <strong>%s</strong>', 'digirisk' ), ( ! empty( $historic_update['parent_id'] ) ) ? $historic_update['parent']->data['unique_identifier'] . ' - ' . $historic_update['parent']->data['title'] : 'N/A' ); ?></p> |
57 | | - <p><?php printf( __( 'Description de l\'action: <strong>%s</strong>', 'digirisk' ), ! empty( $historic_update ) ? $historic_update['content'] : 'N/A' ); ?></p> |
| 76 | + <p> |
| 77 | + <span><?php esc_html_e( 'Date de l\'action:', 'digirisk' ); ?></span> |
| 78 | + <span><strong><?php echo ( ! empty( $historic_update ) && isset( $historic_update['date']['date'] ) ) ? $historic_update['date']['date'] : 'N/A'; ?></strong></span> |
| 79 | + </p> |
| 80 | + <p><?php printf( __( 'UT ou GP: <strong>%s</strong>', 'digirisk' ), ( ! empty( $historic_update['parent_id'] ) ) ? $historic_update['parent']->data['unique_identifier'] . ' - ' . $historic_update['parent']->data['title'] : 'N/A' ); ?></p> |
| 81 | + <p><?php printf( __( 'Description de l\'action: <strong>%s</strong>', 'digirisk' ), ! empty( $historic_update ) ? $historic_update['content'] : 'N/A' ); ?></p> |
58 | 82 | </div> |
59 | 83 |
|
60 | 84 | <h3><?php _e( 'Analyse par personne', 'digirisk' ); ?></h3> |
61 | 85 |
|
62 | 86 | <div class="wpeo-gridlayout grid-3"> |
63 | | - <p> |
64 | | - <span><?php _e( 'Nombre de personnes sur l\'établissement:', 'digirisk' ); ?></span> |
65 | | - <span><strong><?php echo esc_html( $total_users ); ?></strong></span> |
66 | | - </p> |
67 | | - <p><?php printf( __( 'Nombre de personnes impliqués: <strong>%s évaluateur(s)</strong>', 'digirisk' ), $number_evaluator ); ?></p> |
68 | | - <p><?php printf( __( 'Pourcentage: <strong>%s</strong>', 'digirisk' ), $average ); ?></p> |
| 87 | + <p> |
| 88 | + <span><?php _e( 'Nombre de personnes sur l\'établissement:', 'digirisk' ); ?></span> |
| 89 | + <span><strong><?php echo esc_html( $total_users ); ?></strong></span> |
| 90 | + </p> |
| 91 | + <p><?php printf( __( 'Nombre de personnes impliqués: <strong>%s évaluateur(s)</strong>', 'digirisk' ), $number_evaluator ); ?></p> |
| 92 | + <p><?php printf( __( 'Pourcentage: <strong>%s</strong>', 'digirisk' ), $average ); ?></p> |
69 | 93 | </div> |
70 | 94 |
|
71 | 95 | <div class="section-risk"></div> |
0 commit comments