Commit 0bdd02a1 authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Changement design

parent b251d842
......@@ -79,7 +79,6 @@
<script src="bower_components/datatables.net-select/js/dataTables.select.min.js"></script>
<script src="bower_components/jquery-ui/jquery-ui.min.js"></script>
<script src="bower_components/jt.timepicker/jquery.timepicker.min.js"></script>
<script src="js/admin_formation.js"></script>
<script src="js/admin.js"></script>
<script src="js/clo_admin.js"></script>
......
......@@ -46,8 +46,8 @@
<input type="number" class="form-control" name="quota_physique" id="quota_physique" placeholder="Quota physique" {% if salle %}value="{{ salle.getQuotaPhysique() }}"{% endif %} required>
</div>
<a href="dashboard-admin-salle?token={{ token }}" id="btn-back-salles" class="btn btn-danger">Retour liste des salles</a>
<button type="submit" id="btn-ajout-salle" class="btn btn-primary" value="Envoyer">{% if salle %}Editer salle{% else %}Ajouter salle{% endif %}</button>
<a href="dashboard-admin-salle?token={{ token }}" id="btn-back-salles" class="btn btn-snow">Retour liste des salles</a>
<button type="submit" id="btn-ajout-salle" class="btn btn-sea" value="Envoyer">{% if salle %}Editer salle{% else %}Ajouter salle{% endif %}</button>
</form>
</div>
</div>
......
......@@ -36,13 +36,19 @@
<td>{{ formation.dateDebut|date("H:i") }}</td>
<td>{{ formation.dateFin|date("H:i") }}</td>
<td class="text-center">
<a href="dashboard-admin-formation-form?token={{ token }}&formation_id={{ formation.id }}" class="btn btn-default fa fa-pencil-square-o"></a>
<a href="dashboard-admin-formation-form?token={{ token }}&formation_id={{ formation.id }}"
class="btn btn-sky fa fa-pencil-square-o btn-info"
data-toggle="tooltip" title="Éditer">
</a>
</td>
{#<td class="text-center">#}
{#<a href="#" class="btn btn-default fa fa-files-o"></a>#}
{#</td>#}
<td class="text-center">
<a href="#" class="btn btn-default fa fa-files-o"></a>
</td>
<td class="text-center">
<a href="dashboard-admin-formation-form?token={{ token }}&formation_id={{ formation.id }}" class="btn btn-default fa fa-trash-o btn-delete-formation"></a>
<a href="dashboard-admin-formation-form?token={{ token }}&formation_id={{ formation.id }}"
class="btn btn-fire fa fa-trash-o btn-delete-formation"
data-toggle="tooltip" title="Supprimer">
</a>
</td>
</tr>
{% endfor %}
......
......@@ -58,8 +58,8 @@
</select>
</div>
<a href="/dashboard-admin-formation?token={{ token }}" id="btn-back-formations" class="btn btn-danger">Retour liste des formations</a>
<button type="submit" id="btn-inscription-submit" class="btn btn-primary" value="Envoyer">Soumettre</button>
<a href="/dashboard-admin-formation?token={{ token }}" id="btn-back-formations" class="btn btn-snow">Retour liste des formations</a>
<button type="submit" id="btn-inscription-submit" class="btn btn-sea" value="Envoyer">{% if formation %}Éditer{% else %}Ajouter{% endif %} la formation</button>
</form>
</div>
</div>
......
......@@ -35,10 +35,16 @@
<td>{{ salle.getQuotaOfficiel() }}</td>
<td>{{ salle.getQuotaPhysique() }}</td>
<td class="text-center">
<a href="dashboard-admin-add-edit-salle?salle_id={{ salle.getId() }}&token={{ token }}"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>
<a href="dashboard-admin-add-edit-salle?salle_id={{ salle.getId() }}&token={{ token }}"
data-toggle="tooltip" title="Éditer">
<i class="btn btn-sky fa fa-pencil-square-o" aria-hidden="true"></i>
</a>
</td>
<td class="text-center">
<a class="btn-delete-salle" href="dashboard-admin-add-edit-salle?salle_id={{ salle.getId() }}&token={{ token }}"><i class="fa fa-trash-o" aria-hidden="true"></i></a>
<a class="btn-delete-salle" href="dashboard-admin-add-edit-salle?salle_id={{ salle.getId() }}&token={{ token }}"
data-toggle="tooltip" title="Supprimer">
<i class="btn btn-fire fa fa-trash-o" aria-hidden="true"></i>
</a>
</td>
</tr>
{% endfor %}
......
......@@ -115,7 +115,7 @@
</div>
<div class="info-pratique-text">
<p>La faculté de droit se situe sur le haut de la Canebière (Transports M2, T2)</p>
<a href="info-acces" class="btn btn-info">Informations Accès</a>
<a href="info-acces" class="btn btn-sky">Informations Accès</a>
</div>
</div>
</div>
......@@ -125,7 +125,7 @@
</div>
<div class="info-pratique-text">
<p>Le comité des JDEV vous propose une liste d'hotels situés proches de la conférence.</p>
<a href="info-hebergement" class="btn btn-info">Informations Hébergement</a>
<a href="info-hebergement" class="btn btn-sky">Informations Hébergement</a>
</div>
</div>
</div>
......@@ -135,7 +135,7 @@
</div>
<div class="info-pratique-text">
<p>Retrouvez ici les informations pratiques sur la ville de Marseille</p>
<a href="info-generales" class="btn btn-info">Informations générales</a>
<a href="info-generales" class="btn btn-sky">Informations générales</a>
</div>
</div>
</div>
......
......@@ -68,4 +68,85 @@ $(document).ready(function() {
});
});
var changeTimepickerFin = function () {
if ($('#debut-timepicker').val() != '')
{
$('#fin-timepicker').attr('disabled', false);
$('#fin-timepicker').timepicker('option', 'minTime', $('#debut-timepicker').val());
}
else
{
$('#fin-timepicker').attr('disabled', true);
}
}
$('#form_formation').validator().on('submit', function(e) {
if (e.isDefaultPrevented())
{
alert('Veuillez remplir tous les champs obligatoires');
}
else
{
e.preventDefault();
var formation_id = $('#formation_id').val();
if (formation_id > 0) {
var vtype = 'PUT';
} else {
var vtype = 'POST';
}
var form = $(this);
$.ajax({
url: form.attr('action'),
type: vtype,
data: form.serialize(),
success: function(text) {
document.location.href = $('#btn-back-formations').attr('href');
},
error: function() {
alert('La formation n\'a pas pu être ajoutée');
form.trigger('reset');
}
});
}
});
$('.btn-delete-formation').on('click', function(e) {
e.preventDefault();
$.ajax({
url: $(this).attr('href'),
type: 'DELETE',
success: function(text) {
location.reload();
},
error: function() {
alert('La formation n\'a pas pu être supprimée');
}
});
});
$( "#datepicker" ).datepicker({
showAnim: "slideDown",
minDate: new Date("2017-07-04"),
maxDate: new Date("2017-07-07"),
dateFormat: 'dd/mm/yy'
});
$('#debut-timepicker').timepicker({
'timeFormat': 'H:i',
'minTime': '8:00',
'maxTime': '17:00',
});
$('#fin-timepicker').timepicker({
'timeFormat': 'H:i',
'maxTime': '18:00'
});
changeTimepickerFin();
$('#debut-timepicker').on('change', function () {
$('#fin-timepicker').val('');
changeTimepickerFin();
})
});
\ No newline at end of file
$(document).ready(function() {
var changeTimepickerFin = function () {
if ($('#debut-timepicker').val() != '')
{
$('#fin-timepicker').attr('disabled', false);
$('#fin-timepicker').timepicker('option', 'minTime', $('#debut-timepicker').val());
}
else
{
$('#fin-timepicker').attr('disabled', true);
}
}
$('#form_formation').validator().on('submit', function(e) {
if (e.isDefaultPrevented())
{
alert('Veuillez remplir tous les champs obligatoires');
}
else
{
e.preventDefault();
var formation_id = $('#formation_id').val();
if (formation_id > 0) {
var vtype = 'PUT';
} else {
var vtype = 'POST';
}
var form = $(this);
$.ajax({
url: form.attr('action'),
type: vtype,
data: form.serialize(),
success: function(text) {
document.location.href = $('#btn-back-formations').attr('href');
},
error: function() {
alert('La formation n\'a pas pu être ajoutée');
form.trigger('reset');
}
});
}
});
$('.btn-delete-formation').on('click', function(e) {
e.preventDefault();
$.ajax({
url: $(this).attr('href'),
type: 'DELETE',
success: function(text) {
location.reload();
},
error: function() {
alert('La formation n\'a pas pu être supprimée');
}
});
});
$( "#datepicker" ).datepicker({
showAnim: "slideDown",
minDate: new Date("2017-07-04"),
maxDate: new Date("2017-07-07")
});
$('#debut-timepicker').timepicker({
'timeFormat': 'H:i',
'minTime': '8:00',
'maxTime': '17:00',
});
$('#fin-timepicker').timepicker({
'timeFormat': 'H:i',
'maxTime': '18:00'
});
changeTimepickerFin();
$('#debut-timepicker').on('change', function () {
$('#fin-timepicker').val('');
changeTimepickerFin();
})
});
\ No newline at end of file
......@@ -13,6 +13,58 @@
background: #6AD58B;
}
.btn-sky {
color: white;
border-radius: 4px;
background: #2aabd2;
transition: background 0.3s ease;
}
.btn-sky:hover {
text-decoration: none;
color: white;
background: #3ab2d6;
}
.btn-snow {
color: black;
border-radius: 4px;
background: snow;
transition: background 0.3s ease;
}
.btn-snow:hover {
text-decoration: none;
color: black;
background: #e6e6e6;
}
.btn-sea {
color: white;
border-radius: 4px;
background: #337ab7;
transition: background 0.3s ease;
}
.btn-sea:hover {
text-decoration: none;
color: white;
background: #2e6da4;
}
.btn-fire {
color: white;
border-radius: 4px;
background: #d45a47;
transition: background 0.3s ease;
}
.btn-fire:hover {
text-decoration: none;
color: white;
background: #fd6a53;
}
.btn-inscription {
background: #d45a47;
border: 1px solid #e24d36;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment