Improve project overview page
This commit is contained in:
8
app/Template/project_overview/activity.php
Normal file
8
app/Template/project_overview/activity.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<section class="accordion-section <?= empty($events) ? 'accordion-collapsed' : '' ?>">
|
||||
<div class="accordion-title">
|
||||
<h3><a href="#" class="fa accordion-toggle"></a> <?= t('Last activity') ?></h3>
|
||||
</div>
|
||||
<div class="accordion-content">
|
||||
<?= $this->render('event/events', array('events' => $events)) ?>
|
||||
</div>
|
||||
</section>
|
||||
16
app/Template/project_overview/attachments.php
Normal file
16
app/Template/project_overview/attachments.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<section class="accordion-section <?= empty($files) && empty($images) ? 'accordion-collapsed' : '' ?>">
|
||||
<div class="accordion-title">
|
||||
<h3><a href="#" class="fa accordion-toggle"></a> <?= t('Attachments') ?></h3>
|
||||
</div>
|
||||
<div class="accordion-content">
|
||||
<?php if ($this->user->hasProjectAccess('ProjectFile', 'create', $project['id'])): ?>
|
||||
<p style="margin-bottom: 15px;">
|
||||
<i class="fa fa-plus fa-fw"></i>
|
||||
<?= $this->url->link(t('Upload a file'), 'ProjectFile', 'create', array('project_id' => $project['id']), false, 'popover') ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->render('project_overview/images', array('project' => $project, 'images' => $images)) ?>
|
||||
<?= $this->render('project_overview/files', array('project' => $project, 'files' => $files)) ?>
|
||||
</div>
|
||||
</section>
|
||||
@@ -1,8 +1,10 @@
|
||||
<?php if (! empty($project['description'])): ?>
|
||||
<div class="page-header">
|
||||
<h2><?= $this->text->e($project['name']) ?></h2>
|
||||
<section class="accordion-section <?= empty($project['description']) ? 'accordion-collapsed' : '' ?>">
|
||||
<div class="accordion-title">
|
||||
<h3><a href="#" class="fa accordion-toggle"></a> <?= t('Description') ?></h3>
|
||||
</div>
|
||||
<div class="accordion-content">
|
||||
<article class="markdown">
|
||||
<?= $this->text->markdown($project['description']) ?>
|
||||
</article>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,54 +1,3 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Attachments') ?></h2>
|
||||
<?php if ($this->user->hasProjectAccess('ProjectFile', 'create', $project['id'])): ?>
|
||||
<ul>
|
||||
<li>
|
||||
<i class="fa fa-plus fa-fw"></i>
|
||||
<?= $this->url->link(t('Upload a file'), 'ProjectFile', 'create', array('project_id' => $project['id']), false, 'popover') ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<?php if (empty($files) && empty($images)): ?>
|
||||
<p class="alert"><?= t('There is no attachment at the moment.') ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($images)): ?>
|
||||
<div class="file-thumbnails">
|
||||
<?php foreach ($images as $file): ?>
|
||||
<div class="file-thumbnail">
|
||||
<a href="<?= $this->url->href('FileViewer', 'show', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>" class="popover"><img src="<?= $this->url->href('FileViewer', 'thumbnail', array('file_id' => $file['id'], 'project_id' => $project['id'])) ?>" title="<?= $this->text->e($file['name']) ?>" alt="<?= $this->text->e($file['name']) ?>"></a>
|
||||
<div class="file-thumbnail-content">
|
||||
<div class="file-thumbnail-title">
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
|
||||
<ul>
|
||||
<li>
|
||||
<i class="fa fa-download fa-fw"></i>
|
||||
<?= $this->url->link(t('Download'), 'FileViewer', 'download', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->user->hasProjectAccess('ProjectFile', 'remove', $project['id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-trash fa-fw"></i>
|
||||
<?= $this->url->link(t('Remove'), 'ProjectFile', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-thumbnail-description">
|
||||
<span class="tooltip" title='<?= t('Uploaded: %s', $this->dt->datetime($file['date'])).'<br>'.t('Size: %s', $this->text->bytes($file['size'])) ?>'>
|
||||
<i class="fa fa-info-circle"></i>
|
||||
</span>
|
||||
<?= t('Uploaded by %s', $file['user_name'] ?: $file['username']) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($files)): ?>
|
||||
<table class="table-stripped">
|
||||
<tr>
|
||||
|
||||
35
app/Template/project_overview/images.php
Normal file
35
app/Template/project_overview/images.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php if (! empty($images)): ?>
|
||||
<div class="file-thumbnails">
|
||||
<?php foreach ($images as $file): ?>
|
||||
<div class="file-thumbnail">
|
||||
<a href="<?= $this->url->href('FileViewer', 'show', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>" class="popover"><img src="<?= $this->url->href('FileViewer', 'thumbnail', array('file_id' => $file['id'], 'project_id' => $project['id'])) ?>" title="<?= $this->text->e($file['name']) ?>" alt="<?= $this->text->e($file['name']) ?>"></a>
|
||||
<div class="file-thumbnail-content">
|
||||
<div class="file-thumbnail-title">
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a>
|
||||
<ul>
|
||||
<li>
|
||||
<i class="fa fa-download fa-fw"></i>
|
||||
<?= $this->url->link(t('Download'), 'FileViewer', 'download', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>
|
||||
</li>
|
||||
<?php if ($this->user->hasProjectAccess('ProjectFile', 'remove', $project['id'])): ?>
|
||||
<li>
|
||||
<i class="fa fa-trash fa-fw"></i>
|
||||
<?= $this->url->link(t('Remove'), 'ProjectFile', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-thumbnail-description">
|
||||
<span class="tooltip" title='<?= t('Uploaded: %s', $this->dt->datetime($file['date'])).'<br>'.t('Size: %s', $this->text->bytes($file['size'])) ?>'>
|
||||
<i class="fa fa-info-circle"></i>
|
||||
</span>
|
||||
<?= t('Uploaded by %s', $file['user_name'] ?: $file['username']) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Information') ?></h2>
|
||||
<section class="accordion-section">
|
||||
<div class="accordion-title">
|
||||
<h3><a href="#" class="fa accordion-toggle"></a> <?= t('Information') ?></h3>
|
||||
</div>
|
||||
<div class="accordion-content">
|
||||
<div class="listing">
|
||||
<ul>
|
||||
<?php if ($project['owner_id'] > 0): ?>
|
||||
@@ -33,3 +35,5 @@
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -6,11 +6,7 @@
|
||||
|
||||
<?= $this->render('project_overview/columns', array('project' => $project)) ?>
|
||||
<?= $this->render('project_overview/description', array('project' => $project)) ?>
|
||||
<?= $this->render('project_overview/files', array('project' => $project, 'images' => $images, 'files' => $files)) ?>
|
||||
<?= $this->render('project_overview/attachments', array('project' => $project, 'images' => $images, 'files' => $files)) ?>
|
||||
<?= $this->render('project_overview/information', array('project' => $project, 'users' => $users, 'roles' => $roles)) ?>
|
||||
|
||||
<div class="page-header">
|
||||
<h2><?= t('Last activity') ?></h2>
|
||||
</div>
|
||||
<?= $this->render('event/events', array('events' => $events)) ?>
|
||||
<?= $this->render('project_overview/activity', array('project' => $project, 'events' => $events)) ?>
|
||||
</section>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -29,6 +29,9 @@
|
||||
.project-overview-column {
|
||||
text-align: center;
|
||||
margin-right: 80px;
|
||||
padding: 3px 15px 3px 15px;
|
||||
border: 1px dashed #ddd;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.project-overview-column strong {
|
||||
|
||||
Reference in New Issue
Block a user