Rename add_slot by add_column

This commit is contained in:
Olivier PEREZ 2015-11-30 20:38:53 +01:00
parent 5d4958e1f4
commit 5750a36172
5 changed files with 8 additions and 8 deletions

View File

@ -387,15 +387,15 @@ if (!empty($_GET['delete_column'])) {
// Add a slot // Add a slot
// ------------------------------- // -------------------------------
if (isset($_GET['add_slot'])) { if (isset($_GET['add_column'])) {
$smarty->assign('poll_id', $poll_id); $smarty->assign('poll_id', $poll_id);
$smarty->assign('admin_poll_id', $admin_poll_id); $smarty->assign('admin_poll_id', $admin_poll_id);
$smarty->assign('format', $poll->format); $smarty->assign('format', $poll->format);
$smarty->assign('title', __('Generic', 'Poll') . ' - ' . $poll->title); $smarty->assign('title', __('Generic', 'Poll') . ' - ' . $poll->title);
$smarty->display('add_slot.tpl'); $smarty->display('add_column.tpl');
exit; exit;
} }
if (isset($_POST['confirm_add_slot'])) { if (isset($_POST['confirm_add_column'])) {
try { try {
if ($poll->format === 'D') { if ($poll->format === 'D') {
$newdate = strip_tags($_POST['newdate']); $newdate = strip_tags($_POST['newdate']);

View File

@ -200,7 +200,7 @@ class AdminPollService {
* @throws MomentAlreadyExistsException When the moment to add already exists in database * @throws MomentAlreadyExistsException When the moment to add already exists in database
*/ */
public function addDateSlot($poll_id, $datetime, $new_moment) { public function addDateSlot($poll_id, $datetime, $new_moment) {
$this->logService->log('ADD_SLOT', 'id:' . $poll_id . ', datetime:' . $datetime . ', moment:' . $new_moment); $this->logService->log('ADD_COLUMN', 'id:' . $poll_id . ', datetime:' . $datetime . ', moment:' . $new_moment);
$slots = $this->slotRepository->listByPollId($poll_id); $slots = $this->slotRepository->listByPollId($poll_id);
$result = $this->findInsertPosition($slots, $datetime); $result = $this->findInsertPosition($slots, $datetime);
@ -243,7 +243,7 @@ class AdminPollService {
* @throws MomentAlreadyExistsException When the moment to add already exists in database * @throws MomentAlreadyExistsException When the moment to add already exists in database
*/ */
public function addClassicSlot($poll_id, $title) { public function addClassicSlot($poll_id, $title) {
$this->logService->log('ADD_SLOT', 'id:' . $poll_id . ', title:' . $title); $this->logService->log('ADD_COLUMN', 'id:' . $poll_id . ', title:' . $title);
$slots = $this->slotRepository->listByPollId($poll_id); $slots = $this->slotRepository->listByPollId($poll_id);

View File

@ -32,7 +32,7 @@
{/if} {/if}
<div class="form-group"> <div class="form-group">
<button class="btn btn-default" type="submit" name="back">{__('adminstuds', 'Back to the poll')}</button> <button class="btn btn-default" type="submit" name="back">{__('adminstuds', 'Back to the poll')}</button>
<button type="submit" name="confirm_add_slot" class="btn btn-success">{__('adminstuds', 'Add a column')}</button> <button type="submit" name="confirm_add_column" class="btn btn-success">{__('adminstuds', 'Add a column')}</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -21,7 +21,7 @@
</td> </td>
{/foreach} {/foreach}
<td> <td>
<a href="{poll_url id=$admin_poll_id admin=true action='add_slot'}" <a href="{poll_url id=$admin_poll_id admin=true action='add_column'}"
class="btn btn-link btn-sm" title="{__('adminstuds', 'Add a column')}"> class="btn btn-link btn-sm" title="{__('adminstuds', 'Add a column')}">
<i class="glyphicon glyphicon-plus text-success"></i><span class="sr-only">{__('Poll results', 'Add a column')}</span> <i class="glyphicon glyphicon-plus text-success"></i><span class="sr-only">{__('Poll results', 'Add a column')}</span>
</a> </a>

View File

@ -27,7 +27,7 @@
{/foreach} {/foreach}
{/foreach} {/foreach}
<td> <td>
<a href="{poll_url id=$admin_poll_id admin=true action='add_slot'}" <a href="{poll_url id=$admin_poll_id admin=true action='add_column'}"
class="btn btn-link btn-sm" title="{__('adminstuds', 'Add a column')}"> class="btn btn-link btn-sm" title="{__('adminstuds', 'Add a column')}">
<i class="glyphicon glyphicon-plus text-success"></i><span class="sr-only">{__('Poll results', 'Add a column')}</span> <i class="glyphicon glyphicon-plus text-success"></i><span class="sr-only">{__('Poll results', 'Add a column')}</span>
</a> </a>