diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-02 17:01:27 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-02 17:01:27 -0500 |
commit | 3833c12ccce59bcc49c4cfa892401973558f604d (patch) | |
tree | b67b0e10cdc3d42e5626f728206138a444a40ed0 /app/Template/action | |
parent | d49ce63e51f596ad3bf0d02b689aea673cf544f8 (diff) |
Refactoring/rewrite of modal boxes handling
Diffstat (limited to 'app/Template/action')
-rw-r--r-- | app/Template/action/index.php | 12 | ||||
-rw-r--r-- | app/Template/action/remove.php | 10 |
2 files changed, 10 insertions, 12 deletions
diff --git a/app/Template/action/index.php b/app/Template/action/index.php index 7768a0b6..90db0450 100644 --- a/app/Template/action/index.php +++ b/app/Template/action/index.php @@ -2,12 +2,10 @@ <h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2> <ul> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add a new action'), 'ActionCreationController', 'create', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a new action'), 'ActionCreationController', 'create', array('project_id' => $project['id'])) ?> </li> <li> - <i class="fa fa-copy fa-fw"></i> - <?= $this->url->link(t('Import from another project'), 'ProjectActionDuplicationController', 'show', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('copy', t('Import from another project'), 'ProjectActionDuplicationController', 'show', array('project_id' => $project['id'])) ?> </li> </ul> </div> @@ -17,8 +15,8 @@ <?php else: ?> <table class="table-scrolling"> <tr> - <th><?= t('Automatic actions') ?></th> - <th><?= t('Action parameters') ?></th> + <th class="column-60"><?= t('Automatic actions') ?></th> + <th class="column-25"><?= t('Action parameters') ?></th> <th><?= t('Action') ?></th> </tr> @@ -65,7 +63,7 @@ </ul> </td> <td> - <?= $this->url->link(t('Remove'), 'ActionController', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'ActionController', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id'])) ?> </td> </tr> <?php endforeach ?> diff --git a/app/Template/action/remove.php b/app/Template/action/remove.php index 384bec7a..e3cdb206 100644 --- a/app/Template/action/remove.php +++ b/app/Template/action/remove.php @@ -7,9 +7,9 @@ <?= t('Do you really want to remove this action: "%s"?', $this->text->in($action['event_name'], $available_events).'/'.$this->text->in($action['action_name'], $available_actions)) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ActionController', 'remove', array('project_id' => $project['id'], 'action_id' => $action['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ActionController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ActionController', + 'remove', + array('project_id' => $project['id'], 'action_id' => $action['id']) + ) ?> </div> |