Commit c71043c7 authored by kanellov's avatar kanellov

merge with application_form

parent 37725163
...@@ -76,46 +76,13 @@ ...@@ -76,46 +76,13 @@
<form method="post" action="" data-is-valid="{{ form.is_valid | default(true) ? '1' : '0' }}" <form method="post" action="" data-is-valid="{{ form.is_valid | default(true) ? '1' : '0' }}"
data-messages="{{ form.messages|default({})|json_encode }}"> data-messages="{{ form.messages|default({})|json_encode }}">
<div class="form-group"> <div class="form-group">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent pulvinar tincidunt <p>
odio, vel pretium mauris imperdiet at. In tempor fermentum enim, euismod posuere Σε αυτή την καρτέλα θα καταχωρήσετε πληροφορίες που αφορούν στον
purus venenatis sit amet. Sed tincidunt, sapien et varius congue, orci urna rutrum εξοπλισμό που θέλετε να αναβαθμίσετε ή/και στον νέο εξοπλισμό
magna, in porttitor tellus ante nec quam. Praesent non ante commodo, ornare tellus που θέλετε να αποκτήσετε, υποβάλλοντας και τη σχετική αίτηση.
ut, commodo dolor.</p> </p>
</div>
<div class="table-responsive">
<fieldset>
<legend>Υπάρχον εξοπλισμός</legend>
<table class="table table-hover table-striped table-condensed">
<thead>
<tr>
<th>Χώρος</th>
<th>Τύπος</th>
<th>Πλήθος</th>
</tr>
</thead>
<tbody>
{% for asset in assets %}
<tr>
<td>{{ asset.lab }}</td>
<td>{{ asset.type }}</td>
<td>{{ asset.qty }}</td>
</tr>
{% else %}
<tr>
<td colspan="6" class="text-center">Δεν έχει καταχωρηθεί εξοπλισμός</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="6"></td>
</tr>
</tfoot>
</table>
</fieldset>
</div> </div>
<div class="table-responsive"> <div class="table-responsive">
<fieldset> <fieldset>
<legend>Νέος εξοπλισμός</legend> <legend>Νέος εξοπλισμός</legend>
......
...@@ -250,23 +250,25 @@ DROP TABLE IF EXISTS `lab`; ...@@ -250,23 +250,25 @@ DROP TABLE IF EXISTS `lab`;
/*!40101 SET character_set_client = utf8 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lab` ( CREATE TABLE `lab` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `school_id` int(11) unsigned NOT NULL,
`type` int(11) unsigned DEFAULT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`area` int(11) unsigned DEFAULT NULL, `labtype_id` int(11) unsigned DEFAULT NULL,
`use_ext_program` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `responsible_id` int(11) unsigned DEFAULT NULL,
`use_in_program` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `area` int(11) unsigned NOT NULL,
`attachment` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `attachment` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`attachment_mime` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `attachment_mime` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`has_network` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `has_network` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`has_server` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `has_server` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`school_id` int(11) unsigned DEFAULT NULL, `use_ext_program` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`teacher_id` int(11) unsigned DEFAULT NULL, `use_in_program` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `index_foreignkey_lab_school` (`school_id`), KEY `school_id` (`school_id`),
KEY `index_foreignkey_lab_teacher` (`teacher_id`), KEY `index_foreignkey_lab_labtype` (`labtype_id`),
CONSTRAINT `c_fk_lab_school_id` FOREIGN KEY (`school_id`) REFERENCES `school` (`id`) ON DELETE SET NULL ON UPDATE SET NULL KEY `index_foreignkey_lab_responsible` (`responsible_id`),
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 CONSTRAINT `c_fk_lab_labtype_id` FOREIGN KEY (`labtype_id`) REFERENCES `labtype` (`id`) ON DELETE SET NULL ON UPDATE SET NULL,
COLLATE=utf8mb4_unicode_ci; CONSTRAINT `c_fk_lab_responsible_id` FOREIGN KEY (`responsible_id`) REFERENCES `teacher` (`id`) ON DELETE SET NULL ON UPDATE SET NULL,
CONSTRAINT `lab_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `school` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
...@@ -308,7 +310,17 @@ CREATE TABLE `lesson` ( ...@@ -308,7 +310,17 @@ CREATE TABLE `lesson` (
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Table structure for table `lesson_lab` -- Dumping data for table `lesson`
--
LOCK TABLES `lesson` WRITE;
/*!40000 ALTER TABLE `lesson` DISABLE KEYS */;
INSERT INTO `lesson` VALUES (1,'ΠΛΗΡΟΦΟΡΙΚΗ'),(2,'ΦΥΣΙΚΗ'),(3,'ΧΗΜΕΙΑ');
/*!40000 ALTER TABLE `lesson` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `lab_lesson`
-- --
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
......
...@@ -184,11 +184,11 @@ class LabService implements LabServiceInterface ...@@ -184,11 +184,11 @@ class LabService implements LabServiceInterface
if (!$lab->id) { if (!$lab->id) {
throw new InvalidArgumentException('No lab'); throw new InvalidArgumentException('No lab');
} }
if (!$lab->attachment) { if (!$lab->attachment) {
return ; return ;
} }
if (is_writable($this->filesPath . '/' . $lab->attachment)) { if (is_writable($this->filesPath . '/' . $lab->attachment)) {
unlink($this->filesPath . '/' . $lab->attachment); unlink($this->filesPath . '/' . $lab->attachment);
} }
......
...@@ -59,9 +59,7 @@ ...@@ -59,9 +59,7 @@
<a href="#" class="btn-remove btn bnt-link btn-sm text-danger"> <a href="#" class="btn-remove btn bnt-link btn-sm text-danger">
<i class="fa fa-remove"></i> Διαγραφή</a> <i class="fa fa-remove"></i> Διαγραφή</a>
</div> </div>
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% endmacro %} {% endmacro %}
......
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