Commit 5fd1c7da authored by Georgios Tsakalos's avatar Georgios Tsakalos

add software template

parent b5a21c53
{% extends "schools/index.twig" %}
{% import "schools/index.twig" as macros %}
{% block schoolTitle %}
{{ parent() }} <small>Λογισμικό</small>
{% endblock %}
{% block navItems %}
<li role="presentation" class="pull-right">
<a href="#" class="btn btn-primary btn-add-software" title="Καταχώρηση λογισμικού">
<i class="visible-xs fa fa-plus"></i>
<span class="hidden-xs">Καταχώρηση λογισμικού</span>
</a>
</li>
{% endblock %}
{% block schoolContent %}
<div id="school-software">
<div class="table-responsive">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>Τίτλος</th>
<th>Κατηγορία</th>
<th>Προμηθευτής</th>
<th>URL</th>
<th>Χώρος</th>
</tr>
</thead>
<tbody>
{% for software in softwareArray %}
<tr data-software="{{ software|json_encode }}" data-id="{{ software.id }}">
<td class="title">{{ software.title }}</td>
<td class="category">{{ software.softwarecategory }}</td>
<td class="vendor">{{ software.vendor}}</td>
<td class="url">{{ software.url }}</td>
<td class="lab">{{ software.lab }}</td>
</tr>
{% else %}
<tr class="no-records">
<td colspan="6" class="text-center text-muted">
Δεν έχει καταχωρηθεί λογισμικό.
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="6"></th>
</tr>
</tfoot>
</table>
</div>
<div class="modal fade" id="software-form-modal" tabindex="-1" role="dialog" aria-labelledby="software-from">
<form class="form-horizontal" data-url="{{ path_for('school.software') }}">
<div class="modal-dialog" role="form">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title">Στοιχεία λογισμικού</h4>
</div>
<div class="modal-body">
{{ macros.input('name', 'Όνομα', '', 'text', {'required': ''}) }}
{{ macros.input('surname', 'Επώνυμο', '', 'text', {'required': ''}) }}
{{ macros.input('telephone', 'Τηλέφωνο','', 'tel', {'required': ''}) }}
{{ macros.input('email', 'Email','', 'email', {'required': ''}) }}
{{ macros.select('branch_id', 'Ειδικότητα', branches, '', {'required': ''}) }}
{{ macros.checkbox('is_principle', 'Διευθυντής') }}
{{ macros.checkbox('is_responsible', 'Υπεύθυνος εργαστηρίου') }}
<input type="hidden" name="id" value="">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger pull-left remove">Διαγραφή</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Κλείσιμο</button>
<button type="submit" class="btn btn-primary">Αποθήκευση</button>
</div>
</div>
</div>
</form>
</div>
<script type="text/template" id="software-row">
<td class="title"><%= software.title %></td>
<td class="category"><%= software.softwarecategory %></td>
<td class="vendor"><%= software.vendor %></td>
<td class="url"><%= software.url %></td>
<td class="lab"><%= software.lab %></td>
</script>
</div>
{% endblock %}
{% block inlinejs %}
{{ parent() }}
<script src="{{ base_url }}/js/schools/software.js"></script>
{% endblock %}
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