diff --git a/app/static/add_tuto.css b/app/static/add_tuto.css index 5fcf7a54205870a205beaf61a3e0066458634759..096787315386df0e9123352f195dbda16cdbe3ac 100644 --- a/app/static/add_tuto.css +++ b/app/static/add_tuto.css @@ -13,4 +13,8 @@ .new_labels-enter, .new_labels-leave-to, .tutos-enter, .tutos-leave-to { opacity: 0; transform: translateY(0px); +} + +.len_input { + width: 400px; } \ No newline at end of file diff --git a/app/templates/add_new_tuto.html b/app/templates/add_new_tuto.html index 8781d40cce7ca40a77a1dd2f0bb758dfb047b399..7f7167f019ab46de869ea31c6c8a44a536de1c44 100644 --- a/app/templates/add_new_tuto.html +++ b/app/templates/add_new_tuto.html @@ -1,37 +1,57 @@ <html> <head> - <title>Add tuto</title> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Add tutos</title> + <link rel="stylesheet" href="static/add_tuto.css"> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> + <!-- Bootstrap --> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> </head> <body> - <div id='hierarchy'> - <span v-for='(value, index) in table'> - <span @click="activate_lo(index)">{{ value[1] }}</span> - <img v-if='is_active[index] % 2 == 1' src="static/checked.png"> - <br> - </span> - {{ labels_add }} - <br> - <span v-for='(value, index) in all_labels'> - <span v-if="value[2] == 1"><ul>{{ value[1] }}</span> - <span v-else></span></ul><li>{{ value[1] }}</li></span> - </span> - </div> + <div class="container"> + + <div class="row"> + <div class="offset-md-1 col-md-3"> + <div id='hierarchy'> + <span v-for='(value, index) in table'> + <span @click="activate_lo(index)">{{ value[1] }}</span> + <img v-if='is_active[index] % 2 == 1' src="static/checked.png"> + <br> + </span> + {{ labels_add }} + <br> + </div> + </div> + + + <div class="col-md-7"> + <div id='form'> + <h3>[[ status ]]</h3> + <form name="form1" method="post" action=""> + <div class="form-group"> + <label>Titre : </label> + <input type="text" name="title" class="len_input form-control" placeholder="Créer une image Docker"/> + </div> + <div class="form-group"> + <label>Lien : </label> + <input type="text" name="link" class="len_inpu form-control" placeholder="http://"/> + </div> + <div class="form-group"> + <label>Prescriber : </label> + <input type="text" name="prescriber" class="len_input form-control" placeholder="Jean Dupont"/> + </div> + <input type="hidden" name="labels" value= "" /> + <button type="submit" class="btn btn-primary">Ajouter</button> + </form> + </div> + </div> + </div> - <div id='form'> - <h3>[[ status ]]</h3> - <form name="form1" method="post" action=""> - <p> - <label>Titre : </label><input type="text" name="title"/><br> - <br><label>Lien : </label><input type="text" name="link"/><br> - <br><label>Prescriber : </label><input type="text" name="prescriber"/> - </p> - <input type="hidden" name="labels" value= "" /> - <input type="submit" value="Envoyer" /> - </form> </div> </body> @@ -65,11 +85,9 @@ var hierarchy = new Vue({ el: '#hierarchy', data: { - all_labels: [], table: order_intent_labels_tab(), is_active: create_empty_tab(40), - labels_add: [], - ok: [1, 0, 1, 0, 0, 1, 0, 0] + labels_add: [] }, methods: { activate_lo: function (index) { @@ -86,14 +104,6 @@ } } }); - hierarchy.all_labels = hierarchy.get_all_labels(); - for (var i = 0; hierarchy.all_labels[i]; i++) { - console.log(get_all_childs_of_father(hierarchy.all_labels, hierarchy.all_labels[i][0])); - } - - for (var i = 0; hierarchy.all_labels[i]; i++) { - hierarchy.all_labels[i][2] = hierarchy.ok[i]; - } </script>