#101 files attach modified
parent
9013d79228
commit
632c6299b7
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||||||
|
<changeSet author="anton" id="20190529_000001-1">
|
||||||
|
<addColumn tableName="file">
|
||||||
|
<column name="project_id" type="integer"/>
|
||||||
|
</addColumn>
|
||||||
|
<addForeignKeyConstraint baseTableName="file" baseColumnNames="project_id"
|
||||||
|
constraintName="fk_file_project" referencedTableName="project"
|
||||||
|
referencedColumnNames="id"/>
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
@ -0,0 +1,40 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<body>
|
||||||
|
<div th:fragment="filesList">
|
||||||
|
<th:block th:each="file, rowStat : *{files}">
|
||||||
|
|
||||||
|
<div class="row" th:id="|files${rowStat.index}|"
|
||||||
|
th:style="${file.deleted} ? 'display: none;' :''">
|
||||||
|
<input type="hidden" th:field="*{files[__${rowStat.index}__].id}"/>
|
||||||
|
<input type="hidden"
|
||||||
|
th:field="*{files[__${rowStat.index}__].deleted}"/>
|
||||||
|
<input type="hidden"
|
||||||
|
th:field="*{files[__${rowStat.index}__].name}"/>
|
||||||
|
<input type="hidden"
|
||||||
|
th:field="*{files[__${rowStat.index}__].tmpFileName}"/>
|
||||||
|
<div class="col-2">
|
||||||
|
<a class="btn btn-danger float-right"
|
||||||
|
th:onclick="|$('#files${rowStat.index}\\.deleted').val('true'); $('#files${rowStat.index}').hide(); |">
|
||||||
|
<span aria-hidden="true"><i class="fa fa-times"/></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-10">
|
||||||
|
<a th:onclick="${file.id==null} ? 'downloadFile('+${file.tmpFileName}+',null,\''+${file.name}+'\')':
|
||||||
|
'downloadFile(null,'+${file.id}+',\''+${file.name}+'\')' "
|
||||||
|
href="javascript:void(0)"
|
||||||
|
th:text="*{files[__${rowStat.index}__].name}">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</th:block>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue