Refactoring/rewrite of modal boxes handling
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="accordion-content">
|
||||
<?php if ($this->user->hasProjectAccess('ProjectFileController', 'create', $project['id'])): ?>
|
||||
<div class="buttons-header">
|
||||
<?= $this->url->button('fa-plus', t('Upload a file'), 'ProjectFileController', 'create', array('project_id' => $project['id']), 'popover') ?>
|
||||
<?= $this->modal->mediumButton('plus', t('Upload a file'), 'ProjectFileController', 'create', array('project_id' => $project['id'])) ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<h3><a href="#" class="fa accordion-toggle"></a> <?= t('Description') ?></h3>
|
||||
</div>
|
||||
<div class="accordion-content">
|
||||
<?php if ($this->user->hasProjectAccess('ProjectEditController', 'description', $project['id'])): ?>
|
||||
<?php if ($this->user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?>
|
||||
<div class="buttons-header">
|
||||
<?= $this->url->button('fa-edit', t('Edit description'), 'ProjectEditController', 'description', array('project_id' => $project['id']), 'popover') ?>
|
||||
<?= $this->modal->mediumButton('edit', t('Edit description'), 'ProjectEditController', 'show', array('project_id' => $project['id'])) ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<article class="markdown">
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
<ul>
|
||||
<?php if ($this->file->getPreviewType($file['name']) !== null): ?>
|
||||
<li>
|
||||
<i class="fa fa-eye fa-fw"></i>
|
||||
<?= $this->url->link(t('View file'), 'FileViewerController', 'show', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?>
|
||||
<?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>
|
||||
</li>
|
||||
<?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?>
|
||||
<li>
|
||||
@@ -30,8 +29,7 @@
|
||||
</li>
|
||||
<?php if ($this->user->hasProjectAccess('ProjectFileController', 'remove', $project['id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-trash fa-fw"></i>
|
||||
<?= $this->url->link(t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
</li>
|
||||
<?php if ($this->user->hasProjectAccess('ProjectFileController', 'remove', $project['id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-trash fa-fw"></i>
|
||||
<?= $this->url->link(t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user