49 lines
2.5 KiB
PHP
49 lines
2.5 KiB
PHP
|
|
<div class="page-header">
|
||
|
|
<h2><?= t('My workspaces') ?></h2>
|
||
|
|
<ul>
|
||
|
|
<li>
|
||
|
|
<?= $this->modal->medium('plus', t('Add workspace'), 'WorkspaceOrgController', 'create', array('plugin' => 'WorkspaceOrg')) ?>
|
||
|
|
</li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<?php foreach ($groups as $workspace => $projects): ?>
|
||
|
|
<div class="wso-group">
|
||
|
|
<h3 class="wso-group-title">
|
||
|
|
<?= $this->text->e($workspace) ?>
|
||
|
|
<?php if ($workspace !== $default): ?>
|
||
|
|
<span class="wso-group-actions">
|
||
|
|
<?= $this->modal->medium('edit', t('Rename'), 'WorkspaceOrgController', 'edit', array('plugin' => 'WorkspaceOrg', 'name' => $workspace)) ?>
|
||
|
|
<?= $this->modal->confirm('trash-o', t('Remove'), 'WorkspaceOrgController', 'confirm', array('plugin' => 'WorkspaceOrg', 'name' => $workspace)) ?>
|
||
|
|
</span>
|
||
|
|
<?php endif ?>
|
||
|
|
</h3>
|
||
|
|
|
||
|
|
<?php if (empty($projects)): ?>
|
||
|
|
<p class="wso-empty"><?= t('(no projects yet)') ?></p>
|
||
|
|
<?php else: ?>
|
||
|
|
<table class="table-striped wso-table">
|
||
|
|
<?php foreach ($projects as $project): ?>
|
||
|
|
<tr>
|
||
|
|
<td class="wso-project">
|
||
|
|
<?= $this->url->link($this->text->e($project['name']), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?>
|
||
|
|
</td>
|
||
|
|
<td class="wso-move">
|
||
|
|
<form method="post" class="wso-move-form" action="<?= $this->url->href('WorkspaceOrgController', 'assign', array('plugin' => 'WorkspaceOrg')) ?>">
|
||
|
|
<?= $this->form->csrf() ?>
|
||
|
|
<input type="hidden" name="project_id" value="<?= (int) $project['id'] ?>">
|
||
|
|
<select name="workspace" onchange="this.form.submit()">
|
||
|
|
<?php foreach ($options as $option): ?>
|
||
|
|
<option value="<?= $this->text->e($option) ?>"<?= $option === $workspace ? ' selected="selected"' : '' ?>><?= $this->text->e($option) ?></option>
|
||
|
|
<?php endforeach ?>
|
||
|
|
</select>
|
||
|
|
<noscript><button type="submit" class="btn btn-blue"><?= t('Move') ?></button></noscript>
|
||
|
|
</form>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
<?php endforeach ?>
|
||
|
|
</table>
|
||
|
|
<?php endif ?>
|
||
|
|
</div>
|
||
|
|
<?php endforeach ?>
|