diff --git a/src/nineskeletor-1.0/src/Command/CronInitCommand.php b/src/nineskeletor-1.0/src/Command/CronInitCommand.php index 6c55ab4..fb75a33 100644 --- a/src/nineskeletor-1.0/src/Command/CronInitCommand.php +++ b/src/nineskeletor-1.0/src/Command/CronInitCommand.php @@ -59,17 +59,14 @@ class CronInitCommand extends Command protected function insertCron() { $metadata = $this->em->getClassMetaData('App:Cron'); - $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); - $metadata->setIdGenerator(new AssignedGenerator()); // Job Mail // Toute les minutes - $entity = $this->em->getRepository('App:Cron')->find(1); + $entity = $this->em->getRepository('App:Cron')->findOneBy(["command"=>"app:sendMail"]); if(!$entity) { $entity = new Cron; $entity->setCommand("app:sendMail"); $entity->setDescription("Execution du spool de mail en attente"); - $entity->setId(1); $entity->setStatut(2); $entity->setRepeatcall(0); $entity->setRepeatexec(0); @@ -81,14 +78,13 @@ class CronInitCommand extends Command // Job de purge des fichiers obsolète // Toute les 24h à 3h00 - $entity = $this->em->getRepository('App:Cron')->find(200); + $entity = $this->em->getRepository('App:Cron')->findOneBy(["command"=>"app:purgeFile"]); if(!$entity) { $entity = new Cron; $nextdate=$entity->getSubmitdate(); $nextdate->setTime(3,0); $entity->setCommand("app:purgeFile"); $entity->setDescription("Suppression des fichiers obsolètes"); - $entity->setId(200); $entity->setStatut(2); $entity->setRepeatcall(0); $entity->setRepeatexec(0); @@ -99,14 +95,13 @@ class CronInitCommand extends Command // Job synchronisation des comptes utilisateur // Toute les 24h à 3h00 - $entity = $this->em->getRepository('App:Cron')->find(100); + $entity = $this->em->getRepository('App:Cron')->findOneBy(["command"=>"app:synchroUsers"]); if(!$entity) { $entity = new Cron; $nextdate=$entity->getSubmitdate(); $nextdate->setTime(3,0); $entity->setCommand("app:synchroUsers"); $entity->setDescription("Synchronisation des comptes utilisateurs"); - $entity->setId(100); $entity->setStatut(2); $entity->setRepeatcall(0); $entity->setRepeatexec(0); @@ -118,14 +113,13 @@ class CronInitCommand extends Command // Job Dump // Toute les 24h à 2h00 - $entity = $this->em->getRepository('App:Cron')->find(220); + $entity = $this->em->getRepository('App:Cron')->findOneBy(["command"=>"app:dumpBdd"]); if(!$entity) { $entity = new Cron; $nextdate=$entity->getSubmitdate(); $nextdate->setTime(2,0); $entity->setCommand("app:dumpBdd"); $entity->setDescription("Sauvegarde de la BDD"); - $entity->setId(220); $entity->setStatut(2); $entity->setRepeatcall(0); $entity->setRepeatexec(0); diff --git a/src/nineskeletor-1.0/src/Command/SynchroUsersCommand.php b/src/nineskeletor-1.0/src/Command/SynchroUsersCommand.php index 2e72c94..42ec8b2 100644 --- a/src/nineskeletor-1.0/src/Command/SynchroUsersCommand.php +++ b/src/nineskeletor-1.0/src/Command/SynchroUsersCommand.php @@ -228,17 +228,12 @@ class SynchroUsersCommand extends Command } } - if(!$simulate) { - $this->em->clear(); - } - if($nbusers%1000==0) $this->writeln(" == Nombre d'utilisateurs traités = $nbusers sur $nbuserstotal =="); } if(!$simulate) { $this->writeln(" == Nombre d'utilisateurs traités = $nbusers sur $nbuserstotal =="); $this->em->flush(); - $this->em->clear(); } foreach($tberrors as $error) { @@ -348,7 +343,6 @@ class SynchroUsersCommand extends Command unset($flipped[$data["username"]]); } - $this->em->clear(); if($nbusers%1000==0) $this->writelnred(" == Nombre d'utilisateurs traités = $nbusers=="); } diff --git a/src/nineskeletor-1.0/src/Form/ActivityType.php b/src/nineskeletor-1.0/src/Form/ActivityType.php deleted file mode 100644 index 462b1f0..0000000 --- a/src/nineskeletor-1.0/src/Form/ActivityType.php +++ /dev/null @@ -1,143 +0,0 @@ -add('submit', - SubmitType::class, [ - "label" => "Valider", - "attr" => ["class" => "btn btn-success"], - ] - ); - - if($options["status"]==0) { - $builder->add('distribution', - SubmitType::class, [ - "label" => "Distribuer", - "attr" => [ - "class" => "btn btn-success", - "data-method" => "submit", - "data-confirm" => "Confirmez vous la distribution de l'activité ? Une foi validée, vous ne pourrez plus modifier son entête et son énoncé." ], - ] - ); - } - - if($options["status"]==1) { - $builder->add('archiving', - SubmitType::class, [ - "label" => "Archiver", - "attr" => [ - "class" => "btn btn-danger float-right", - "data-method" => "submit", - "data-confirm" => "Confirmez vous l'archivage' de l'activité ?" ], - ] - ); - } - - if($options["status"]==10) { - $builder->add('distribution', - SubmitType::class, [ - "label" => "Réouvrir", - "attr" => [ - "class" => "btn btn-success", - "data-method" => "submit", - "data-confirm" => "Confirmez vous la réouverture de l'activité ?" ], - ] - ); - } - - $builder->add('name', - TextType::class, [ - "disabled" => ($options["status"]>0), - "label" =>"Nom", - ] - ); - - $builder->add('subject', - TextType::class, [ - "disabled" => ($options["status"]>0), - "required" => false, - "label" =>"Matière", - ] - ); - - $builder->add('group', - Select2EntityType::class, [ - "label" => "Groupe", - "disabled" => ($options["status"]>0), - "required" => true, - "multiple" => false, - "remote_route" => "app_group_select", - "class" => "App:Group", - "primary_key" => "id", - "text_property" => "name", - "minimum_input_length" => 0, - "page_limit" => 100, - "allow_clear" => true, - "delay" => 250, - "cache" => false, - "cache_timeout" => 60000, - "language" => "fr", - "placeholder" => "Selectionner un Groupe", - ] - ); - - $builder->add('activity', - CKEditorType::class, [ - "disabled" => ($options["status"]>0), - "required" => false, - "config" => [ - 'uiColor' => '#ffffff', - 'height' => 600, - 'filebrowserUploadRoute' => 'app_ckeditor_upload', - 'language' => 'fr', - ], - ] - ); - - $builder->add('corrected', - CKEditorType::class, [ - "disabled" => ($options["status"]==10), - "required" => false, - "config" => [ - 'uiColor' => '#ffffff', - 'height' => 600, - 'filebrowserUploadRoute' => 'app_ckeditor_upload', - 'language' => 'fr', - ], - ] - ); - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults(array( - 'data_class' => 'App\Entity\Activity', - 'mode' => 'string', - 'status' => 'integer', - )); - } -} diff --git a/src/nineskeletor-1.0/src/Form/ActivitymessageType.php b/src/nineskeletor-1.0/src/Form/ActivitymessageType.php deleted file mode 100644 index 6f34989..0000000 --- a/src/nineskeletor-1.0/src/Form/ActivitymessageType.php +++ /dev/null @@ -1,81 +0,0 @@ -add('submit', - SubmitType::class, [ - "label" => "Envoyer", - "attr" => ["class" => "btn btn-success"], - ] - ); - - $builder->add('message', - CKEditorType::class, [ - "mapped" => false, - "required" => true, - "config_name" => 'small_config', - "config" => [ - 'uiColor' => '#ffffff', - 'height' => 150, - 'filebrowserUploadRoute' => 'app_ckeditor_upload', - 'language' => 'fr', - ], - ] - ); - - $builder->add('answers', - Select2EntityType::class, [ - "label" => "Elèves", - "mapped" => false, - "required" => true, - "multiple" => true, - "remote_route" => "app_answer_select", - "remote_params" => ["activity"=>$options["id"]], - "class" => "App:Answer", - "primary_key" => "id", - "text_property" => "displayname", - "minimum_input_length" => 0, - "page_limit" => 100, - "allow_clear" => true, - "delay" => 250, - "cache" => false, - "cache_timeout" => 60000, - "language" => "fr", - "placeholder" => "Selectionner des élèves", - ] - ); - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults(array( - 'data_class' => 'App\Entity\Activity', - 'mode' => 'string', - 'id' => 'integer', - )); - } -} diff --git a/src/nineskeletor-1.0/src/Form/AnswerType.php b/src/nineskeletor-1.0/src/Form/AnswerType.php deleted file mode 100644 index 487c234..0000000 --- a/src/nineskeletor-1.0/src/Form/AnswerType.php +++ /dev/null @@ -1,71 +0,0 @@ -add('submit', - SubmitType::class, [ - "label" => "Valider", - "attr" => ["class" => "btn btn-success"], - ] - ); - - if($options["status"]<10 && $options["activitystatus"] == 1) { - $builder->add('returned', - SubmitType::class, [ - "label" => "Rendre l'activité", - "attr" => [ - "class" => "btn btn-success", - "data-method" => "submit", - "data-confirm" => "Confirmez vous ? Une foi rendues, vous ne pourrez plus modifier l'activité."], - ] - ); - } - - $builder->add('answer', - CKEditorType::class, [ - "disabled" => ($options["status"]>=10||$options["activitystatus"]!=1), - "required" => false, - "config" => [ - 'uiColor' => '#ffffff', - 'height' => 400, - 'filebrowserUploadRoute' => 'app_ckeditor_upload', - 'language' => 'fr', - ], - ] - ); - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults(array( - 'data_class' => 'App\Entity\Answer', - 'mode' => 'string', - 'status' => 'integer', - 'activitystatus' => 'integer' - )); - } -} diff --git a/src/nineskeletor-1.0/src/Form/CorrectedType.php b/src/nineskeletor-1.0/src/Form/CorrectedType.php deleted file mode 100644 index 4a000ad..0000000 --- a/src/nineskeletor-1.0/src/Form/CorrectedType.php +++ /dev/null @@ -1,83 +0,0 @@ -add('submit', - SubmitType::class, [ - "label" => "Valider", - "attr" => ["class" => "btn btn-success"], - ] - ); - - if($options["status"]>=10 && $options["status"]<15 && $options["activitystatus"]==1) { - $builder->add('corrected', - SubmitType::class, [ - "label" => "Rendre le corrigé", - "attr" => [ - "class" => "btn btn-success", - "data-method" => "submit", - "data-confirm" => "Confirmez vous ? Une foi corrigé, vous ne pourrez plus modifier l'activité."], - ] - ); - - $builder->add('canceled', - SubmitType::class, [ - "label" => "Permettre à l'élève de revoir sa copie", - "attr" => [ - "class" => "btn btn-danger", - "data-method" => "submit", - "data-confirm" => "Confirmez vous ? L'élève pourra modifier de nouveau son activité."], - ] - ); - } - - if($options["status"]>=10) { - $builder->add('answercorrected', - CKEditorType::class, [ - "disabled" => ($options["status"]>=15 || $options["activitystatus"]!=1), - "required" => false, - "config" => [ - 'uiColor' => '#ffffff', - 'height' => 400, - 'filebrowserUploadRoute' => 'app_ckeditor_upload', - 'language' => 'fr', - ], - ] - ); - } - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults(array( - 'data_class' => 'App\Entity\Answer', - 'mode' => 'string', - 'status' => 'integer', - 'activitystatus' => 'integer' - )); - } -} diff --git a/src/nineskeletor-1.0/src/Form/DocumentType.php b/src/nineskeletor-1.0/src/Form/DocumentType.php deleted file mode 100644 index 861fe55..0000000 --- a/src/nineskeletor-1.0/src/Form/DocumentType.php +++ /dev/null @@ -1,62 +0,0 @@ -add('submit', - SubmitType::class, [ - "label" => "Valider", - "attr" => ["class" => "btn btn-success no-print"], - ] - ); - - $builder->add('name', - TextType::class, [ - "label" =>"Nom", - ] - ); - - $builder->add('description', - CKEditorType::class, [ - "required" => false, - "config" => [ - 'uiColor' => '#ffffff', - 'height' => 300, - 'filebrowserUploadRoute' => 'app_ckeditor_upload', - 'language' => 'fr', - ], - ] - ); - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults(array( - 'data_class' => 'App\Entity\Document', - 'mode' => 'string', - )); - } -} diff --git a/src/nineskeletor-1.0/src/Form/MessageType.php b/src/nineskeletor-1.0/src/Form/MessageType.php deleted file mode 100644 index a71d908..0000000 --- a/src/nineskeletor-1.0/src/Form/MessageType.php +++ /dev/null @@ -1,52 +0,0 @@ -add('message', - CKEditorType::class, [ - "disabled" => ($options["status"]>=10), - "required" => false, - "config_name" => 'small_config', - "config" => [ - 'uiColor' => '#ffffff', - 'height' => 150, - 'filebrowserUploadRoute' => 'app_ckeditor_upload', - 'language' => 'fr', - ], - ] - ); - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults(array( - 'data_class' => 'App\Entity\Message', - 'mode' => 'string', - 'status' => 'integer', - )); - } -} diff --git a/src/nineskeletor-1.0/templates/Cron/edit.html.twig b/src/nineskeletor-1.0/templates/Cron/edit.html.twig new file mode 100644 index 0000000..91b6c8f --- /dev/null +++ b/src/nineskeletor-1.0/templates/Cron/edit.html.twig @@ -0,0 +1,59 @@ + +{% extends 'base.html.twig' %} + +{% block body %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification JOB + {% endif %} +

+ + {{ form_widget(form.submit) }} + + Annuler + +

+ + {% if app.session.flashbag.has('error') %} +
+ Erreur
+ {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + {% if app.session.flashbag.has('notice') %} +
+ Information
+ {% for flashMessage in app.session.flashbag.get('notice') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} +
+
+ Informations +
+ +
+ {{ form_row(form.command) }} + {{ form_row(form.jsonargument) }} + {{ form_row(form.statut) }} + {{ form_row(form.repeatcall) }} + {{ form_row(form.repeatinterval) }} + {{ form_row(form.nextexecdate) }} +
+
+{{ form_end(form) }} +{% endblock %} + +{% block localjavascript %} + $(document).ready(function() { + $("#command").focus(); + }); +{% endblock %} + + + diff --git a/src/nineskeletor-1.0/templates/Cron/list.html.twig b/src/nineskeletor-1.0/templates/Cron/list.html.twig new file mode 100644 index 0000000..dc1fd75 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Cron/list.html.twig @@ -0,0 +1,54 @@ +{% extends "base.html.twig" %} + +{% block body %} +

+JOBS +

+ +
+
+ Liste des Jobs +
+ +
+
+ + + + + + + + + + + + {% for cron in crons %} + + + + + + + + {% endfor %} + +
ActionProchaine exécutionCommandDescriptionStatut
+ + {{cron.nextexecdate|date("d/m/Y H:i")}}{{cron.command}}{{cron.description}}{{cron.statutlabel}}
+
+
+
+{% endblock %} + +{% block localjavascript %} + $(document).ready(function() { + $('#dataTables').DataTable({ + columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ], + responsive: true, + iDisplayLength: 100, + order: [[ 1, "asc" ]] + }); + }); +{% endblock %} + diff --git a/src/nineskeletor-1.0/templates/Cron/logs.html.twig b/src/nineskeletor-1.0/templates/Cron/logs.html.twig new file mode 100644 index 0000000..eba2793 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Cron/logs.html.twig @@ -0,0 +1,16 @@ +{% extends 'base.html.twig' %} + +{% block body %} +

+ Télécharger les logs +

+ + {% if appCron %} + Log CRON + {% endif %} + Log PROD + Log DEV + {% if appCron %} + Dump de la Base + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Crop/crop01.html.twig b/src/nineskeletor-1.0/templates/Crop/crop01.html.twig new file mode 100644 index 0000000..f1d6fa7 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Crop/crop01.html.twig @@ -0,0 +1,36 @@ +{% extends 'base.html.twig' %} + +{% block encorelinktags %} + {{ encore_entry_link_tags('dropzone') }} +{% endblock encorelinktags %} + + +{% block body %} + + + +
+ + +{% endblock %} + +{% block encorescripttags %} + {{ encore_entry_script_tags('dropzone') }} +{% endblock %} + +{% block localjavascript %} + window.parent.$(".modal-title").html("ETAPE 1 - Téléchargez votre image"); + + Dropzone.options.MyDropZone = { + maxFiles: 1, + acceptedMimeTypes: 'image/*', + //renameFilename: false, + success: function(file, response){ + $(location).attr('href',"{{ path('app_crop02') }}"); + } + } + + function closeModal() { + window.parent.$("#extraLargeModal").modal('hide'); + } +{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Crop/crop02.html.twig b/src/nineskeletor-1.0/templates/Crop/crop02.html.twig new file mode 100644 index 0000000..ada9256 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Crop/crop02.html.twig @@ -0,0 +1,71 @@ +{% extends 'base.html.twig' %} + +{% block body %} + {{ form_start(form) }} + {{ form_widget(form.submit) }} + + +
+ Thumbnail Preview +
+ +
+
+
+
+ {{ form_end(form) }} + +{% endblock %} + + +{% block localjavascript %} + function move(data) { + $('#form_x').val(data.xScaledToImage); + $('#form_y').val(data.yScaledToImage); + + preview(); + } + + function resize(data) { + $('#form_w').val(data.widthScaledToImage); + $('#form_h').val(data.heightScaledToImage); + + preview(); + } + + function preview(data) { + var scaleX = 90 / $('#form_w').val(); + var scaleY = 90 / $('#form_h').val(); + + $('#preview img').css({ + width: Math.round(scaleX * $('#largeimg').width()) + 'px', + height: Math.round(scaleY * $('#largeimg').height()) + 'px', + marginLeft: '-' + Math.round(scaleX * $('#form_x').val()) + 'px', + marginTop: '-' + Math.round(scaleY * $('#form_y').val()) + 'px' + }); + + } + + function reportThumb() { + window.parent.$("#user_avatar").val("thumb_{{ app.session.get('uploadavatar') }}"); + window.parent.$("#user_avatar_img").attr("src","/{{ appAlias }}/uploads/avatar/thumb_{{ app.session.get('uploadavatar') }}"); + closeModal(); + } + + function closeModal() { + window.parent.$("#extraLargeModal").modal('hide'); + } + + $(document).ready(function() { + window.parent.$(".modal-title").html("ETAPE 2 - Découper votre image"); + + $('#largeimg').CropSelectJs({ + imageSrc: "/{{ appAlias }}/uploads/avatar/{{ app.session.get('uploadavatar') }}", + selectionResize: function(data) { resize(data); }, + selectionMove: function(data) { move(data); }, + }); + $('#largeimg').CropSelectJs('setSelectionAspectRatio',1); + + + }); +{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Form/fields.html.twig b/src/nineskeletor-1.0/templates/Form/fields.html.twig new file mode 100644 index 0000000..03835d7 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Form/fields.html.twig @@ -0,0 +1,175 @@ +{% extends 'form_div_layout.html.twig' %} + +{# Voir https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig #} + +{# On commence par simplement ajouter le form-group au row de nos formulaires #} +{% block form_row -%} + {% set attr = attr|merge({'help': (attr.help|default(true)) }) %} +
+ {{- form_label(form) }} + {{- form_widget(form) }} + {{ form_errors(form) }} +
+{%- endblock form_row %} + +{# Puis on modifie très simplement nos input et textarea +les plus importants pour y ajouter le class imposée par Bootstrap 3 #} +{% block textarea_widget %} + {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %} + {{ parent() }} +{% endblock textarea_widget %} + +{% block form_widget_simple %} + {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %} + {{ parent() }} +{% endblock form_widget_simple %} + +{% block form_label -%} + {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' control-label')|trim}) %} + {% if 'checkbox' not in block_prefixes %} + {% if label is not same as(false) -%} + {% if not compound -%} + {% set label_attr = label_attr|merge({'for': id}) %} + {%- endif %} + {% if required -%} + {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %} + {%- endif %} + {% if label is empty -%} + {% set label = name|humanize %} + {%- endif -%} + + + {{ label|trans({}, translation_domain)|raw }} + {% if required %}*{% endif %} + + {%- endif %} + {% endif %} +{%- endblock form_label %} + +{# et enfin les erreurs #} +{% block form_errors %} + {% if errors|length > 0 %} + {% if attr.help is defined and attr.help %} +

+ {% for error in errors %} + {{ error.message }}
+ {% endfor %} +

+ {% else %} +
+ + {% for error in errors %} + {{ error.message|raw }}
+ {% endfor %} +
+ {% endif %} + {% endif %} +{% endblock form_errors %} + +{# Personnalisation des boutons #} +{% block button_widget -%} + {% if label is empty -%} + {% set label = name|humanize %} + {%- endif -%} + {% set attr = attr|merge({'class': (attr.class|default('') ~ '')|trim}) %} + +{%- endblock button_widget %} + +{# Personnalisation des attributs des boutons #} +{% block button_attributes -%} + {% if type is defined and type == 'submit' -%} + {% set class = 'btn-primary' %} + {% else %} + {% set class = 'btn-default' %} + {%- endif -%} + + {% set attr = attr|merge({'class': (attr.class|default('') ~ ' btn ' ~ class)|trim}) %} + {{ parent() }} +{%- endblock button_attributes %} + + +{# Personnalisation des select #} +{% block choice_widget_collapsed %} + {% set attr = attr|merge({'class': (attr.class|default('') ~ ' form-control')|trim}) %} + {{ parent() }} +{%- endblock choice_widget_collapsed %} + +{% block choice_widget %} + {% if expanded %} + + {% else %} + {{ parent() }} + {% endif %} +{% endblock choice_widget %} + +{% block checkbox_widget %} + +{% endblock checkbox_widget %} + +{% block radio_widget %} +    +{% endblock radio_widget %} + +{# Inline date marcro #} +{% macro date_form_widget(form) %} +
+ {{ form_widget(form) }} +
+{% endmacro %} + +{# Inline date #} +{% block date_widget %} + {% if widget == 'single_text' %} + {{ block('form_widget_simple') }} + {% else %} + {% import _self as self %} +
+ {{ date_pattern|replace({ + '{{ year }}': self.date_form_widget(form.year), + '{{ month }}': self.date_form_widget(form.month), + '{{ day }}': self.date_form_widget(form.day), + })|raw }} +
+ {% endif %} +{% endblock date_widget %} + +{# Inline date_time +{% block time_widget %} + {% if widget == 'single_text' %} + {{ block('form_widget_simple') }} + {% else %} + {% import _self as self %} +
+ {{ time_pattern|replace({ + '{{ hour }}': self.date_form_widget(form.hour), + '{{ minute }}': self.date_form_widget(form.minute), + })|raw }} +
+ {% endif %} +{% endblock time_widget %} +#} + +{% block file_widget %} + {% set type = type|default('file') %} + +{% endblock file_widget %} diff --git a/src/nineskeletor-1.0/templates/Group/edit.html.twig b/src/nineskeletor-1.0/templates/Group/edit.html.twig new file mode 100755 index 0000000..92c58a5 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Group/edit.html.twig @@ -0,0 +1,64 @@ +{% extends 'base.html.twig' %} + +{% block body %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification GROUPE + {% elseif mode=="submit" %} + Création GROUPE + {% endif %} +

+ + {{ form_widget(form.submit) }} + + Annuler + + {% if mode=="update" %} + + Supprimer + + {% endif %} + +

+ + {% if app.session.flashbag.has('error') %} +
+ Erreur
+ {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + {% if app.session.flashbag.has('notice') %} +
+ Information
+ {% for flashMessage in app.session.flashbag.get('notice') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + +
+
+ Informations +
+ +
+ {{ form_row(form.name) }} + {{ form_row(form.users) }} +
+
+{{ form_end(form) }} + +{% endblock %} + +{% block localjavascript %} + $(document).ready(function() { + $("#group_name").focus(); + }); +{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Group/list.html.twig b/src/nineskeletor-1.0/templates/Group/list.html.twig new file mode 100644 index 0000000..5b1e1ca --- /dev/null +++ b/src/nineskeletor-1.0/templates/Group/list.html.twig @@ -0,0 +1,61 @@ +{% extends "base.html.twig" %} + +{% block body %} +

+GROUPES +

+ +

Ajouter

+ +
+
+ Liste des Groupes +
+ +
+
+ + + + + + + + + + {% for group in groups %} + + + + + + {% endfor %} + +
ActionNomSource
+ {% if not group.ldapfilter and not group.idexternal %} + + {% endif %} + {{group.name}} + {% if group.ldapfilter %} + LDAP + {% elseif group.idexternal %} + Ninegate + {% else %} + Interne + {% endif %} +
+
+
+
+{% endblock %} + +{% block localjavascript %} + $(document).ready(function() { + $('#dataTables').DataTable({ + columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ], + responsive: true, + iDisplayLength: 100, + order: [[ 1, "asc" ]] + }); + }); +{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Home/admin.html.twig b/src/nineskeletor-1.0/templates/Home/admin.html.twig new file mode 100644 index 0000000..90021a1 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Home/admin.html.twig @@ -0,0 +1,7 @@ +{% extends "base.html.twig" %} + +{% block body %} + + + +{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Home/home.html.twig b/src/nineskeletor-1.0/templates/Home/home.html.twig new file mode 100644 index 0000000..2ea26b9 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Home/home.html.twig @@ -0,0 +1,8 @@ +{% extends "base.html.twig" %} + +{% block body %} +{% endblock %} + + + + diff --git a/src/nineskeletor-1.0/templates/Home/login.html.twig b/src/nineskeletor-1.0/templates/Home/login.html.twig new file mode 100755 index 0000000..54b9806 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Home/login.html.twig @@ -0,0 +1,36 @@ +{% extends "base.html.twig" %} + +{% block localstyle %} + body { + background-color: #efefef; + } + .homecard { + padding-top: 20px; + } +{% endblock %} + +{% block body %} +
+
+

{{appName}}

+ +
+
+ {% if error %} +
{{ error.messageKey|trans(error.messageData, 'security') }}
+ {% endif %} + + + + + + + + + + +
+
+ +
+{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Home/mail.html.twig b/src/nineskeletor-1.0/templates/Home/mail.html.twig new file mode 100644 index 0000000..a99b325 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Home/mail.html.twig @@ -0,0 +1,9 @@ +{% block subject %} + {{ subject }} +{% endblock %} + +{% block body %} +{% autoescape %} +

{{ body|raw }}

+{% endautoescape %} +{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Include/javascript.js.twig b/src/nineskeletor-1.0/templates/Include/javascript.js.twig new file mode 100644 index 0000000..8b44992 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Include/javascript.js.twig @@ -0,0 +1,23 @@ +$(document).ready(function() { + var doit = true; + + $("a[data-method]").on('click',function(){ + if($(this).data('confirm')){ + doit = confirm($(this).data('confirm')); + if(!doit) return false; + } + }); + + $("button[data-method]").on('click',function(){ + if($(this).data('confirm')){ + doit = confirm($(this).data('confirm')); + if(!doit) return false; + } + }); +}); + +function ModalLoad(idmodal,title,path) { + $("#"+idmodal+" .modal-header h4").text(title); + $("#"+idmodal+" #framemodal").attr("src",path); + $("#"+idmodal).modal("show"); +} diff --git a/src/nineskeletor-1.0/templates/Include/sidebar.html.twig b/src/nineskeletor-1.0/templates/Include/sidebar.html.twig new file mode 100644 index 0000000..ff076fb --- /dev/null +++ b/src/nineskeletor-1.0/templates/Include/sidebar.html.twig @@ -0,0 +1,33 @@ + diff --git a/src/nineskeletor-1.0/templates/Include/style.css.twig b/src/nineskeletor-1.0/templates/Include/style.css.twig new file mode 100644 index 0000000..08a8806 --- /dev/null +++ b/src/nineskeletor-1.0/templates/Include/style.css.twig @@ -0,0 +1,149 @@ +/* global */ +h1{ + padding: 40px 0px 9px 0px; + border-bottom: 1px solid #eee; +} + +.nav a{ + background: none; + color: #CFD8DC; + font-size: 14px; + padding: 5px 0px 5px 25px; + display: block; +} + + +/* Sidebar Styles */ +.contentsidebar { + margin-left:250px; +} + +#sidebar { + z-index: 1000; + position: fixed; + left: 250px; + width: 250px; + height: 100%; + margin-left: -250px; + overflow-y: auto; + background: #37474F; + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; +} + +#sidebar header { + background-color: #263238; + font-size: 20px; + line-height: 52px; + text-align: center; +} + +#sidebar header a { + color: #fff; + display: block; + text-decoration: none; +} + +#sidebar header a:hover { + color: #fff; +} + +#sidebar .nav{ + display: block; +} + +#sidebar .nav a { + padding: 0px 10px 5px 10px; +} + +#sidebar .nav .last{ + border-bottom: 5px solid #455A64; + padding-bottom:5px; +} + +#sidebar .title { + color: #CFD8DC; + font-size: 16px; + padding: 0px 10px 0px 10px; + display: block; + text-transform: uppercase; + margin-left: 0px !important; + font-weight: bold; +} + +#sidebar .nav .last{ + border-bottom: 5px solid #455A64; + padding-bottom:5px; +} + +#sidebar .nav a:hover{ + background: none; + color: #ECEFF1; +} + +#sidebar .nav a .fa{ + margin-right: 5px; +} + +#sidebar .nav .select-control { + padding: 0px 10px 5px 10px; + margin-top: -12px; +} + +.avatar { + background-color: #343a40; + width: 35px; + height: 35px; + border-radius: 100%; + margin-top: -5px; +} + +.avatar.big{ + width: 90px; + height: 90px; + margin-bottom: 10px; +} + +@media (max-width: 991px) { + .contentsidebar { + margin-left: auto; + } + + #sidebar { + position: static; + margin:0px -15px; + width: auto; + } +} + +a.btn { + color:#ffffff; +} + +.btn-link { + padding:0px; + width:25px; +} + +.media-body p { + font-size :12px; + margin-bottom:0px; +} + + +@media (min-width: 992px) { + #sidebar { + display: block; + } +} + +{% if useheader is defined and useheader %} +#main { + padding-top:55px; +} +{% endif %} + + +th.dt-center, td.dt-center { text-align: center; } diff --git a/src/nineskeletor-1.0/templates/User/edit.html.twig b/src/nineskeletor-1.0/templates/User/edit.html.twig new file mode 100755 index 0000000..9828169 --- /dev/null +++ b/src/nineskeletor-1.0/templates/User/edit.html.twig @@ -0,0 +1,129 @@ +{% extends 'base.html.twig' %} + +{% block body %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification UTILISATEUR + {% elseif mode=="submit" %} + Création UTILISATEUR + {% elseif mode=="profil" %} + Profil UTILISATEUR + {% endif %} +

+ + {{ form_widget(form.submit) }} + + {% if mode=="profil" %} + Annuler + {% else %} + Annuler + {% endif %} + +

+ + {% if app.session.flashbag.has('error') %} +
+ Erreur
+ {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + {% if app.session.flashbag.has('notice') %} +
+ Information
+ {% for flashMessage in app.session.flashbag.get('notice') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + +
+ {% set avatar= "noavatar.png" %} + {% if user.avatar %} + {% set avatar= user.avatar %} + {% endif %} + + {{ form_widget(form.avatar) }} + {% if appMasteridentity=="LDAP" %} + Modifier + {% endif %} +
+ +
+
+
+
+ Informations +
+ +
+ {{ form_row(form.username) }} + {% if form.password is defined %} + {{ form_row(form.password) }} + {%endif%} + {{ form_row(form.lastname) }} + {{ form_row(form.firstname) }} + {{ form_row(form.email) }} + {{ form_row(form.apikey) }} +
+
+
+ + {% if form.roles is defined %} +
+
+
+ Organisation +
+ +
+ {{ form_row(form.groups) }} + {{ form_row(form.roles) }} +
+
+
+ {%endif%} +
+{{ form_end(form) }} + + + + +{% endblock %} + +{% block localjavascript %} + $(document).ready(function() { + $("#user_password_first").val(""); + $("#user_login").focus(); + }); + + $("#user_avatar_img").on('load', function() { + + }) + $("#user_avatar_img").on('error', function(){ + console.log("la"); + var imgSrc = $(this).attr('src'); + if(imgSrc!="/{{appAlias}}/uploads/avatar/") + $(this).attr('src',imgSrc); + }); + + function showModal() { + $("#frameModal").attr("src","{{path("app_crop01")}}"); + $("#extraLargeModal").modal("show"); + } +{% endblock %} diff --git a/src/nineskeletor-1.0/templates/User/list.html.twig b/src/nineskeletor-1.0/templates/User/list.html.twig new file mode 100644 index 0000000..123abaa --- /dev/null +++ b/src/nineskeletor-1.0/templates/User/list.html.twig @@ -0,0 +1,73 @@ +{% extends "base.html.twig" %} + +{% block body %} +

+UTILISATEURS +

+ +
+
+ Liste des Utilisateurs +
+ +
+
+ + + + + + + + + + + + + + {% for user in users %} + + + + + + + + + + {% endfor %} + +
ActionAvatarLoginPrénomNomRôlesGroupes
+ + {{user.username}}{{user.firstname}}{{user.lastname}} + {%for role in user.roles %} + {%if role=="ROLE_ADMIN" %} + Administrateur
+ {%elseif role=="ROLE_MODO" %} + Modérateur
+ {%elseif role=="ROLE_MASTER" %} + Master
+ {%elseif role=="ROLE_USER" %} + Utilisateur
+ {%endif%} + {% endfor %} +
+ {% for group in user.groups %} + {{ group.name }}
+ {% endfor %} +
+
+
+
+{% endblock %} + +{% block localjavascript %} + $(document).ready(function() { + $('#dataTables').DataTable({ + columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ], + responsive: true, + iDisplayLength: 100, + order: [[ 2, "asc" ]] + }); + }); +{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/base.html.twig b/src/nineskeletor-1.0/templates/base.html.twig new file mode 100644 index 0000000..1304647 --- /dev/null +++ b/src/nineskeletor-1.0/templates/base.html.twig @@ -0,0 +1,138 @@ + + + + + {% block title %}{{ appName }}{% endblock %} + + + + {{ encore_entry_link_tags('app') }} + + {% block encorelinktags %} + + {% endblock encorelinktags %} + + + + + + + + + {% if useheader is defined and useheader %} + + {% endif %} + +
+ {% set contentsidebar="" %} + {% if usesidebar is defined and usesidebar %} + {% set contentsidebar="contentsidebar" %} + {{ include('Include/sidebar.html.twig') }} + {%endif%} + + +
+ {% block body %} + {% endblock %} +
+
+ + + + + {{ encore_entry_script_tags('app') }} + + {% block encorescripttags %} + + {% endblock %} + + {% block localexternalscript %} + + {% endblock %} + + + + + + {% if sondeUse %} + + {% endif %} + +