@@ -60,14 +60,17 @@ discard block |
||
| 60 | 60 | <div class="icon-polls"></div> |
| 61 | 61 | <h2><?php p($l->t('No existing polls.')); ?></h2> |
| 62 | 62 | </div> |
| 63 | - <?php else : ?> |
|
| 63 | + <?php else { |
|
| 64 | + : ?> |
|
| 64 | 65 | <div class="table main-container has-controls"> |
| 65 | 66 | <div class ="table-row table-header"> |
| 66 | 67 | |
| 67 | 68 | <div class="wrapper group-master"> |
| 68 | 69 | <div class="wrapper group-1"> |
| 69 | 70 | <div class="wrapper group-1-1"> |
| 70 | - <div class="flex-column name"> <?php p($l->t('Title')); ?></div> |
|
| 71 | + <div class="flex-column name"> <?php p($l->t('Title')); |
|
| 72 | +} |
|
| 73 | +?></div> |
|
| 71 | 74 | </div> |
| 72 | 75 | <div class="wrapper group-1-2"> |
| 73 | 76 | <div class="flex-column actions"></div> |
@@ -265,8 +268,7 @@ discard block |
||
| 265 | 268 | return true; |
| 266 | 269 | } |
| 267 | 270 | } |
| 268 | - } |
|
| 269 | - else if (strpos($item, 'user_') === 0) { |
|
| 271 | + } else if (strpos($item, 'user_') === 0) { |
|
| 270 | 272 | $usr = substr($item, 5); |
| 271 | 273 | if ($usr === $userId) { |
| 272 | 274 | return true; |
@@ -118,9 +118,12 @@ discard block |
||
| 118 | 118 | <span class="symbol icon-settings"></span> |
| 119 | 119 | <?php if (count($comments)) : ?> |
| 120 | 120 | <div id="comment-counter" class="badge"><?php p(count($comments)) ?></div> |
| 121 | - <?php else: ?> |
|
| 121 | + <?php else { |
|
| 122 | + : ?> |
|
| 122 | 123 | <div id="comment-counter" class="badge no-comments"><?php p(count($comments)) ?></div> |
| 123 | - <?php endif; ?> |
|
| 124 | + <?php endif; |
|
| 125 | +} |
|
| 126 | +?> |
|
| 124 | 127 | </a> |
| 125 | 128 | </div> |
| 126 | 129 | |
@@ -333,7 +336,10 @@ discard block |
||
| 333 | 336 | </div> |
| 334 | 337 | <?php if (User::isLoggedIn()) : ?> |
| 335 | 338 | <div class="notification"> |
| 336 | - <input type="checkbox" id="check_notif" class="checkbox" <?php if ($notification !== null) print_unescaped(' checked'); ?> /> |
|
| 339 | + <input type="checkbox" id="check_notif" class="checkbox" <?php if ($notification !== null) { |
|
| 340 | + print_unescaped(' checked'); |
|
| 341 | +} |
|
| 342 | +?> /> |
|
| 337 | 343 | <label for="check_notif"><?php p($l->t('Receive notification email on activity')); ?></label> |
| 338 | 344 | </div> |
| 339 | 345 | <?php endif; ?> |
@@ -431,8 +437,11 @@ discard block |
||
| 431 | 437 | <div class="author"><?php p($userMgr->get($userId)->getDisplayName()) ?></div> |
| 432 | 438 | </div> |
| 433 | 439 | |
| 434 | - <?php else: ?> |
|
| 435 | - <a href="<?php p($urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); ?>"><?php p($l->t('Login or ...')); ?></a> |
|
| 440 | + <?php else { |
|
| 441 | + : ?> |
|
| 442 | + <a href="<?php p($urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); |
|
| 443 | +} |
|
| 444 | +?>"><?php p($l->t('Login or ...')); ?></a> |
|
| 436 | 445 | <div class="authorRow user-cell flex-row"> |
| 437 | 446 | <div class="avatar has-tooltip" title="?"></div> |
| 438 | 447 | <div id="id_ac_detected" class="author flex-column external"> |
@@ -453,9 +462,12 @@ discard block |
||
| 453 | 462 | |
| 454 | 463 | <?php if ($comments == null) : ?> |
| 455 | 464 | <li id="no-comments" class="emptycontent"> |
| 456 | - <?php else : ?> |
|
| 465 | + <?php else { |
|
| 466 | + : ?> |
|
| 457 | 467 | <li id="no-comments" class="emptycontent hidden"> |
| 458 | - <?php endif; ?> |
|
| 468 | + <?php endif; |
|
| 469 | +} |
|
| 470 | +?> |
|
| 459 | 471 | |
| 460 | 472 | <div class="icon-comment"></div> |
| 461 | 473 | <p><?php p($l->t('No comments yet. Be the first.')); ?></p> |
@@ -85,8 +85,11 @@ discard block |
||
| 85 | 85 | <span> |
| 86 | 86 | <?php if ($isUpdate): ?> |
| 87 | 87 | <?php p($l->t('Edit poll') . ' ' . $poll->getTitle()); ?> |
| 88 | - <?php else: ?> |
|
| 89 | - <?php p($l->t('Create new poll')); ?> |
|
| 88 | + <?php else { |
|
| 89 | + : ?> |
|
| 90 | + <?php p($l->t('Create new poll')); |
|
| 91 | +} |
|
| 92 | +?> |
|
| 90 | 93 | <?php endif; ?> |
| 91 | 94 | </span> |
| 92 | 95 | </div> |
@@ -96,11 +99,20 @@ discard block |
||
| 96 | 99 | <?php if ($isUpdate): ?> |
| 97 | 100 | <form name="finish_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.update_poll')); ?>" method="POST"> |
| 98 | 101 | <input type="hidden" name="pollId" value="<?php p($poll->getId()); ?>" /> |
| 99 | - <?php else: ?> |
|
| 100 | - <form name="finish_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.insert_poll')); ?>" method="POST"> |
|
| 102 | + <?php else { |
|
| 103 | + : ?> |
|
| 104 | + <form name="finish_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.insert_poll')); |
|
| 105 | +} |
|
| 106 | +?>" method="POST"> |
|
| 101 | 107 | <?php endif; ?> |
| 102 | - <input type="hidden" name="chosenOptions" id="chosenOptions" value="<?php if (isset($chosen)) p($chosen); ?>" /> |
|
| 103 | - <input type="hidden" name="expireTs" id="expireTs" value="<?php if (isset($expireTs)) p($expireTs); ?>" /> |
|
| 108 | + <input type="hidden" name="chosenOptions" id="chosenOptions" value="<?php if (isset($chosen)) { |
|
| 109 | + p($chosen); |
|
| 110 | +} |
|
| 111 | +?>" /> |
|
| 112 | + <input type="hidden" name="expireTs" id="expireTs" value="<?php if (isset($expireTs)) { |
|
| 113 | + p($expireTs); |
|
| 114 | +} |
|
| 115 | +?>" /> |
|
| 104 | 116 | <input type="hidden" name="userId" id="userId" value="<?php p($userId); ?>" /> |
| 105 | 117 | |
| 106 | 118 | <header class="row"> |
@@ -109,22 +121,40 @@ discard block |
||
| 109 | 121 | <div class="new_poll row"> |
| 110 | 122 | <div class="col-50"> |
| 111 | 123 | <label for="pollTitle" class="input_title"><?php p($l->t('Title')); ?></label> |
| 112 | - <input type="text" class="input_field" id="pollTitle" name="pollTitle" value="<?php if (isset($title)) p($title); ?>" /> |
|
| 124 | + <input type="text" class="input_field" id="pollTitle" name="pollTitle" value="<?php if (isset($title)) { |
|
| 125 | + p($title); |
|
| 126 | +} |
|
| 127 | +?>" /> |
|
| 113 | 128 | <label for="pollDesc" class="input_title"><?php p($l->t('Description')); ?></label> |
| 114 | - <textarea class="input_field" id="pollDesc" name="pollDesc"><?php if (isset($desc)) p($desc); ?></textarea> |
|
| 129 | + <textarea class="input_field" id="pollDesc" name="pollDesc"><?php if (isset($desc)) { |
|
| 130 | + p($desc); |
|
| 131 | +} |
|
| 132 | +?></textarea> |
|
| 115 | 133 | |
| 116 | 134 | <label class="input_title"><?php p($l->t('Access')); ?></label> |
| 117 | 135 | |
| 118 | - <input type="radio" name="accessType" id="private" value="registered" class="radio" <?php if (!$isUpdate || $access === 'registered') print_unescaped('checked'); ?> /> |
|
| 136 | + <input type="radio" name="accessType" id="private" value="registered" class="radio" <?php if (!$isUpdate || $access === 'registered') { |
|
| 137 | + print_unescaped('checked'); |
|
| 138 | +} |
|
| 139 | +?> /> |
|
| 119 | 140 | <label for="private"><?php p($l->t('Registered users only')); ?></label> |
| 120 | 141 | |
| 121 | - <input type="radio" name="accessType" id="hidden" value="hidden" class="radio" <?php if ($isUpdate && $access === 'hidden') print_unescaped('checked'); ?> /> |
|
| 142 | + <input type="radio" name="accessType" id="hidden" value="hidden" class="radio" <?php if ($isUpdate && $access === 'hidden') { |
|
| 143 | + print_unescaped('checked'); |
|
| 144 | +} |
|
| 145 | +?> /> |
|
| 122 | 146 | <label for="hidden"><?php p($l->t('hidden')); ?></label> |
| 123 | 147 | |
| 124 | - <input type="radio" name="accessType" id="public" value="public" class="radio" <?php if ($isUpdate && $access === 'public') print_unescaped('checked'); ?> /> |
|
| 148 | + <input type="radio" name="accessType" id="public" value="public" class="radio" <?php if ($isUpdate && $access === 'public') { |
|
| 149 | + print_unescaped('checked'); |
|
| 150 | +} |
|
| 151 | +?> /> |
|
| 125 | 152 | <label for="public"><?php p($l->t('Public access')); ?></label> |
| 126 | 153 | |
| 127 | - <input type="radio" name="accessType" id="select" value="select" class="radio" <?php if ($isUpdate && $access === 'select') print_unescaped('checked'); ?>> |
|
| 154 | + <input type="radio" name="accessType" id="select" value="select" class="radio" <?php if ($isUpdate && $access === 'select') { |
|
| 155 | + print_unescaped('checked'); |
|
| 156 | +} |
|
| 157 | +?>> |
|
| 128 | 158 | <label for="select"><?php p($l->t('Select')); ?></label> |
| 129 | 159 | <span id="id_label_select">...</span> |
| 130 | 160 | |
@@ -140,9 +170,12 @@ discard block |
||
| 140 | 170 | </div> |
| 141 | 171 | </div> |
| 142 | 172 | |
| 143 | - <input type="hidden" name="accessValues" id="accessValues" value="<?php if ($isUpdate && $access === 'select') p($accessTypes) ?>" /> |
|
| 173 | + <input type="hidden" name="accessValues" id="accessValues" value="<?php if ($isUpdate && $access === 'select') { |
|
| 174 | + p($accessTypes) ?>" /> |
|
| 144 | 175 | |
| 145 | - <input id="isAnonymous" name="isAnonymous" type="checkbox" class="checkbox" <?php $isAnonymous ? print_unescaped('value="true" checked') : print_unescaped('value="false"'); ?> /> |
|
| 176 | + <input id="isAnonymous" name="isAnonymous" type="checkbox" class="checkbox" <?php $isAnonymous ? print_unescaped('value="true" checked') : print_unescaped('value="false"'); |
|
| 177 | +} |
|
| 178 | +?> /> |
|
| 146 | 179 | <label for="isAnonymous" class="input_title"><?php p($l->t('Anonymous')) ?></label> |
| 147 | 180 | |
| 148 | 181 | <div id="anonOptions" style="display:none;"> |
@@ -158,20 +191,32 @@ discard block |
||
| 158 | 191 | </div> |
| 159 | 192 | <div class="col-50"> |
| 160 | 193 | |
| 161 | - <input type="radio" name="pollType" id="event" value="event" class="radio" <?php if (!$isUpdate || $poll->getType() === 0) print_unescaped('checked'); ?> /> |
|
| 194 | + <input type="radio" name="pollType" id="event" value="event" class="radio" <?php if (!$isUpdate || $poll->getType() === 0) { |
|
| 195 | + print_unescaped('checked'); |
|
| 196 | +} |
|
| 197 | +?> /> |
|
| 162 | 198 | <label for="event"><?php p($l->t('Event schedule')); ?></label> |
| 163 | 199 | |
| 164 | 200 | <!-- TODO texts to db --> |
| 165 | - <input type="radio" name="pollType" id="text" value="text" class="radio" <?php if ($isUpdate && $poll->getType() === 1) print_unescaped('checked'); ?>> |
|
| 201 | + <input type="radio" name="pollType" id="text" value="text" class="radio" <?php if ($isUpdate && $poll->getType() === 1) { |
|
| 202 | + print_unescaped('checked'); |
|
| 203 | +} |
|
| 204 | +?>> |
|
| 166 | 205 | <label for="text"><?php p($l->t('Text based')); ?></label> |
| 167 | 206 | |
| 168 | - <div id="date-select-container" <?php if ($isUpdate && $poll->getType() === 1) print_unescaped('style="display:none;"'); ?> > |
|
| 207 | + <div id="date-select-container" <?php if ($isUpdate && $poll->getType() === 1) { |
|
| 208 | + print_unescaped('style="display:none;"'); |
|
| 209 | +} |
|
| 210 | +?> > |
|
| 169 | 211 | <label for="datetimepicker" class="input_title"><?php p($l->t('Dates')); ?></label> |
| 170 | 212 | <input id="datetimepicker" type="text" /> |
| 171 | 213 | <table id="selected-dates-table" class="choices"> |
| 172 | 214 | </table> |
| 173 | 215 | </div> |
| 174 | - <div id="text-select-container" <?php if(!$isUpdate || $poll->getType() === 0) print_unescaped('style="display:none;"'); ?> > |
|
| 216 | + <div id="text-select-container" <?php if(!$isUpdate || $poll->getType() === 0) { |
|
| 217 | + print_unescaped('style="display:none;"'); |
|
| 218 | +} |
|
| 219 | +?> > |
|
| 175 | 220 | <label for="text-title" class="input_title"><?php p($l->t('Text item')); ?></label> |
| 176 | 221 | <div class="input-group"> |
| 177 | 222 | <input type="text" id="text-title" placeholder="<?php print_unescaped('Insert text...'); ?>" /> |
@@ -187,8 +232,11 @@ discard block |
||
| 187 | 232 | <div class="form-actions"> |
| 188 | 233 | <?php if ($isUpdate): ?> |
| 189 | 234 | <input type="submit" id="submit_finish_poll" class="button btn primary" value="<?php p($l->t('Update poll')); ?>" /> |
| 190 | - <?php else: ?> |
|
| 191 | - <input type="submit" id="submit_finish_poll" class="button btn primary" value="<?php p($l->t('Create poll')); ?>" /> |
|
| 235 | + <?php else { |
|
| 236 | + : ?> |
|
| 237 | + <input type="submit" id="submit_finish_poll" class="button btn primary" value="<?php p($l->t('Create poll')); |
|
| 238 | +} |
|
| 239 | +?>" /> |
|
| 192 | 240 | <?php endif; ?> |
| 193 | 241 | <a href="<?php p($urlGenerator->linkToRoute('polls.page.index')); ?>" id="submit_cancel_poll" class="button"><?php p($l->t('Cancel')); ?></a> |
| 194 | 242 | </div> |