diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2022-08-19 19:13:16 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2022-08-19 19:13:16 +0000 |
| commit | fd49ac1d71c3e5712de8a4a857c0c32c83ebbf6d (patch) | |
| tree | b4d35817019d64974c42c8653341bbd828e6ed95 /templates | |
| parent | 2e319c4d00834e6f33170afabd8214e80e66401f (diff) | |
remove obsolete code, refs #1121
Merge request studip/studip!879
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/sidebar/clipboard-area.php | 49 | ||||
| -rw-r--r-- | templates/sidebar/clipboard-widget.php | 52 | ||||
| -rw-r--r-- | templates/sidebar/room-clipboard-item.php | 14 | ||||
| -rw-r--r-- | templates/sidebar/room-clipboard-widget.php | 48 |
4 files changed, 70 insertions, 93 deletions
diff --git a/templates/sidebar/clipboard-area.php b/templates/sidebar/clipboard-area.php index 64c3d03..dd8f676 100644 --- a/templates/sidebar/clipboard-area.php +++ b/templates/sidebar/clipboard-area.php @@ -14,8 +14,6 @@ <? endforeach ?> <? endif ?> </select> - <? if (!$readonly): ?> - <input class="clipboard-name invisible" type="text" name="clipboard_name" value=""> <?= Icon::create('edit')->asInput( [ @@ -44,7 +42,6 @@ 'data-confirm-message' => _('Sind Sie sicher?') ] ) ?> - <? endif ?> </div> <div class="clipboard-area-container"> <? if ($clipboards): ?> @@ -74,7 +71,6 @@ [ 'item' => $item, 'draggable_items' => $draggable_items, - 'readonly' => $readonly, 'checkbox_id' => $checkbox_id ] ) ?> @@ -98,17 +94,15 @@ <?= htmlReady($item['name']) ?> </label> </td> - <? if (!$readonly): ?> - <td class="actions"> - <?= Icon::create('trash')->asInput( - [ - 'title' => sprintf(_('%s löschen.'), htmlReady($item['name'])), - 'data-confirm-message' => _('Sind Sie sicher?'), - 'class' => 'text-bottom clipboard-item-remove-button' - ] - ) ?> - </td> - <? endif ?> + <td class="actions"> + <?= Icon::create('trash')->asInput( + [ + 'title' => sprintf(_('%s löschen.'), htmlReady($item['name'])), + 'data-confirm-message' => _('Sind Sie sicher?'), + 'class' => 'text-bottom clipboard-item-remove-button' + ] + ) ?> + </td> </tr> <? endif ?> <? endforeach ?> @@ -138,15 +132,13 @@ value="" class="item-id"> </td> - <? if (!$readonly): ?> - <td class="item-actions"> - <?= Icon::create('trash')->asInput( - [ - 'class' => 'text-bottom clipboard-item-remove-button' - ] - ) ?> - </td> - <? endif ?> + <td class="item-actions"> + <?= Icon::create('trash')->asInput( + [ + 'class' => 'text-bottom clipboard-item-remove-button' + ] + ) ?> + </td> </tr> <? endif ?> </table> @@ -195,13 +187,4 @@ <? endif ?> </table> </div> - <? if ($readonly): ?> - <?= \Studip\Button::create( - $apply_button_title, - 'clipboard_update_session_special_action', - [ - 'class' => 'apply-button' - ] - ) ?> - <? endif ?> </form> diff --git a/templates/sidebar/clipboard-widget.php b/templates/sidebar/clipboard-widget.php index 46015e7..ccb44b2 100644 --- a/templates/sidebar/clipboard-widget.php +++ b/templates/sidebar/clipboard-widget.php @@ -19,31 +19,29 @@ <? endforeach; ?> </ul> -<? if (!$readonly): ?> - <form class="default new-clipboard-form" - action="<?= URLHelper::getLink( - 'dispatch.php/clipboard/add' - )?>" - method="post"> - <?= CSRFProtection::tokenTag() ?> - <input type="hidden" name="allowed_item_class" - value="<?= htmlReady($allowed_item_class) ?>"> - <input type="hidden" name="widget_id" - value="<?= htmlReady($clipboard_widget_id) ?>"> - <label> - <?= _('Merkzettel hinzufügen') ?> - <?= tooltipIcon(_('Geben Sie bitte einen Namen ein und klicken Sie auf das Plus-Symbol um einen neuen Merkzettel zu erstellen.')) ?> - <input type="text" name="name" placeholder="<?= _('Name des neuen Merkzettels') ?>" - </label> +<form class="default new-clipboard-form" + action="<?= URLHelper::getLink( + 'dispatch.php/clipboard/add' + )?>" + method="post"> + <?= CSRFProtection::tokenTag() ?> + <input type="hidden" name="allowed_item_class" + value="<?= htmlReady($allowed_item_class) ?>"> + <input type="hidden" name="widget_id" + value="<?= htmlReady($clipboard_widget_id) ?>"> + <label> + <?= _('Merkzettel hinzufügen') ?> + <?= tooltipIcon(_('Geben Sie bitte einen Namen ein und klicken Sie auf das Plus-Symbol um einen neuen Merkzettel zu erstellen.')) ?> + <input type="text" name="name" placeholder="<?= _('Name des neuen Merkzettels') ?>"> + </label> - <?= Icon::create( - 'add', - Icon::ROLE_CLICKABLE, - [ 'title' => _('Hinzufügen')])->asInput([ - 'name' => 'save', - 'id' => 'add-clipboard-button', - 'class' => 'middle', - 'disabled' => 'disabled' - ]) ?> - </form> -<? endif ?> + <?= Icon::create( + 'add', + Icon::ROLE_CLICKABLE, + [ 'title' => _('Hinzufügen')])->asInput([ + 'name' => 'save', + 'id' => 'add-clipboard-button', + 'class' => 'middle', + 'disabled' => 'disabled' + ]) ?> +</form> diff --git a/templates/sidebar/room-clipboard-item.php b/templates/sidebar/room-clipboard-item.php index 2fc220b..caccb71 100644 --- a/templates/sidebar/room-clipboard-item.php +++ b/templates/sidebar/room-clipboard-item.php @@ -66,13 +66,11 @@ if (!$item) { ] )?> </a> - <? if (!$readonly): ?> - <?= Icon::create('trash')->asInput( - [ - 'data-confirm-message' => _('Sind Sie sicher?'), - 'class' => 'text-bottom clipboard-item-remove-button' - ] - ) ?> - <? endif ?> + <?= Icon::create('trash')->asInput( + [ + 'data-confirm-message' => _('Sind Sie sicher?'), + 'class' => 'text-bottom clipboard-item-remove-button' + ] + ) ?> </td> </tr> diff --git a/templates/sidebar/room-clipboard-widget.php b/templates/sidebar/room-clipboard-widget.php index c6a9830..76678df 100644 --- a/templates/sidebar/room-clipboard-widget.php +++ b/templates/sidebar/room-clipboard-widget.php @@ -20,30 +20,28 @@ <? endforeach; ?> </ul> </div> -<? if (!$readonly): ?> - <form class="default new-clipboard-form" - action="<?= URLHelper::getLink( - 'dispatch.php/clipboard/add' - )?>" - method="post"> - <?= CSRFProtection::tokenTag() ?> - <input type="hidden" name="allowed_item_class" - value="<?= htmlReady($allowed_item_class) ?>"> - <input type="hidden" name="widget_id" - value="<?= htmlReady($clipboard_widget_id) ?>"> - <label> - <?= _('Raumgruppe hinzufügen') ?> - <?= tooltipIcon(_('Geben Sie bitte einen Namen ein und klicken Sie auf das Plus-Symbol um eine neue Raumgruppe zu erstellen.')) ?> - <input type="text" name="name" placeholder="<?= _('Name der neuen Raumgruppe') ?>"> +<form class="default new-clipboard-form" + action="<?= URLHelper::getLink( + 'dispatch.php/clipboard/add' + )?>" + method="post"> + <?= CSRFProtection::tokenTag() ?> + <input type="hidden" name="allowed_item_class" + value="<?= htmlReady($allowed_item_class) ?>"> + <input type="hidden" name="widget_id" + value="<?= htmlReady($clipboard_widget_id) ?>"> + <label> + <?= _('Raumgruppe hinzufügen') ?> + <?= tooltipIcon(_('Geben Sie bitte einen Namen ein und klicken Sie auf das Plus-Symbol um eine neue Raumgruppe zu erstellen.')) ?> + <input type="text" name="name" placeholder="<?= _('Name der neuen Raumgruppe') ?>"> - <?= Icon::create('add', Icon::ROLE_CLICKABLE, - [ 'title' => _('Hinzufügen')])->asInput([ - 'name' => 'save', - 'id' => 'add-clipboard-button', - 'class' => 'middle', - 'disabled' => 'disabled' - ]) ?> - </label> + <?= Icon::create('add', Icon::ROLE_CLICKABLE, + [ 'title' => _('Hinzufügen')])->asInput([ + 'name' => 'save', + 'id' => 'add-clipboard-button', + 'class' => 'middle', + 'disabled' => 'disabled' + ]) ?> + </label> - </form> -<? endif ?> +</form> |
