Move and clean some templates to a subfolder
This commit is contained in:
parent
b84edaaf13
commit
11b6381cc0
|
|
@ -25,7 +25,7 @@ class Config extends Base
|
|||
$params['errors'] = array();
|
||||
$params['config_content_for_layout'] = $this->template->load($template, $params);
|
||||
|
||||
return $this->template->layout('config_layout', $params);
|
||||
return $this->template->layout('config/layout', $params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -59,7 +59,7 @@ class Config extends Base
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->response->html($this->layout('config_about', array(
|
||||
$this->response->html($this->layout('config/about', array(
|
||||
'db_size' => $this->config->getDatabaseSize(),
|
||||
'title' => t('Settings').' > '.t('About'),
|
||||
)));
|
||||
|
|
@ -74,7 +74,7 @@ class Config extends Base
|
|||
{
|
||||
$this->common('application');
|
||||
|
||||
$this->response->html($this->layout('config_application', array(
|
||||
$this->response->html($this->layout('config/application', array(
|
||||
'languages' => $this->config->getLanguages(),
|
||||
'timezones' => $this->config->getTimezones(),
|
||||
'date_formats' => $this->dateParser->getAvailableFormats(),
|
||||
|
|
@ -91,7 +91,7 @@ class Config extends Base
|
|||
{
|
||||
$this->common('board');
|
||||
|
||||
$this->response->html($this->layout('config_board', array(
|
||||
$this->response->html($this->layout('config/board', array(
|
||||
'default_columns' => implode(', ', $this->board->getDefaultColumns()),
|
||||
'title' => t('Settings').' > '.t('Board settings'),
|
||||
)));
|
||||
|
|
@ -106,7 +106,7 @@ class Config extends Base
|
|||
{
|
||||
$this->common('webhook');
|
||||
|
||||
$this->response->html($this->layout('config_webhook', array(
|
||||
$this->response->html($this->layout('config/webhook', array(
|
||||
'title' => t('Settings').' > '.t('Webhook settings'),
|
||||
)));
|
||||
}
|
||||
|
|
@ -118,7 +118,7 @@ class Config extends Base
|
|||
*/
|
||||
public function api()
|
||||
{
|
||||
$this->response->html($this->layout('config_api', array(
|
||||
$this->response->html($this->layout('config/api', array(
|
||||
'title' => t('Settings').' > '.t('API'),
|
||||
)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class File extends Base
|
|||
{
|
||||
$task = $this->getTask();
|
||||
|
||||
$this->response->html($this->taskLayout('file_new', array(
|
||||
$this->response->html($this->taskLayout('file/new', array(
|
||||
'task' => $task,
|
||||
'max_size' => ini_get('upload_max_filesize'),
|
||||
)));
|
||||
|
|
@ -75,7 +75,7 @@ class File extends Base
|
|||
$file = $this->file->getById($this->request->getIntegerParam('file_id'));
|
||||
|
||||
if ($file['task_id'] == $task['id']) {
|
||||
$this->response->html($this->template->load('file_open', array(
|
||||
$this->response->html($this->template->load('file/open', array(
|
||||
'file' => $file
|
||||
)));
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ class File extends Base
|
|||
$task = $this->getTask();
|
||||
$file = $this->file->getById($this->request->getIntegerParam('file_id'));
|
||||
|
||||
$this->response->html($this->taskLayout('file_remove', array(
|
||||
$this->response->html($this->taskLayout('file/remove', array(
|
||||
'task' => $task,
|
||||
'file' => $file,
|
||||
)));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<section id="main">
|
||||
<section class="sidebar-container" id="config-section">
|
||||
|
||||
<?= Helper\template('config_sidebar') ?>
|
||||
<?= Helper\template('config/sidebar') ?>
|
||||
|
||||
<div class="sidebar-content">
|
||||
<?= $config_content_for_layout ?>
|
||||
|
|
@ -2,13 +2,13 @@
|
|||
<h2><?= t('Attach a document') ?></h2>
|
||||
</div>
|
||||
|
||||
<form action="?controller=file&action=save&task_id=<?= $task['id'] ?>" method="post" enctype="multipart/form-data">
|
||||
<form action="<?= Helper\u('file', 'save', array('task_id' => $task['id'])) ?>" method="post" enctype="multipart/form-data">
|
||||
<?= Helper\form_csrf() ?>
|
||||
<input type="file" name="files[]" multiple />
|
||||
<div class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? Helper\format_bytes($max_size) : $max_size ?></div>
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
<?= t('or') ?>
|
||||
<a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
|
||||
<?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<div class="page-header">
|
||||
<h2><?= Helper\escape($file['name']) ?></h2>
|
||||
<div class="task-file-viewer">
|
||||
<img src="<?= Helper\u('file', 'image', array('file_id' => $file['id'], 'task_id' => $file['task_id'])) ?>" alt="<?= Helper\escape($file['name']) ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<div class="page-header">
|
||||
<h2><?= t('Remove a file') ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="confirm">
|
||||
<p class="alert alert-info">
|
||||
<?= t('Do you really want to remove this file: "%s"?', Helper\escape($file['name'])) ?>
|
||||
</p>
|
||||
|
||||
<div class="form-actions">
|
||||
<?= Helper\a(t('Yes'), 'file', 'remove', array('task_id' => $task['id'], 'file_id' => $file['id']), true, 'btn btn-red') ?>
|
||||
<?= t('or') ?>
|
||||
<?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php if (! empty($files)): ?>
|
||||
<div id="attachments" class="task-show-section">
|
||||
|
||||
<div class="page-header">
|
||||
<h2><?= t('Attachments') ?></h2>
|
||||
</div>
|
||||
|
||||
<ul class="task-show-files">
|
||||
<?php foreach ($files as $file): ?>
|
||||
<li>
|
||||
<?= Helper\a(Helper\escape($file['name']), 'file', 'download', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
|
||||
<span class="task-show-file-actions">
|
||||
<?php if ($file['is_image']): ?>
|
||||
<?= Helper\a(t('open'), 'file', 'open', array('task_id' => $task['id'], 'file_id' => $file['id']), false, 'file-popover') ?>,
|
||||
<?php endif ?>
|
||||
<?= Helper\a(t('remove'), 'file', 'confirm', array('task_id' => $task['id'], 'file_id' => $file['id'])) ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<div class="page-header">
|
||||
<h2><?= Helper\escape($file['name']) ?></h2>
|
||||
<div class="task-file-viewer">
|
||||
<img src="?controller=file&action=image&file_id=<?= $file['id'] ?>&task_id=<?= $file['task_id'] ?>" alt="<?= Helper\escape($file['name']) ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<div class="page-header">
|
||||
<h2><?= t('Remove a file') ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="confirm">
|
||||
<p class="alert alert-info">
|
||||
<?= t('Do you really want to remove this file: "%s"?', Helper\escape($file['name'])) ?>
|
||||
</p>
|
||||
|
||||
<div class="form-actions">
|
||||
<a href="?controller=file&action=remove&task_id=<?= $task['id'] ?>&file_id=<?= $file['id'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Yes') ?></a>
|
||||
<?= t('or') ?> <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>"><?= t('cancel') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<?php if (! empty($files)): ?>
|
||||
<div id="attachments" class="task-show-section">
|
||||
|
||||
<div class="page-header">
|
||||
<h2><?= t('Attachments') ?></h2>
|
||||
</div>
|
||||
|
||||
<ul class="task-show-files">
|
||||
<?php foreach ($files as $file): ?>
|
||||
<li>
|
||||
<a href="?controller=file&action=download&file_id=<?= $file['id'] ?>&task_id=<?= $task['id'] ?>"><?= Helper\escape($file['name']) ?></a>
|
||||
<span class="task-show-file-actions">
|
||||
<?php if ($file['is_image']): ?>
|
||||
<a href="?controller=file&action=open&file_id=<?= $file['id'] ?>&task_id=<?= $task['id'] ?>" class="file-popover"><?= t('open') ?></a>,
|
||||
<?php endif ?>
|
||||
<a href="?controller=file&action=confirm&file_id=<?= $file['id'] ?>&task_id=<?= $task['id'] ?>"><?= t('remove') ?></a>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
|
@ -3,5 +3,5 @@
|
|||
<?= Helper\template('task_show_description', array('task' => $task)) ?>
|
||||
<?= Helper\template('subtask_show', array('task' => $task, 'subtasks' => $subtasks)) ?>
|
||||
<?= Helper\template('task_timesheet', array('timesheet' => $timesheet)) ?>
|
||||
<?= Helper\template('file_show', array('task' => $task, 'files' => $files)) ?>
|
||||
<?= Helper\template('file/show', array('task' => $task, 'files' => $files)) ?>
|
||||
<?= Helper\template('task_comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?>
|
||||
|
|
@ -527,7 +527,7 @@ nav .active a {
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 140%;
|
||||
border-bottom: 1px dotted #DF5353;
|
||||
border-bottom: 1px dotted #ccc;
|
||||
}
|
||||
|
||||
.page-header h2 a {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ nav .active a {
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 140%;
|
||||
border-bottom: 1px dotted #DF5353;
|
||||
border-bottom: 1px dotted #ccc;
|
||||
}
|
||||
|
||||
.page-header h2 a {
|
||||
|
|
|
|||
Loading…
Reference in New Issue