diff --git a/.stylelintrc.json b/.stylelintrc.json index 388914d3f247c0ae24152dbf0b7b51ef6053ddea..267378203a98e699d73ddafbfd810942b2916f3c 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -18,6 +18,7 @@ "color-no-invalid-hex": null, "comment-empty-line-before": null, "comment-whitespace-inside": null, + "custom-property-empty-line-before": null, "declaration-bang-space-after": null, "declaration-bang-space-before": null, "declaration-block-no-duplicate-properties": null, diff --git a/app/controllers/admin/courses.php b/app/controllers/admin/courses.php index 9e9423dcfad0acb7086638a193a9ed466f312581..3d63cd9f3e0802c5a46192c063b7529434568d25 100644 --- a/app/controllers/admin/courses.php +++ b/app/controllers/admin/courses.php @@ -697,7 +697,7 @@ class Admin_CoursesController extends AuthenticatedController foreach ($icons as $icon) { $d['contents'] .= '<li class="my-courses-navigation-item '. ($icon->getImage()->signalsAttention() ? 'my-courses-navigation-important' : '').'"> <a href="'. URLHelper::getLink('seminar_main.php', ['auswahl' => $course->id, 'redirect_to' => $icon->getURL()]).'"'. ($icon->getTitle() ? ' title="'.htmlReady($icon->getTitle()).'"' : '') .'> - '. $icon->getImage()->asImg(20) .' + '. $icon->getImage()->asImg() .' </a> </li>'; } diff --git a/app/controllers/admin/role.php b/app/controllers/admin/role.php index c316021cd88f99e087c67ad1e90d5d8cef8cbf76..890965a40f3940262010c010cabdd67ab964db04 100644 --- a/app/controllers/admin/role.php +++ b/app/controllers/admin/role.php @@ -548,7 +548,7 @@ class Admin_RoleController extends AuthenticatedController $actions->addLink( _('Neue Rolle anlegen'), $this->url_for('admin/role/add'), - Icon::create('add', 'clickable') + Icon::create('add') )->asDialog('size=auto'); } diff --git a/app/controllers/admin/statusgroups.php b/app/controllers/admin/statusgroups.php index 5851d4843cd644ab75569200f710547a582be1f2..b634a9aeabe7fc1adf079d4f83d48280a0364051 100644 --- a/app/controllers/admin/statusgroups.php +++ b/app/controllers/admin/statusgroups.php @@ -68,14 +68,16 @@ class Admin_StatusgroupsController extends AuthenticatedController $sidebar = Sidebar::get(); if ($this->tutor) { $widget = new ActionsWidget(); - $widget->addLink(_('Neue Gruppe anlegen'), - $this->url_for('admin/statusgroups/editGroup'), - Icon::create('add', 'clickable')) - ->asDialog('size=auto'); - $widget->addLink(_('Gruppenreihenfolge ändern'), - $this->url_for('admin/statusgroups/sortGroups'), - Icon::create('arr_2down', 'clickable')) - ->asDialog(); + $widget->addLink( + _('Neue Gruppe anlegen'), + $this->url_for('admin/statusgroups/editGroup'), + Icon::create('add') + )->asDialog('size=auto'); + $widget->addLink( + _('Gruppenreihenfolge ändern'), + $this->url_for('admin/statusgroups/sortGroups'), + Icon::create('arr_2down') + )->asDialog(); $sidebar->addWidget($widget); } // Collect all groups diff --git a/app/controllers/course/files.php b/app/controllers/course/files.php index 4370eea24d3ec406cf7372f7476f44eb175cdb23..e40ac45631abcf3473ed3ca54709f2d46a884617 100644 --- a/app/controllers/course/files.php +++ b/app/controllers/course/files.php @@ -54,16 +54,15 @@ class Course_FilesController extends AuthenticatedController $actions->addLink( _("Ordner bearbeiten"), $this->url_for("file/edit_folder/".$this->topFolder->getId()), - Icon::create("edit", "clickable"), - ['data-dialog' => 1] - ); + Icon::create('edit') + )->asDialog(); } if ($this->topFolder && $this->topFolder->isSubfolderAllowed($GLOBALS['user']->id)) { $actions->addLink( _('Neuer Ordner'), URLHelper::getUrl('dispatch.php/file/new_folder/' . $this->topFolder->getId()), - Icon::create('folder-empty', 'clickable') + Icon::create('folder-empty') )->asDialog(); } @@ -71,7 +70,7 @@ class Course_FilesController extends AuthenticatedController $actions->addLink( _('Dokument hinzufügen'), '#', - Icon::create('add', 'clickable'), + Icon::create('add'), ['onclick' => "STUDIP.Files.openAddFilesWindow(); return false;"] ); } @@ -164,7 +163,7 @@ class Course_FilesController extends AuthenticatedController $actions->addLink( _('Neue Dateien herunterladen'), $this->url_for('course/files/newest_files'), - Icon::create('download', 'clickable'), + Icon::create('download'), ['cid' => $this->course->id] ); $actions->addLink( diff --git a/app/controllers/course/grouping.php b/app/controllers/course/grouping.php index aec926443ec181e7587310816a81a738bb516004..fa3670d183213bbba5d146afcdf46ddd76e1b530 100644 --- a/app/controllers/course/grouping.php +++ b/app/controllers/course/grouping.php @@ -136,7 +136,7 @@ class Course_GroupingController extends AuthenticatedController $actions->addLink( _('Unterveranstaltungen anlegen'), $this->url_for('course/grouping/create_children'), - Icon::create('add', 'clickable') + Icon::create('add') )->asDialog('size=auto'); $sidebar->addWidget($actions); } @@ -188,7 +188,7 @@ class Course_GroupingController extends AuthenticatedController 'course_id' => $this->course->id, 'default_subject' => '[' . $this->course->getFullName() . ']', ]), - Icon::create('mail', 'clickable') + Icon::create('mail') )->asDialog('size=auto'); $sidebar->addWidget($actions); diff --git a/app/controllers/course/members.php b/app/controllers/course/members.php index 7812771ed6d982f2b5218afc664fe3bfbfe127f2..91601d760d559092d96657b596bc94265b0c1354 100644 --- a/app/controllers/course/members.php +++ b/app/controllers/course/members.php @@ -213,7 +213,7 @@ class Course_MembersController extends AuthenticatedController $results = SimpleCollection::createFromArray($members)->pluck('email'); if (!empty($results)) { - return sprintf('<a href="mailto:%s">%s</a>', htmlReady(join(',', $results)), Icon::create('mail', 'clickable', ['title' => sprintf('E-Mail an alle %s versenden',$textStatus)])->asImg(16)); + return sprintf('<a href="mailto:%s">%s</a>', htmlReady(join(',', $results)), Icon::create('mail', attributes: ['title' => sprintf('E-Mail an alle %s versenden',$textStatus)])->asImg()); } else { return null; } diff --git a/app/controllers/course/room_requests.php b/app/controllers/course/room_requests.php index 788c21fda8896943f43977ceddbadcd71e275bad..d3b29a9a29987a1f0086f85d0f044abdd266da3f 100644 --- a/app/controllers/course/room_requests.php +++ b/app/controllers/course/room_requests.php @@ -85,7 +85,7 @@ class Course_RoomRequestsController extends AuthenticatedController $actions->addLink( _('Neue Raumanfrage erstellen'), $this->url_for('course/room_requests/new'), - Icon::create('add', 'clickable') + Icon::create('add') ); Sidebar::get()->addWidget($actions); diff --git a/app/controllers/course/studygroup.php b/app/controllers/course/studygroup.php index 4582225d6ac18a2f481ac0e3960fe668da4ef993..e9a0f02e377255810951e2dd733400dfe1d023f7 100644 --- a/app/controllers/course/studygroup.php +++ b/app/controllers/course/studygroup.php @@ -101,7 +101,7 @@ class Course_StudygroupController extends AuthenticatedController $send_from_search_page = Request::get('send_from_search_page'); } - $icon = Icon::create('door-enter', 'clickable'); + $icon = Icon::create('door-enter'); if ($GLOBALS['perm']->have_studip_perm('autor', $studygroup->id) || $membership_requested) { $action = _('Persönlicher Status:'); if ($membership_requested) { @@ -358,7 +358,7 @@ class Course_StudygroupController extends AuthenticatedController ->setNavigationItem('/course/members') ->render(); - $element = LinkElement::fromHTML($mp, Icon::create('add', 'clickable')); + $element = LinkElement::fromHTML($mp, Icon::create('add')); $actions->addElement($element); } diff --git a/app/controllers/files.php b/app/controllers/files.php index effdf627ac9bd15a566c9616ea8cf71f12c752d4..b8ccf175909d8caba1d741dc77adecf08f77d491 100644 --- a/app/controllers/files.php +++ b/app/controllers/files.php @@ -66,7 +66,7 @@ class FilesController extends AuthenticatedController $sources->addLink( _("Stud.IP-Dateien"), $this->url_for("files/index"), - Icon::create("files", "clickable") + Icon::create('files') ); foreach (PluginManager::getInstance()->getPlugins(FilesystemPlugin::class) as $plugin) { if ($plugin->isPersonalFileArea()) { @@ -87,24 +87,23 @@ class FilesController extends AuthenticatedController $actions->addLink( _('Ordner bearbeiten'), $this->url_for('file/edit_folder/'.$folder->getId()), - Icon::create("edit", "clickable"), - ['data-dialog' => 1] - ); + Icon::create('edit') + )->asDialog(); } if ($folder->isSubfolderAllowed($GLOBALS['user']->id)) { $actions->addLink( _('Neuer Ordner'), URLHelper::getUrl('dispatch.php/file/new_folder/' . $folder->getId()), - Icon::create('folder-empty', 'clickable'), ['data-dialog' => 1] - ); + Icon::create('folder-empty') + )->asDialog(); } if ($folder->isWritable($GLOBALS['user']->id)) { $actions->addLink( _('Dokument hinzufügen'), '#', - Icon::create('add', 'clickable'), + Icon::create('add'), ['onClick' => "STUDIP.Files.openAddFilesWindow(); return false;"] ); } @@ -127,7 +126,7 @@ class FilesController extends AuthenticatedController $actions->addLink( _('Dateibereiche konfigurieren'), $this->url_for('files/configure'), - Icon::create('admin', 'clickable') + Icon::create('admin') )->asDialog(); } else { $actions->addLink( diff --git a/app/controllers/files_dashboard/helpers.php b/app/controllers/files_dashboard/helpers.php index 3519fb8ba5f6a525bfb195a69eecd3062dfbb35e..d86fc9f815503266f826137d44e59cfd49775659 100644 --- a/app/controllers/files_dashboard/helpers.php +++ b/app/controllers/files_dashboard/helpers.php @@ -23,7 +23,7 @@ trait Helpers $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/details/'.$fileRef->id), _('Info'), - Icon::create('info-circle', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('info-circle'), ['data-dialog' => 1] ); @@ -33,7 +33,7 @@ trait Helpers $actionMenu->addLink( $rangeLink, _('Ordner öffnen'), - Icon::create('folder-empty', Icon::ROLE_CLICKABLE, ['size' => 20]) + Icon::create('folder-empty') ); } @@ -41,13 +41,13 @@ trait Helpers $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/edit/'.$fileRef->id), _('Datei bearbeiten'), - Icon::create('edit', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('edit'), ['data-dialog' => ''] ); $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/update/'.$fileRef->id), _('Datei aktualisieren'), - Icon::create('refresh', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('refresh'), ['data-dialog' => ''] ); } @@ -56,7 +56,7 @@ trait Helpers $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/choose_destination/move/'.$fileRef->id), _('Datei verschieben'), - Icon::create('arr_1right', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('arr_1right'), ['data-dialog' => 'size=auto'] ); } @@ -65,7 +65,7 @@ trait Helpers $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/choose_destination/copy/'.$fileRef->id), _('Datei kopieren'), - Icon::create('clipboard', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('clipboard'), ['data-dialog' => 'size=auto'] ); } @@ -74,7 +74,7 @@ trait Helpers $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/delete/'.$fileRef->id), _('Datei löschen'), - Icon::create('trash', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('trash'), ['onclick' => "return STUDIP.Dialog.confirmAsPost('".sprintf(_('Soll die Datei "%s" wirklich gelöscht werden?'), jsReady($fileRef->name))."', this.href);"] ); } diff --git a/app/controllers/files_dashboard/sidebar.php b/app/controllers/files_dashboard/sidebar.php index 9fcc237c30304a901d222d066352880c07466805..135761a7dfb625324892b673f08bcb695f2d9f71 100644 --- a/app/controllers/files_dashboard/sidebar.php +++ b/app/controllers/files_dashboard/sidebar.php @@ -23,7 +23,7 @@ trait Sidebar $actions->addLink( _('Datei hinzufügen'), $this->url_for('file/choose_destination/upload'), - \Icon::create('add', 'clickable'), + \Icon::create('add'), ['data-dialog' => 'size=auto'] ); diff --git a/app/controllers/help_content.php b/app/controllers/help_content.php index c2025f1512501ba80f1c35d6a0786ce1c2cd9db3..e794a2e21251f02210553388f6c69182a1327352 100644 --- a/app/controllers/help_content.php +++ b/app/controllers/help_content.php @@ -289,7 +289,8 @@ class HelpContentController extends AuthenticatedController $widget->addLink( _('Hilfe-Text erstellen'), $this->url_for('help_content/add'), - Icon::create('add', 'clickable'), ['data-dialog' => 'size=auto;reload-on-close', 'target' => '_blank'] + Icon::create('add'), + ['data-dialog' => 'size=auto;reload-on-close', 'target' => '_blank'] ); $sidebar->addWidget($widget); $search = new SearchWidget('?apply_help_content_filter=1'); diff --git a/app/controllers/institute/files.php b/app/controllers/institute/files.php index afcd0fd859a29e13fa0e3f9956e22447ed4367ee..ca46dc8973918a964f965e730aca37fbd2a23108 100644 --- a/app/controllers/institute/files.php +++ b/app/controllers/institute/files.php @@ -56,9 +56,8 @@ class Institute_FilesController extends AuthenticatedController $actions->addLink( _("Ordner bearbeiten"), $this->url_for("file/edit_folder/".$this->topFolder->getId()), - Icon::create("edit", "clickable"), - ['data-dialog' => 1] - ); + Icon::create('edit') + )->asDialog(); } if ($this->topFolder && $this->topFolder->isSubfolderAllowed($GLOBALS['user']->id)) { @@ -67,14 +66,14 @@ class Institute_FilesController extends AuthenticatedController URLHelper::getUrl( 'dispatch.php/file/new_folder/' . $this->topFolder ->getId() ), - Icon::create('folder-empty', 'clickable') + Icon::create('folder-empty') )->asDialog(); } if ($this->topFolder && $this->topFolder->isWritable($GLOBALS['user']->id)) { $actions->addLink( _('Dokument hinzufügen'), '#', - Icon::create('add', 'clickable'), + Icon::create('add'), ['onclick' => "STUDIP.Files.openAddFilesWindow(); return false;"] ); } diff --git a/app/controllers/institute/members.php b/app/controllers/institute/members.php index d5d991df78e98dee80a05bab953ed15a88effde6..d70fdc1a1e5f91437d3cdc81b7ef7350eb58457e 100644 --- a/app/controllers/institute/members.php +++ b/app/controllers/institute/members.php @@ -605,9 +605,8 @@ class Institute_MembersController extends AuthenticatedController $actions->addLink( _('Stud.IP Rundmail'), $this->url_for('messages/write', ['inst_id' => $this->institute->id, 'emailrequest' => 1]), - Icon::create('mail', 'clickable'), - ['data-dialog' => 'size=50%'] - ); + Icon::create('mail') + )->asDialog('size=50%'); } $sidebar->addWidget($actions); diff --git a/app/controllers/messages.php b/app/controllers/messages.php index 451801e8369930ba9a2df985c5f8e4f831cd7b45..65a5cea74fab00998e770210996d32d37d63e9ec 100644 --- a/app/controllers/messages.php +++ b/app/controllers/messages.php @@ -956,7 +956,7 @@ class MessagesController extends AuthenticatedController { $actions->addLink( _('Alle als gelesen markieren'), $this->url_for('messages/overview', ['read_all' => 1]), - Icon::create('accept', 'clickable') + Icon::create('accept') ); } diff --git a/app/controllers/my_ilias_accounts.php b/app/controllers/my_ilias_accounts.php index fc4c00d82940f784dbc427310be8b261612e33c9..b82ec7d88ec62e15afb222cd984cb22092279933 100644 --- a/app/controllers/my_ilias_accounts.php +++ b/app/controllers/my_ilias_accounts.php @@ -63,7 +63,7 @@ class MyIliasAccountsController extends AuthenticatedController $widget->addLink( sprintf(_('Zur %s-Startseite'), $ilias->getName()), $this->url_for('my_ilias_accounts/redirect/'.$ilias_list_index.'/login'), - Icon::create('link-extern', 'clickable'), + Icon::create('link-extern'), ['target' => '_blank', 'rel' => 'noopener noreferrer'] ); } diff --git a/app/controllers/oer/admin.php b/app/controllers/oer/admin.php index 11b8266b759ff980427f2c684e5a8506d0dc69ed..c39455651d8bfe4de3bdf58e627e26d7c5b8388f 100644 --- a/app/controllers/oer/admin.php +++ b/app/controllers/oer/admin.php @@ -129,7 +129,7 @@ class Oer_AdminController extends AuthenticatedController } $this->render_text(( - Icon::create("checkbox-".(Request::int("active") ? "" : "un")."checked")->asImg(20) + Icon::create("checkbox-".(Request::int("active") ? "" : "un")."checked")->asImg() )); } @@ -144,7 +144,7 @@ class Oer_AdminController extends AuthenticatedController } $this->render_text(( - Icon::create("checkbox-".(Request::int("active") ? "" : "un")."checked")->asImg(20) + Icon::create("checkbox-".(Request::int("active") ? "" : "un")."checked")->asImg() )); } diff --git a/app/controllers/privacy.php b/app/controllers/privacy.php index d50b1f1bd1d89f0b38e50366df33c57e140582b3..049aea6321e2769129e64e29fd10e075cc6846d7 100644 --- a/app/controllers/privacy.php +++ b/app/controllers/privacy.php @@ -39,28 +39,28 @@ class PrivacyController extends AuthenticatedController $actions->addLink( _('Anzeige Personendaten'), $this->url_for("privacy/landing/{$user_id}"), - Icon::create('log', Icon::ROLE_CLICKABLE, tooltip2(_('Anzeige Personendaten'))) + Icon::create('log', attributes: tooltip2(_('Anzeige Personendaten'))) )->asDialog('size=medium'); $actions->addLink( _('Personendaten drucken'), $this->url_for('privacy/print/' . $user_id), - Icon::create('print', Icon::ROLE_CLICKABLE, tooltip2(_('Personendaten drucken'))), + Icon::create('print', attributes: tooltip2(_('Personendaten drucken'))), ['class' => 'print_action', 'target' => '_blank'] ); $actions->addLink( _('Export Personendaten als CSV'), $this->url_for("privacy/export/{$user_id}"), - Icon::create('file-text', Icon::ROLE_CLICKABLE, tooltip2(_('Export Personendaten als CSV'))) + Icon::create('file-text', attributes: tooltip2(_('Export Personendaten als CSV'))) ); $actions->addLink( _('Export persönlicher Dateien als XML'), $this->url_for("privacy/xml/{$user_id}"), - Icon::create('file-text', Icon::ROLE_CLICKABLE, tooltip2(_('Export Personendaten als XML'))) + Icon::create('file-text', attributes: tooltip2(_('Export Personendaten als XML'))) ); $actions->addLink( _('Export persönlicher Dateien als ZIP'), $this->url_for("privacy/filesexport/{$user_id}"), - Icon::create('file-archive', Icon::ROLE_CLICKABLE, tooltip2(_('Export persönlicher Dateien als ZIP'))) + Icon::create('file-archive', attributes: tooltip2(_('Export persönlicher Dateien als ZIP'))) ); @@ -68,14 +68,14 @@ class PrivacyController extends AuthenticatedController $exports->addLink( _('Export angezeigter Dateien als XML'), $this->url_for("privacy/xml/{$user_id}" . ($section ? "/{$section}" : '')), - Icon::create('file-text', Icon::ROLE_CLICKABLE, tooltip2(_('Export angezeigter Daten als XML'))) + Icon::create('file-text', attributes: tooltip2(_('Export angezeigter Daten als XML'))) ); foreach ($this->plugin_data as $label => $tabledata) { $exports->addLink( htmlReady($label) . ' ' . _('CSV'), $this->url_for("privacy/export2csv/{$tabledata['table_name']}/{$user_id}"), - Icon::create('file-text', Icon::ROLE_CLICKABLE, tooltip2(htmlReady($label) . ' CSV')) + Icon::create('file-text', attributes: tooltip2(htmlReady($label) . ' CSV')) ); } } @@ -102,23 +102,23 @@ class PrivacyController extends AuthenticatedController $actions->addLink( _('Personendaten drucken'), $this->url_for("privacy/print/{$user_id}"), - Icon::create('print', Icon::ROLE_CLICKABLE, tooltip2(_('Personendaten drucken'))), + Icon::create('print', attributes: tooltip2(_('Personendaten drucken'))), ['class' => 'print_action', 'target' => '_blank'] ); $actions->addLink( _('Export Personendaten als CSV'), $this->url_for("privacy/export/{$user_id}"), - Icon::create('file-text', Icon::ROLE_CLICKABLE, tooltip2(_('Export Personendaten als CSV'))) + Icon::create('file-text', attributes: tooltip2(_('Export Personendaten als CSV'))) ); $actions->addLink( _('Export persönlicher Dateien als XML'), $this->url_for("privacy/xml/{$user_id}"), - Icon::create('file-text', Icon::ROLE_CLICKABLE, tooltip2(_('Export Personendaten als XML'))) + Icon::create('file-text', attributes: tooltip2(_('Export Personendaten als XML'))) ); $actions->addLink( _('Export persönlicher Dateien als ZIP'), $this->url_for("privacy/filesexport/{$user_id}"), - Icon::create('file-archive', Icon::ROLE_CLICKABLE, tooltip2(_('Export persönlicher Dateien als ZIP'))) + Icon::create('file-archive', attributes: tooltip2(_('Export persönlicher Dateien als ZIP'))) ); } diff --git a/app/controllers/profile.php b/app/controllers/profile.php index 1412c9cd591a8ad852199bc97d20c49e40f4e63b..b00c2b24a4bafbae6eac77550a4c73bd56717a9b 100644 --- a/app/controllers/profile.php +++ b/app/controllers/profile.php @@ -284,7 +284,7 @@ class ProfileController extends AuthenticatedController $actions->addLink( _('Dieses Konto bearbeiten'), $this->url_for('admin/user/edit/' . $this->current_user->user_id), - Icon::create('edit', Icon::ROLE_CLICKABLE, tooltip2(_('Dieses Konto bearbeiten'))) + Icon::create('edit', attributes: tooltip2(_('Dieses Konto bearbeiten'))) ); } @@ -292,14 +292,14 @@ class ProfileController extends AuthenticatedController $actions->addLink( _('Zu den Kontakten hinzufügen'), $this->url_for('profile/add_buddy?username=' . $this->current_user->username), - Icon::create('add', Icon::ROLE_CLICKABLE, tooltip2(_('Zu den Kontakten hinzufügen'))), + Icon::create('add', attributes: tooltip2(_('Zu den Kontakten hinzufügen'))), ['data-confirm' => _('Wollen Sie die Person wirklich als Kontakt hinzufügen?')] )->asButton(); } else { $actions->addLink( _('Von den Kontakten entfernen'), $this->url_for('profile/remove_buddy', ['username' => $this->current_user->username]), - Icon::create('trash', Icon::ROLE_CLICKABLE, tooltip2(_('Zu den Kontakten hinzufügen'))), + Icon::create('trash', attributes: tooltip2(_('Zu den Kontakten hinzufügen'))), ['data-confirm' => _('Wollen Sie die Person wirklich von den Kontakten entfernen?')] )->asButton(); } @@ -307,7 +307,7 @@ class ProfileController extends AuthenticatedController $actions->addLink( _('Nachricht schreiben'), $this->url_for('messages/write', ['rec_uname' => $this->current_user->username]), - Icon::create('mail', Icon::ROLE_CLICKABLE, tooltip2(_('Nachricht an Nutzer verschicken'))) + Icon::create('mail', attributes: tooltip2(_('Nachricht an Nutzer verschicken'))) )->asDialog('size="50%"'); if (class_exists('Blubber')) { @@ -323,7 +323,7 @@ class ProfileController extends AuthenticatedController $actions->addLink( _('vCard herunterladen'), $this->url_for('contact/vcard', ['user[]' => $this->current_user->username]), - Icon::create('vcard', Icon::ROLE_CLICKABLE, tooltip2(_('vCard herunterladen'))) + Icon::create('vcard', attributes: tooltip2(_('vCard herunterladen'))) ); $sidebar->addWidget($actions); diff --git a/app/controllers/public_courses.php b/app/controllers/public_courses.php index 8af481926e59ae0b201b7290a7f4a86feec99678..3ab51258e18b7aa4229d641af92adade317ddfbb 100644 --- a/app/controllers/public_courses.php +++ b/app/controllers/public_courses.php @@ -116,7 +116,7 @@ class PublicCoursesController extends AuthenticatedController while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { if (isset($seminars[$row['range_id']]['navigations']['CoreDocuments'])) { $nav = new Navigation('files', 'dispatch.php/course/files/index'); - $nav->setImage(Icon::create('files', Icon::ROLE_CLICKABLE, ["title" => sprintf(_('%s Dokumente'), $row['count'])])); + $nav->setImage(Icon::create('files', attributes: ['title' => sprintf(_('%s Dokumente'), $row['count'])])); $seminars[$row['range_id']]['navigations']['CoreDocuments'] = $nav; } } @@ -133,7 +133,7 @@ class PublicCoursesController extends AuthenticatedController while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { if (isset($seminars[$row['range_id']]['navigations']['CoreOverview'])) { $nav = new Navigation('news', ''); - $nav->setImage(Icon::create('news', Icon::ROLE_CLICKABLE, ["title" => sprintf(_('%s Ankündigungen'),$row['count'])])); + $nav->setImage(Icon::create('news', attributes: ['title' => sprintf(_('%s Ankündigungen'), $row['count'])])); $seminars[$row['range_id']]['navigations']['CoreOverview'] = $nav; } } @@ -148,7 +148,7 @@ class PublicCoursesController extends AuthenticatedController while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { if (isset($seminars[$row['range_id']]['navigations']['CoreScm'])) { $nav = new Navigation('scm', 'dispatch.php/course/scm'); - $nav->setImage(Icon::create('infopage', Icon::ROLE_CLICKABLE, ["title" => sprintf(_('%s Einträge'), $row['count'])])); + $nav->setImage(Icon::create('infopage', attributes: ['title' => sprintf(_('%s Einträge'), $row['count'])])); $seminars[$row['range_id']]['navigations']['CoreScm'] = $nav; } } @@ -163,7 +163,7 @@ class PublicCoursesController extends AuthenticatedController while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { if (isset($seminars[$row['range_id']]['navigations']['CoreSchedule'])) { $nav = new Navigation('schedule', 'dispatch.php/course/dates'); - $nav->setImage(Icon::create('schedule', Icon::ROLE_CLICKABLE, ["title" => sprintf(_('%s Termine'), $row['count'])])); + $nav->setImage(Icon::create('schedule', attributes: ['title' => sprintf(_('%s Termine'), $row['count'])])); $seminars[$row['range_id']]['navigations']['CoreSchedule'] = $nav; } } @@ -183,7 +183,7 @@ class PublicCoursesController extends AuthenticatedController 'wiki', URLHelper::getURL('dispatch.php/course/wiki/page', ['cid' => $row['range_id']]) ); - $nav->setImage(Icon::create('wiki', Icon::ROLE_CLICKABLE, ["title" => sprintf(_('%s WikiSeiten'), $row['count'])])); + $nav->setImage(Icon::create('wiki', attributes: ['title' => sprintf(_('%s WikiSeiten'), $row['count'])])); $seminars[$row['range_id']]['navigations']['CoreWiki'] = $nav; } } @@ -202,7 +202,7 @@ class PublicCoursesController extends AuthenticatedController while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { if (isset($seminars[$row['range_id']]['navigations']['vote'])) { $nav = new Navigation('vote', '#vote'); - $nav->setImage(Icon::create('vote', Icon::ROLE_CLICKABLE, ["title" => sprintf(_('%s Umfrage(n)'), $row['count'])])); + $nav->setImage(Icon::create('vote', attributes: ['title' => sprintf(_('%s Umfrage(n)'), $row['count'])])); $seminars[$row['range_id']]['navigations']['vote'] = $nav; } } diff --git a/app/controllers/settings/categories.php b/app/controllers/settings/categories.php index 6e8bbab8fc6f0f6947f8c62a8e9f3bd9fa416316..16a7d0531261b798ae085de4dc923ee09726d7ae 100644 --- a/app/controllers/settings/categories.php +++ b/app/controllers/settings/categories.php @@ -68,7 +68,7 @@ class Settings_CategoriesController extends Settings_SettingsController $actions->addLink( _('Neue Kategorie anlegen'), $this->url_for('settings/categories/create'), - Icon::create('add', 'clickable') + Icon::create('add') ); $sidebar->addWidget($actions); } diff --git a/app/views/admin/autoinsert/index.php b/app/views/admin/autoinsert/index.php index 0d57d4739ca001399118f6819423ce9558f00624..a4a999e32bd4599e9bb271c5473095ede2d1cc78 100644 --- a/app/views/admin/autoinsert/index.php +++ b/app/views/admin/autoinsert/index.php @@ -93,11 +93,10 @@ <?= $this->render_partial("admin/autoinsert/_status.php", ['status' => 'autor', 'auto_sem' => $auto_sem, 'domains' => $userdomains]) ?> <td class="actions"> <a href="<?= $controller->delete($auto_sem['seminar_id'] ) ?>"> - <?= Icon::create( - 'trash', - Icon::ROLE_CLICKABLE, - ['title' => _('Veranstaltung entfernen'), 'class' => 'text-top'] - ) ?> + <?= Icon::create('trash')->asImg([ + 'title' => _('Veranstaltung entfernen'), + 'class' => 'text-top', + ]) ?> </a> </td> </tr> diff --git a/app/views/admin/autoinsert/manual.php b/app/views/admin/autoinsert/manual.php index a4f5f5ef0199bb0aab5960d566f692553bf5edcd..b739967e9925432aced435f57e0b1a7d7e0c3056 100644 --- a/app/views/admin/autoinsert/manual.php +++ b/app/views/admin/autoinsert/manual.php @@ -77,11 +77,12 @@ <? endif ?> <? endforeach; ?> </select> - <?= Icon::create( - 'add', - Icon::ROLE_CLICKABLE, - ['title' => _('Filter hinzufügen')] - )->asInput(["type" => "image", "class" => "middle", "name" => "add_filter"]) ?> + <?= Icon::create('add')->asInput([ + 'title' => _('Filter hinzufügen'), + 'type' => 'image', + 'class' => 'middle', + 'name' => 'add_filter', + ]) ?> </td> </tr> <? endif ?> @@ -103,11 +104,12 @@ <? endif ?> <td colspan="<?= $index % 2 ? 1 : 2 ?>"> <label for="<?= $type ?>"><b><?= $available_filtertypes[$type] ?></b></label> - <?= Icon::create( - 'remove', - Icon::ROLE_CLICKABLE, - ['title' => _('Filter entfernen')] - )->asInput(["type" => "image", "class" => "middle", "name" => "remove_filter[" . $type . "]"]) ?> + <?= Icon::create('remove')->asInput([ + 'title' => _('Filter entfernen'), + 'type' => 'image', + 'class' => 'middle', + 'name' => "remove_filter[{$type}]", + ]) ?> <br> <select name="filter[<?= $type ?>][]" multiple size="5" class="nested-select"> @@ -157,11 +159,12 @@ <tr> <td colspan="3"> <?= Studip\Button::create(_('Eintragen'), 'submit') ?> - <?= Icon::create( - 'question-circle', - Icon::ROLE_CLICKABLE, - ['title' => _('Vorschau')] - )->asInput(["type" => "image", "style" => "vertical-align: middle;", "name" => "preview"]) ?> + <?= Icon::create('question-circle')->asInput([ + 'title' => _('Vorschau'), + 'type' => 'image', + 'style' => 'vertical-align: middle;', + 'name' => 'preview' + ]) ?> </td> </tr> </tfoot> diff --git a/app/views/admin/course_wizard_steps/index.php b/app/views/admin/course_wizard_steps/index.php index 5e7b869d0b29ccf9478d60957742d010508bcded..b951e218ffaff23327ae9db7a2dc6dcca112db3a 100644 --- a/app/views/admin/course_wizard_steps/index.php +++ b/app/views/admin/course_wizard_steps/index.php @@ -58,16 +58,17 @@ ) ?> <? $actionMenu->addButton( - 'delete_step', - _('Schritt löschen'), - Icon::create('trash', Icon::ROLE_CLICKABLE, [ - 'title' => _('Schritt löschen'), - 'formaction' => $controller->url_for("admin/coursewizardsteps/delete/{$step->id}"), - 'data-confirm' => sprintf( - _('Soll der Eintrag "%s" wirklich gelöscht werden?'), - $step->name - ), - ]) + 'delete_step', + _('Schritt löschen'), + Icon::create('trash'), + [ + 'title' => _('Schritt löschen'), + 'formaction' => $controller->url_for("admin/coursewizardsteps/delete/{$step->id}"), + 'data-confirm' => sprintf( + _('Soll der Eintrag "%s" wirklich gelöscht werden?'), + $step->name + ), + ] ) ?> <?= $actionMenu->render() ?> </td> diff --git a/app/views/admin/holidays/index.php b/app/views/admin/holidays/index.php index 7c4446a99fbafe1e4fbb2a7c1ba4f4cd6f0b3809..98aa72e34f9a9c266e840f00906db161726ad2a0 100644 --- a/app/views/admin/holidays/index.php +++ b/app/views/admin/holidays/index.php @@ -58,9 +58,10 @@ </td> <td class="actions"> <a data-dialog="size=auto" href="<?= $controller->url_for('admin/holidays/edit/' . $holiday->id) ?>"> - <?= Icon::create('edit', 'clickable', ['title' => _('Ferienangaben bearbeiten')])->asImg() ?> + <?= Icon::create('edit')->asImg(['title' => _('Ferienangaben bearbeiten')]) ?> </a> - <?= Icon::create('trash', 'clickable', ['title' => _('Ferien löschen')])->asInput([ + <?= Icon::create('trash')->asInput([ + 'title' => _('Ferien löschen'), 'formaction' => $controller->url_for('admin/holidays/delete/' . $holiday->id), 'data-confirm' => _('Sollen die Ferien wirklich gelöscht werden?'), 'class' => 'text-bottom', diff --git a/app/views/admin/ilias_interface/edit_server.php b/app/views/admin/ilias_interface/edit_server.php index 415e6522e32c6b8b84689cca40fa857344a68daf..7e72d4ccebc6288ca42d3a0a7a2e4d383aef20ab 100644 --- a/app/views/admin/ilias_interface/edit_server.php +++ b/app/views/admin/ilias_interface/edit_server.php @@ -74,7 +74,7 @@ <?=$ldap_options;?> </select><br> <?=_("Authentifizierungsplugin (nur LDAP/Shibboleth) beim Anlegen von externen Accounts übernehmen.");?> - <?=Icon::create('info-circle', 'inactive', ['title' => _("Wählen Sie hier ein Authentifizierungsplugin, damit neu angelegte ILIAS-Accounts den entsprechenden Authentifizierungsmodus erhalten, wenn dieser Modus auch für den vorhandenen Stud.IP-Account gilt. Andernfalls erhalten alle ILIAS-Accounts den default-Modus")])->asImg(16);?> + <?=Icon::create('info-circle', Icon::ROLE_INACTIVE)->asImg(['title' => _("Wählen Sie hier ein Authentifizierungsplugin, damit neu angelegte ILIAS-Accounts den entsprechenden Authentifizierungsmodus erhalten, wenn dieser Modus auch für den vorhandenen Stud.IP-Account gilt. Andernfalls erhalten alle ILIAS-Accounts den default-Modus")]);?> <? else : ?> <br><?=_("(Um diese Einstellung zu nutzen muss zumindest ein Authentifizierungsplugin aktiviert sein.)");?> <input type="hidden" name="ilias_ldap_enable" value=""> diff --git a/app/views/admin/ilias_interface/index.php b/app/views/admin/ilias_interface/index.php index d786a97c3e1c1ccdd855757d9258b2bdbb64747b..b917323636baee86f902ff27e3c43bdbf8476d97 100644 --- a/app/views/admin/ilias_interface/index.php +++ b/app/views/admin/ilias_interface/index.php @@ -44,7 +44,7 @@ } ?> <a href="<?= $controller->url_for('admin/ilias_interface/'.$cmd.'/'.$ilias_index) ?>"> - <?= Icon::create($img, 'clickable', ['title' => $text])->asImg() ?> + <?= Icon::create($img)->asImg(['title' => $text]) ?> </a> </td> <td><?= htmlReady($ilias_config['name']) ?></td> @@ -74,14 +74,15 @@ <? $actionMenu->addButton( 'delete_config', _('Konfiguration löschen'), - Icon::create('trash', Icon::ROLE_CLICKABLE, [ + Icon::create('trash'), + [ 'title' => _('Konfiguration löschen'), 'formaction' => $controller->url_for("admin/ilias_interface/delete/$ilias_index"), 'data-confirm' => sprintf( _('Soll die ILIAS-Installation "%s" wirklich entfernt werden?'), $ilias_config['name'] ), - ]) + ] ) ?> <?= $actionMenu->render() ?> </td> diff --git a/app/views/admin/licenses/index.php b/app/views/admin/licenses/index.php index 9f13a6e99987469f60810303afbd0bc9a23bf17c..e72536a5abb267085be54db15ea4642669084364 100644 --- a/app/views/admin/licenses/index.php +++ b/app/views/admin/licenses/index.php @@ -34,13 +34,13 @@ </td> <td class="actions"> <a href="<?= $controller->link_for("admin/licenses/edit", ['identifier' => $license['identifier']]) ?>" data-dialog> - <?= Icon::create("edit")->asImg(20, ['class' => "text-bottom"]) ?> + <?= Icon::create('edit')->asImg(['class' => "text-bottom"]) ?> </a> <form action="<?= $controller->link_for("admin/licenses/delete", ['identifier' => $license->getId()]) ?>" method="post" data-confirm="<?= _("Wirklich löschen?") ?>" class="inline"> - <?= Icon::create("trash")->asInput(20) ?> + <?= Icon::create('trash')->asInput() ?> </form> </td> </tr> @@ -54,7 +54,6 @@ $actions = new ActionsWidget(); $actions->addLink( _("Lizenz erzeugen"), $controller->url_for("admin/licenses/edit"), - Icon::create("add", "clickable"), - ['data-dialog' => 1] -); + Icon::create('add') +)->asDialog(); Sidebar::Get()->addWidget($actions); diff --git a/app/views/admin/lockrules/index.php b/app/views/admin/lockrules/index.php index ee776d0df882a4ea0311a3e3fcf00fa37e123758..1214d83b0bd140ef4987a896a40429aa94f4982c 100644 --- a/app/views/admin/lockrules/index.php +++ b/app/views/admin/lockrules/index.php @@ -43,7 +43,7 @@ </td> <td class="actions"> <a href="<?= $controller->url_for('admin/lockrules/edit/' . $rule->lock_id) ?>"> - <?= Icon::create('edit', Icon::ROLE_CLICKABLE, ['title' => _('Diese Regel bearbeiten')])->asImg() ?> + <?= Icon::create('edit')->asImg(['title' => _('Diese Regel bearbeiten')]) ?> </a> <? @@ -53,10 +53,12 @@ <? else : ?> <? $msg = sprintf(_('Möchten Sie die Ebene %s löschen?'), $rule->name) ?> <? endif ?> - <?= Icon::create('trash', Icon::ROLE_CLICKABLE, [ - 'title' => _('Diese Regel löschen'), - 'style' => 'vertical-align: middle' - ])->asInput(['data-confirm'=>$msg,'formaction'=>$controller->url_for('admin/lockrules/delete/'.$rule->lock_id)]) ?> + <?= Icon::create('trash')->asInput([ + 'title' => _('Diese Regel löschen'), + 'style' => 'vertical-align: middle', + 'data-confirm' => $msg, + 'formaction' => $controller->url_for('admin/lockrules/delete/'.$rule->lock_id) + ]) ?> </td> </tr> <? endforeach; ?> diff --git a/app/views/admin/login_style/index.php b/app/views/admin/login_style/index.php index 24c0b703f08f8b8387aee1e6c00973e82d3b88f2..e131784e084c266de92a406f26750f523039be2c 100644 --- a/app/views/admin/login_style/index.php +++ b/app/views/admin/login_style/index.php @@ -41,34 +41,32 @@ </td> <td> <?= Icon::create('computer', $pic->desktop ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asInput( - 32, + Icon::SIZE_LARGE, [ 'title' => $pic->mobile ? _('Bild nicht mehr für die Mobilansicht verwenden') : _('Bild für die Mobilansicht verwenden'), 'formaction' => $controller->activationURL($pic->id, 'desktop', (int) !$pic->desktop) ] - )?> + ) ?> <?= Icon::create('cellphone', $pic->mobile ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asInput( - 32, + Icon::SIZE_LARGE, [ 'title' => $pic->mobile ? _('Bild nicht mehr für die Mobilansicht verwenden') : _('Bild für die Mobilansicht verwenden'), 'formaction' => $controller->activationURL($pic->id, 'mobile', (int) !$pic->mobile) ] - )?> + ) ?> </td> <td class="actions"> <? if (!$pic->in_release): ?> - <?= Icon::create('trash')->asInput( - [ - 'title' => _('Bild löschen'), - 'data-confirm' => _('Soll das Bild wirklich gelöscht werden?'), - 'formaction' => $controller->delete_picURL($pic->id) - ] - )?> + <?= Icon::create('trash')->asInput([ + 'title' => _('Bild löschen'), + 'data-confirm' => _('Soll das Bild wirklich gelöscht werden?'), + 'formaction' => $controller->delete_picURL($pic->id), + ]) ?> <? endif ?> </td> </tr> diff --git a/app/views/admin/plugin/index.php b/app/views/admin/plugin/index.php index d24cfc9001482e7f08edd3f7471b63b92dda1a53..fb56d15e2b3d643f564b1f28213dd98e5beb3a40 100644 --- a/app/views/admin/plugin/index.php +++ b/app/views/admin/plugin/index.php @@ -101,15 +101,19 @@ use Studip\Button, Studip\LinkButton; <? $actionMenu->addLink( $controller->url_for('admin/role/assign_plugin_role/' . $pluginid), _('Zugriffsrechte bearbeiten'), - Icon::create('edit', 'clickable', ['title' => _('Zugriffsrechte bearbeiten')]) + Icon::create('edit'), + ['title' => _('Zugriffsrechte bearbeiten')] ) ?> <? if (in_array('StudipModule', $plugin['type'])) { $actionMenu->addLink( $controller->url_for('admin/plugin/edit_description/' . $pluginid), _('Beschreibung und Hervorhebung'), - Icon::create('infopage', Icon::ROLE_CLICKABLE, ['title' => _('Beschreibung und Hervorhebung')]), - ['data-dialog' => 'size=big'] + Icon::create('infopage'), + [ + 'data-dialog' => 'size=big', + 'title' => _('Beschreibung und Hervorhebung'), + ] ); } ?> @@ -118,24 +122,27 @@ use Studip\Button, Studip\LinkButton; <? $actionMenu->addLink( $controller->url_for('admin/plugin/edit_automaticupdate/' . $pluginid), $plugin['automatic_update_url'] ? _('Automatisches Update verwalten (eingerichtet)') : _('Automatisches Update verwalten'), - Icon::create('install', $plugin['automatic_update_url'] ? 'attention' : 'clickable', [ + Icon::create('install', $plugin['automatic_update_url'] ? Icon::ROLE_ATTENTION : Icon::ROLE_CLICKABLE), + [ 'title' => $plugin['automatic_update_url'] ? _('Automatisches Update verwalten (eingerichtet)') - : _('Automatisches Update verwalten') - ]), - ['data-dialog' => 'size=auto;reload-on-close'] + : _('Automatisches Update verwalten'), + 'data-dialog' => 'size=auto;reload-on-close' + ] ) ?> <? $actionMenu->addLink( $controller->url_for('admin/plugin/download/' . $pluginid), _('Herunterladen'), - Icon::create('download', 'clickable', ['title' => _('Herunterladen')]) + Icon::create('download'), + ['title' => _('Herunterladen')] ) ?> <? endif ?> <? if (!$plugin['depends'] && !$plugin['core']): ?> <? $actionMenu->addLink( $controller->url_for('admin/plugin/ask_delete/' . $pluginid), _('Deinstallieren'), - Icon::create('trash', 'clickable', ['title' => _('Deinstallieren')]) + Icon::create('trash'), + ['title' => _('Deinstallieren')] ) ?> <? endif ?> <?= $actionMenu->render() ?> diff --git a/app/views/admin/role/assign_role.php b/app/views/admin/role/assign_role.php index 67c8b1e60421ca4a8d677418d3bf8f226b02dc4b..8215f4197062cf4ec3fb0f3102a61334f37a954a 100644 --- a/app/views/admin/role/assign_role.php +++ b/app/views/admin/role/assign_role.php @@ -133,7 +133,7 @@ use Studip\Button, Studip\LinkButton; </td> <td class="actions"> <a href="<?= $controller->action_link('assign_role_institutes/' . $assignedrole->getRoleid() . '/' . $currentuser->id) ?>" data-dialog="size=auto;reload-on-close"> - <?= Icon::create('edit', 'clickable')->asImg(['title' => _('Einrichtungszuordnung bearbeiten')]) ?> + <?= Icon::create('edit')->asImg(['title' => _('Einrichtungszuordnung bearbeiten')]) ?> </a> </td> </tr> diff --git a/app/views/admin/role/show_role.php b/app/views/admin/role/show_role.php index 196f9bf20b6c2a8f3c0298c76397566a891f079c..00aa175c0912a6774e069f4addaa290d634d0f43 100644 --- a/app/views/admin/role/show_role.php +++ b/app/views/admin/role/show_role.php @@ -155,7 +155,7 @@ use Studip\Button; htmlReady($role->getRolename())) ?> <div class="actions"> <a href="<?= $controller->url_for('admin/role/add_plugin/' . $roleid) ?>" data-dialog="size=auto"> - <?= Icon::create('add', 'clickable') ?> + <?= Icon::create('add') ?> <?= _('Plugins hinzufügen') ?> </a> </div> @@ -203,10 +203,11 @@ use Studip\Button; </td> <td><?= implode(', ', $plugin['type']) ?></td> <td class="actions"> - <?= Icon::create('trash', 'clickable', ['title' => _('Rolle entziehen')]) - ->asInput([ - "data-confirm" => _('Soll diesem Plugin wirklich die Rolle entzogen werden?'), - "formaction" => $controller->url_for('admin/role/remove_plugin/'.$roleid.'/'.$plugin['id'])]) ?> + <?= Icon::create('trash')->asInput([ + 'title' => _('Rolle entziehen'), + 'data-confirm' => _('Soll diesem Plugin wirklich die Rolle entzogen werden?'), + 'formaction' => $controller->url_for('admin/role/remove_plugin/'.$roleid.'/'. $plugin['id']) + ]) ?> </td> </tr> <? endforeach; ?> @@ -217,7 +218,7 @@ use Studip\Button; <td colspan="6"> <?= _('Alle markierten Einträge') ?> <?= Studip\Button::create(_('Löschen'), 'delete', [ - 'data-confirm' => _('Sollen den markierten Plugins wirklich die Rolle entzogen werden?'), + 'data-confirm' => _('Sollen den markierten Plugins wirklich die Rolle entzogen werden?'), ]) ?> </td> </tr> diff --git a/app/views/admin/sem_classes/_sem_type.php b/app/views/admin/sem_classes/_sem_type.php index 2a5c53e98d8f41fd66681049aa4d02ecddbf0264..c61257b1d0ab7d993c7b902f7f2456e5c2d98147 100644 --- a/app/views/admin/sem_classes/_sem_type.php +++ b/app/views/admin/sem_classes/_sem_type.php @@ -2,7 +2,7 @@ /** * Copyright (c) 2012 Rasmus Fuhse <fuhse@data-quest.de> - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of @@ -27,8 +27,12 @@ $id = $sem_type['id']; </span> </span> (<?= sprintf(_("%s Veranstaltungen"), $number_of_seminars ?: _("keine")) ?>) - <a href="#" class="sem_type_edit" onClick="jQuery(this).closest('li').find('.name_container').children().toggle().find('input').focus(); return false;" title="<?= _("Veranstaltungstyp umbenennen") ?>"><?= Icon::create('edit', 'clickable')->asImg(['class' => "text-bottom"]) ?></a> + <a href="#" class="sem_type_edit" onClick="jQuery(this).closest('li').find('.name_container').children().toggle().find('input').focus(); return false;" title="<?= _("Veranstaltungstyp umbenennen") ?>"> + <?= Icon::create('edit')->asImg(['class' => "text-bottom"]) ?> + </a> <? if ($number_of_seminars == 0) : ?> - <a href="#" class="sem_type_delete" onClick="return false;" title="<?= _("Veranstaltungstyp löschen") ?>"><?= Icon::create('trash', 'clickable')->asImg(['class' => "text-bottom"]) ?></a> + <a href="#" class="sem_type_delete" onClick="return false;" title="<?= _("Veranstaltungstyp löschen") ?>"> + <?= Icon::create('trash')->asImg(['class' => "text-bottom"]) ?> + </a> <? endif ?> </li> diff --git a/app/views/admin/sem_classes/details.php b/app/views/admin/sem_classes/details.php index 530f553a51132e2b87d4a893c81053d4a78804ed..145bc4571b103df9c819a0bc6a529edf6c2815ca 100644 --- a/app/views/admin/sem_classes/details.php +++ b/app/views/admin/sem_classes/details.php @@ -25,7 +25,9 @@ <span><?= _("Name der Veranstaltungskategorie") ?></span> <div> <span class="name"><?= htmlReady($sem_class['name']) ?></span> - <a href="#" class="sem_class_edit" onClick="jQuery(this).closest('label').children().toggle().find('input:visible').focus(); return false;"><?= Icon::create('edit', 'clickable')->asImg(['class' => "text-bottom"]) ?></a> + <a href="#" class="sem_class_edit" onClick="jQuery(this).closest('label').children().toggle().find('input:visible').focus(); return false;"> + <?= Icon::create('edit')->asImg(['class' => 'text-bottom']) ?> + </a> </div> <div class="name_input" style="display: none;"> @@ -40,7 +42,7 @@ <div> <span class="description"><?= htmlReady($sem_class['description']) ?></span> <a href="#" class="sem_class_edit" onClick="jQuery(this).closest('label').children().toggle().find('input:visible').focus(); return false;"> - <?= Icon::create('edit', 'clickable')->asImg(['class' => 'text-bottom']) ?></a> + <?= Icon::create('edit')->asImg(['class' => 'text-bottom']) ?></a> </div> <div class="description_input" style="display: none;"> <input id="sem_class_description" type="text" value="<?= htmlReady($sem_class['description']) ?>" onBlur="jQuery(this).closest('label.sem_class_name').children().toggle().find('.description').text(this.value);" style="width: 80%;"> @@ -62,7 +64,10 @@ </div> <div style="margin-left: 21px;"> <a href="#" onClick="jQuery(this).closest('.add').children().toggle(); jQuery('#new_sem_type').focus(); return false;"> - <?= Icon::create('add', 'clickable')->asImg(['class' => "text-bottom", "title" => _("Veranstaltungstyp hinzufügen")]) ?> + <?= Icon::create('add')->asImg([ + 'class' => 'text-bottom', + 'title' => _('Veranstaltungstyp hinzufügen'), + ]) ?> </a> </div> </div> diff --git a/app/views/admin/sem_classes/overview.php b/app/views/admin/sem_classes/overview.php index 8cbb0fb460c19bf9dc2826c17fb11d7fa419188f..1369b0c2c7d99d614bf2f8732f14c3214e4344c7 100644 --- a/app/views/admin/sem_classes/overview.php +++ b/app/views/admin/sem_classes/overview.php @@ -32,7 +32,7 @@ <td><?= date("j.n.Y H:i", $sem_class['chdate']) ?> <?= _("Uhr") ?></td> <td class="actions"> <a href="<?= URLHelper::getLink("dispatch.php/admin/sem_classes/details", ['id' => $id]) ?>" title="<?= _("Editieren dieser Veranstaltungskategorie") ?>"> - <?= Icon::create('edit', 'clickable')->asImg(['class' => "text-bottom"]) ?> + <?= Icon::create('edit')->asImg(['class' => 'text-bottom']) ?> </a> </td> </tr> @@ -46,7 +46,7 @@ $links = new ActionsWidget(); $links->addLink( _('Neue Kategorie anlegen'), $controller->url_for('admin/sem_classes/add_sem_type'), - Icon::create('add', 'clickable'), + Icon::create('add'), [ 'onClick' => 'STUDIP.sem_classes.add(); return false;', 'data-dialog' => 'size=auto' diff --git a/app/views/admin/semester/index.php b/app/views/admin/semester/index.php index cb654a47568cd8fbc8f5a3bd9023da5f7323308c..40c5038dc62d3b9c82e9d2bc496d78d922f0f547 100644 --- a/app/views/admin/semester/index.php +++ b/app/views/admin/semester/index.php @@ -109,12 +109,13 @@ $actionMenu->addButton( 'unlock', _('Semester entsperren'), - Icon::create('lock-locked', Icon::ROLE_CLICKABLE, [ + Icon::create('lock-locked'), + [ 'title' => _('Semester entsperren'), 'formaction' => $controller->url_for("admin/semester/unlock/{$semester->id}"), 'data-confirm' => _('Soll das Semester wirklich entsperrt werden? Anmelderegeln und Sperrebenen werden nicht verändert.'), 'style' => 'vertical-align: text-bottom' - ]) + ] ); } @@ -135,12 +136,13 @@ $actionMenu->addButton( 'delete', _('Semester löschen'), - Icon::create('trash', Icon::ROLE_CLICKABLE, [ + Icon::create('trash'), + [ 'title' => _('Semester löschen'), 'formaction' => $controller->url_for("admin/semester/delete/{$semester->id}"), 'data-confirm' => _('Soll das Semester wirklich gelöscht werden?'), 'style' => 'vertical-align: text-bottom' - ]) + ] ); } diff --git a/app/views/admin/statusgroups/_members.php b/app/views/admin/statusgroups/_members.php index 4e64b9e19566a275a8c46696ce3c02e937e40b5f..b8febf3b53e4741f31cd942a34873a9f6c400317 100644 --- a/app/views/admin/statusgroups/_members.php +++ b/app/views/admin/statusgroups/_members.php @@ -13,14 +13,18 @@ <td><?= htmlReady($user->name()) ?></td> <td class="actions"> <? $actionMenu = ActionMenu::get()->setContext($user->user) ?> - <? $actionMenu->addLink($controller->url_for('settings/statusgruppen/', ['open' => $group->id, 'type' => 'role', 'username' => $user->user->username]), - _('Benutzer in dieser Rolle bearbeiten'), - Icon::create('edit', 'clickable')) ?> + <? $actionMenu->addLink( + $controller->url_for('settings/statusgruppen/', ['open' => $group->id, 'type' => 'role', 'username' => $user->user->username]), + _('Benutzer in dieser Rolle bearbeiten'), + Icon::create('edit') + ) ?> <? if ($tutor) : ?> - <? $actionMenu->addLink($controller->url_for('admin/statusgroups/delete/' . $group->id . '/' . $user->user_id), - _('Person aus Gruppe austragen'), - Icon::create('trash', 'clickable'), - ['data-dialog' => 'size=auto']) ?> + <? $actionMenu->addLink( + $controller->url_for('admin/statusgroups/delete/' . $group->id . '/' . $user->user_id), + _('Person aus Gruppe austragen'), + Icon::create('trash'), + ['data-dialog' => 'size=auto'] + ) ?> <? endif ?> <?= $actionMenu->render() ?> </td> diff --git a/app/views/admin/user/list_files.php b/app/views/admin/user/list_files.php index a351ec584059816517f421233a31c3c51a0e2fcb..0e7ed2b7b021652d7c78299e6e63afa1c8e54edb 100644 --- a/app/views/admin/user/list_files.php +++ b/app/views/admin/user/list_files.php @@ -24,7 +24,7 @@ <?= ActionMenu::get()->setContext($file->name)->addLink( $file->getDownloadURL(), _('Datei herunterladen'), - Icon::create('download', 'clickable') + Icon::create('download') )->render() ?> <? endif ?> </header> diff --git a/app/views/admin/webservice_access/index.php b/app/views/admin/webservice_access/index.php index 223e5c3509c46329c7a4a15fb915c0e5c2442a9c..86367aa5176d6d8639dded13324a042e7bbae6b6 100644 --- a/app/views/admin/webservice_access/index.php +++ b/app/views/admin/webservice_access/index.php @@ -48,8 +48,18 @@ </select> </td> <td> - <?= Icon::create('accept', 'accept', ['title' => _('Änderungen speichern')])->asInput(["type" => "image", "class" => "middle", "name" => "ok"]) ?> - <?= Icon::create('decline', 'attention', ['title' => _('Abbrechen')])->asInput(['type' => "image", 'class' => "middle", 'name' => "cancel"]) ?> + <?= Icon::create('accept', Icon::ROLE_ACCEPT)->asInput([ + 'title' => _('Änderungen speichern'), + 'type' => 'image', + 'class' => 'middle', + 'name' => 'ok', + ]) ?> + <?= Icon::create('decline', Icon::ROLE_ATTENTION)->asInput([ + 'title' => _('Abbrechen'), + 'type' => 'image', + 'class' => 'middle', + 'name' => 'cancel', + ]) ?> </td> <? else : ?> <td> @@ -66,10 +76,10 @@ </td> <td> <a href="<?= $controller->url_for('admin/webservice_access/edit/'.$rule->id.'#edit') ?>"> - <?= Icon::create('edit', 'clickable', ['title' => _('bearbeiten')])->asImg() ?> + <?= Icon::create('edit')->asImg(['title' => _('bearbeiten')]) ?> </a> <a href="<?= $controller->url_for('admin/webservice_access/delete/'.$rule->id) ?>"> - <?= Icon::create('trash', 'clickable', ['title' => _('löschen')])->asImg() ?> + <?= Icon::create('trash')->asImg(['title' => _('löschen')]) ?> </a> </td> <? endif;?> @@ -81,7 +91,15 @@ $sidebar = Sidebar::Get(); $actions = new ActionsWidget(); -$actions->addLink(_('Regeln testen'),$controller->url_for('admin/webservice_access/test'), Icon::create('unit-test', 'clickable')); -$actions->addLink(_('Neue Zugriffsregel anlegen'),$controller->url_for('admin/webservice_access/new'), Icon::create('add', 'clickable')); +$actions->addLink( + _('Regeln testen'), + $controller->url_for('admin/webservice_access/test'), + Icon::create('unit-test') +); +$actions->addLink( + _('Neue Zugriffsregel anlegen'), + $controller->url_for('admin/webservice_access/new'), + Icon::create('add') +); $sidebar->addWidget($actions); diff --git a/app/views/admin/webservice_access/test.php b/app/views/admin/webservice_access/test.php index 396f885fa697b0da1682c2a665d38f2e1e4b715d..0b05dce7463a2ab48aa6b46781b9c5dd94f81aa3 100644 --- a/app/views/admin/webservice_access/test.php +++ b/app/views/admin/webservice_access/test.php @@ -38,7 +38,15 @@ use Studip\Button, Studip\LinkButton; $sidebar = Sidebar::Get(); $actions = new ActionsWidget(); -$actions->addLink(_('Liste der Zugriffsregeln'),$controller->url_for('admin/webservice_access'), Icon::create('add', 'clickable')); -$actions->addLink(_('Neue Zugriffsregel anlegen'),$controller->url_for('admin/webservice_access/new'), Icon::create('add', 'clickable')); +$actions->addLink( + _('Liste der Zugriffsregeln'), + $controller->url_for('admin/webservice_access'), + Icon::create('add') +); +$actions->addLink( + _('Neue Zugriffsregel anlegen'), + $controller->url_for('admin/webservice_access/new'), + Icon::create('add') +); $sidebar->addWidget($actions); diff --git a/app/views/admission/courseset/index.php b/app/views/admission/courseset/index.php index b3a500948f1215fbbc270e27cd338e18c1986f2a..70033af988b552237c355fd02922450fdcc34dad 100644 --- a/app/views/admission/courseset/index.php +++ b/app/views/admission/courseset/index.php @@ -57,11 +57,11 @@ if ($coursesets) { </td> <td class="actions"> <a class="load-in-new-row" href="<?= $controller->link_for('', ['course_set_details' => $courseset->getId()]); ?>"> - <?= Icon::create('info', 'clickable', ['title' => _('Weitere Informationen einblenden')])->asImg() ?> + <?= Icon::create('info')->asImg(['title' => _('Weitere Informationen einblenden')]) ?> </a> <? if ($courseset->isUserAllowedToEdit($GLOBALS['user']->id)) : ?> <a href="<?= $controller->link_for('admission/courseset/copy/'.$courseset->getId()); ?>"> - <?= Icon::create('clipboard', 'clickable', ['title' => _('Anmeldeset kopieren')])->asImg(16, ["alt" => _('Anmeldeset kopieren')]); ?> + <?= Icon::create('clipboard')->asImg(['title' => _('Anmeldeset kopieren'), "alt" => _('Anmeldeset kopieren')]); ?> </a> <a href="<?= $controller->link_for('admission/courseset/configure/'.$courseset->getId()); ?>"> <?= Icon::create('edit')->asImg(['title' => _('Anmeldeset bearbeiten')]) ?> diff --git a/app/views/admission/rule/save.php b/app/views/admission/rule/save.php index 8448ec7f348adba17f5893a898b103fe70a53a1c..0f6e8d8b3c25eb212c8fa9ffe14e3fcedbc23531 100644 --- a/app/views/admission/rule/save.php +++ b/app/views/admission/rule/save.php @@ -13,9 +13,11 @@ <a href="#" onclick="return STUDIP.Admission.configureRule('<?= get_class($rule) ?>', '<?= $controller->url_for('admission/rule/configure', get_class($rule), $rule->getId()) ?>', '<?= $rule->getId() ?>')"> - <?= Icon::create('edit', 'clickable')->asImg(); ?></a> + <?= Icon::create('edit') ?> + </a> <a href="javascript:STUDIP.Admission.removeRule('rule_<?= $rule->getId() ?>', 'rules')" data-confirm="<?= _('Soll die Anmelderegel wirklich gelöscht werden?') ?>"> - <?= Icon::create('trash', 'clickable')->asImg(); ?></a> + <?= Icon::create('trash') ?> + </a> </div> </div> diff --git a/app/views/admission/rule/select_type.php b/app/views/admission/rule/select_type.php index 6ac53f519a6d461ba0e3bedbdbced9b7555ce3ee..1a72a7532498cfa66fd73d878b2d6b0bbf827acd 100644 --- a/app/views/admission/rule/select_type.php +++ b/app/views/admission/rule/select_type.php @@ -18,7 +18,7 @@ <label> <input <?=$disabled ?> type="radio" name="ruletype" value="<?= $className ?>"/> <span <?=($disabled ? 'style="text-decoration:line-through"' : '')?>><?=$classDetail['name'] ?></span> - <?= Icon::create('question-circle', 'clickable', ['title' => $classDetail['description']])->asImg() ?> + <?= Icon::create('question-circle')->asImg(['title' => $classDetail['description']]) ?> </label> </section> diff --git a/app/views/admission/userlist/configure.php b/app/views/admission/userlist/configure.php index 37367585967ff616e5be0988e9a7719a5442ad32..3f2e65821fbcad555678c34ac26111795df0f2f3 100644 --- a/app/views/admission/userlist/configure.php +++ b/app/views/admission/userlist/configure.php @@ -92,7 +92,7 @@ Helpbar::get()->addPlainText(_('Info'), "Stellen Sie hier ein, wie die Chancen b $userlist_id, $u->id) ?>" class="userlist-delete-user" data-confirm="<?= sprintf(_('Soll %s wirklich von der Liste entfernt werden?'), htmlReady($u->getFullName())) ?>"> - <?= Icon::create('trash', 'clickable') ?> + <?= Icon::create('trash') ?> </a> </td> </tr> diff --git a/app/views/blubber/compose.php b/app/views/blubber/compose.php index 3ea46c4d871bc83634b9ec843168a2bee803cc86..67ba6056cd764ecc392dc01e5b915f8c6a4e08ee 100644 --- a/app/views/blubber/compose.php +++ b/app/views/blubber/compose.php @@ -70,7 +70,7 @@ <?= Icon::create('search')->asImg(['class' => 'text-bottom']) ?> </a> <a href="" onClick="$('#blubber_contacts').val(null).trigger('change'); return false;"> - <?= Icon::create('decline',)->asImg(['class' => "text-bottom"]) ?> + <?= Icon::create('decline')->asImg(['class' => 'text-bottom']) ?> </a> </div> <? endif ?> @@ -113,10 +113,10 @@ ->fireJSFunctionOnSelect('STUDIP.Blubber.Composer.vue.addUser')->render() ?> <a href="" onClick="$('input[name=search_user_id_parameter]').trigger('focus'); return false;"> - <?= Icon::create('search')->asImg(['class' => "text-bottom"]) ?> + <?= Icon::create('search')->asImg(['class' => 'text-bottom']) ?> </a> <a href="" onClick="STUDIP.Blubber.Composer.vue.clearUsers(); return false;"> - <?= Icon::create('decline')->asImg(['class' => "text-bottom"]) ?> + <?= Icon::create('decline')->asImg(['class' => 'text-bottom']) ?> </a> </div> </div> diff --git a/app/views/blubber/private_to_studygroup.php b/app/views/blubber/private_to_studygroup.php index f6b584e9a8da06bb2be32a0a28dedbc8b66df8ce..5e04599ff509bbb7dda1d8756624765b771c53e3 100644 --- a/app/views/blubber/private_to_studygroup.php +++ b/app/views/blubber/private_to_studygroup.php @@ -5,7 +5,7 @@ <div style="display: flex; justify-content: center; align-items: center"> <?= Icon::create('blubber', Icon::ROLE_INFO)->asImg(50, ['style' => "margin-right: 50px;"]) ?> - <?= Icon::create('arr_2right', Icon::ROLE_INFO)->asImg(20, ['style' => "margin-right: 50px;"]) ?> + <?= Icon::create('arr_2right', Icon::ROLE_INFO)->asImg(['style' => "margin-right: 50px;"]) ?> <?= Icon::create('studygroup', Icon::ROLE_INFO)->asImg(50) ?> </div> diff --git a/app/views/calendar/contentbox/_termin.php b/app/views/calendar/contentbox/_termin.php index 3daf6992775d9133f667c5d4e42db38252647590..ddb95b752ba1ce2c0f2e44dbfec31455021dc4f3 100644 --- a/app/views/calendar/contentbox/_termin.php +++ b/app/views/calendar/contentbox/_termin.php @@ -51,7 +51,7 @@ <? if (count($themen)) : ?> <? foreach ($themen as $thema) : ?> <h3> - <?= Icon::create('topic', Icon::ROLE_INFO)->asImg(20, ['class' => "text-bottom"]) ?> + <?= Icon::create('topic', Icon::ROLE_INFO)->asImg(['class' => "text-bottom"]) ?> <?= htmlReady($thema['title']) ?> </h3> <div> diff --git a/app/views/calendar/contentbox/display.php b/app/views/calendar/contentbox/display.php index bd7b266173ac813b3b6274ca4dec8ae72a7a66b5..902df335315ea111bf5857850bac083c42aebed4 100644 --- a/app/views/calendar/contentbox/display.php +++ b/app/views/calendar/contentbox/display.php @@ -11,12 +11,12 @@ <a href="<?= URLHelper::getLink('dispatch.php/calendar/date/add') ?>" data-dialog="reload-on-close" title="<?= _('Neuen Termin anlegen') ?>" aria-label="<?= _('Neuen Termin anlegen') ?>"> - <?= Icon::create('add', 'clickable')->asImg(['class' => 'text-bottom']) ?> + <?= Icon::create('add')->asImg(['class' => 'text-bottom']) ?> </a> <? else: ?> <a href="<?= URLHelper::getLink("dispatch.php/course/timesrooms", ['cid' => $range_id]) ?>" title="<?= _('Neuen Termin anlegen') ?>" aria-label="<?= _('Neuen Termin anlegen') ?>"> - <?= Icon::create('admin', 'clickable')->asImg(['class' => 'text-bottom']) ?> + <?= Icon::create('admin')->asImg(['class' => 'text-bottom']) ?> </a> <? endif ?> <? endif ?> diff --git a/app/views/course/dates/_date_row-exdate.php b/app/views/course/dates/_date_row-exdate.php index bc9beabd2e7a70d56a45658ecec57b3ace8a7376..2a179ef529f073e7482d32952a54dcf75f91906f 100644 --- a/app/views/course/dates/_date_row-exdate.php +++ b/app/views/course/dates/_date_row-exdate.php @@ -1,6 +1,6 @@ <tr id="date_<?= $date->id ?>" class="ausfall" data-termin-id="<?= htmlReady($date->id) ?>"> <td data-sort-value="<?= htmlReady($date->date) ?>" class="date_name"> - <?= Icon::create('date', Icon::ROLE_INFO)->asImg(['class' => 'text-bottom']) ?> + <?= Icon::create('date', Icon::ROLE_INFO)->asImg(Icon::SIZE_INLINE, ['class' => 'text-bottom']) ?> <?= htmlReady($date->getFullName()) ?> <?= tooltipIcon($date->content) ?> <? if (count($date->dozenten) > 0): ?> diff --git a/app/views/course/dates/_date_row.php b/app/views/course/dates/_date_row.php index b10deac6273b87e4937ef3fa659e182646537094..3cad99b0a313b3272f9a32e798f869d87dfbf201 100644 --- a/app/views/course/dates/_date_row.php +++ b/app/views/course/dates/_date_row.php @@ -18,7 +18,7 @@ $dialog_url = $show_raumzeit <tr id="date_<?= $date->id ?>" <? if (!empty($is_next_date)) echo 'class="nextdate" title="' . _('Der nächste Termin') . '"'; ?> data-termin-id="<?= htmlReady($date->id) ?>"> <td data-sort-value="<?= htmlReady($date->date) ?>" class="date_name"> <a href="<?= $dialog_url ?>" data-dialog> - <?= Icon::create($icon)->asImg(['class' => 'text-bottom']) ?> + <?= Icon::create($icon)->asImg(Icon::SIZE_INLINE,['class' => 'text-bottom']) ?> <?= htmlReady($date->getFullName(CourseDate::FORMAT_VERBOSE)) ?> </a> <? if (count($date->dozenten) > 0): ?> diff --git a/app/views/course/dates/current_day_dates.php b/app/views/course/dates/current_day_dates.php index f7ca4b9bae5fd8c74a4b700b758f1d48c22b0249..a752558051c5585dfb0d21dc49cef9c66db62ef6 100644 --- a/app/views/course/dates/current_day_dates.php +++ b/app/views/course/dates/current_day_dates.php @@ -12,7 +12,7 @@ <? foreach ($dates as $date): ?> <tr> <td data-sort-value="<?= htmlReady($date->date) ?>" class="date_name"> - <?= Icon::create('date')->asImg(['class' => 'text-bottom']) ?> + <?= Icon::create('date')->asImg(Icon::SIZE_INLINE, ['class' => 'text-bottom']) ?> <?= htmlReady($date->getFullName(CourseDate::FORMAT_VERBOSE)) ?> </td> <td> diff --git a/app/views/course/dates/new_topic.php b/app/views/course/dates/new_topic.php index 1cc303d78ae13196d559dab0b2f35701223aee38..cf211916a57641232592529358bfbcad90b1beb2 100644 --- a/app/views/course/dates/new_topic.php +++ b/app/views/course/dates/new_topic.php @@ -38,7 +38,7 @@ <? foreach ($course->topics as $topic) : ?> <li> <a href="#" onClick="jQuery('#dates_add_topic .topic_title').val('<?= htmlReady($topic['title']) ?>'); jQuery('#dates_add_topic').submit(); return false;"> - <?= Icon::create('arr_2up', 'clickable')->asImg() ?> + <?= Icon::create('arr_2up') ?> <?= htmlReady($topic['title']) ?> </a> </li> diff --git a/app/views/course/feedback/index.php b/app/views/course/feedback/index.php index 87a2449fc867cee3d6071b324197a0a68f8a2fdc..10134d16806659a2a2459e528dec771124b9ec8e 100644 --- a/app/views/course/feedback/index.php +++ b/app/views/course/feedback/index.php @@ -103,13 +103,13 @@ $actionMenu->addLink( $controller->link_for('course/feedback/edit_form/' . $feedback->id), _('Bearbeiten'), - Icon::create('edit', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('edit'), ['data-dialog' => ''] ); $actionMenu->addLink( $controller->link_for('course/feedback/delete/' . $feedback->id), _('Löschen'), - Icon::create('trash', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('trash'), ['onclick' => "return STUDIP.Dialog.confirmAsPost('" . _('Feedback-Element und dazugehörige Einträge löschen?') . "', this.href);"] ); ?> diff --git a/app/views/course/forum/admin/childs.php b/app/views/course/forum/admin/childs.php index 3becc1f02b9c80b02cc6ef3a8a272d6497be4c8b..c3a8a6b6044e16c925da98b325365474e6e9b271 100644 --- a/app/views/course/forum/admin/childs.php +++ b/app/views/course/forum/admin/childs.php @@ -15,17 +15,17 @@ <? endif ?> <a href="javascript:STUDIP.Forum.cut('<?= $area['topic_id'] ?>');" data-role="cut"> - <?= Icon::create('export', 'clickable')->asImg() ?> + <?= Icon::create('export') ?> </a> <a href="javascript:STUDIP.Forum.cancelCut('<?= $area['topic_id'] ?>');" data-role="cancel_cut" style="display: none"> - <?= Icon::create('export', 'attention')->asImg() ?> + <?= Icon::create('export', Icon::ROLE_ATTENTION) ?> </a> <a href="javascript:STUDIP.Forum.paste('<?= $area['topic_id'] ?>');" data-role="paste" style="display: none"> - <?= Icon::create('arr_2left', 'sort')->asImg() ?> + <?= Icon::create('arr_2left', Icon::ROLE_SORT) ?> </a> </li> </ul> -<? endforeach ?> \ No newline at end of file +<? endforeach ?> diff --git a/app/views/course/forum/index/_breadcrumb.php b/app/views/course/forum/index/_breadcrumb.php index 0b3a9b4b51fcc10f55c29d22db2388b5a41fecb1..1627c9f04187619127dfa5b6e28ad9afc6df6b69 100644 --- a/app/views/course/forum/index/_breadcrumb.php +++ b/app/views/course/forum/index/_breadcrumb.php @@ -2,7 +2,7 @@ <div id="tutorBreadcrumb"> <? $path = ForumEntry::getPathToPosting($topic_id) ?> <a href="<?= $controller->link_for('course/forum/index') ?>" title="<?= _('Übersicht') ?>"> - <?= Icon::create('forum', 'clickable') ?> + <?= Icon::create('forum') ?> </a> <? foreach ($path as $path_part) : ?> diff --git a/app/views/course/forum/index/_favorite.php b/app/views/course/forum/index/_favorite.php index 63da1166a17382420746b14c889f06488b39a799..7325d83d07c0b0669ac15ff35c4b1a4742235ee7 100644 --- a/app/views/course/forum/index/_favorite.php +++ b/app/views/course/forum/index/_favorite.php @@ -3,10 +3,10 @@ <!-- set/unset favorite --> <? if (!$favorite) : ?> <a href="<?= $controller->link_for('course/forum/index/set_favorite/'. $topic_id) ?>" onClick="STUDIP.Forum.setFavorite('<?= $topic_id ?>');return false;"> - <?= Icon::create('staple', 'clickable', ['title' => _('Beitrag merken')])->asImg() ?> + <?= Icon::create('staple')->asImg(['title' => _('Beitrag merken')]) ?> </a> <? else : ?> <a href="<?= $controller->link_for('course/forum/index/unset_favorite/'. $topic_id) ?>" onClick="STUDIP.Forum.unsetFavorite('<?= $topic_id ?>');return false;"> - <?= Icon::create('staple', 'attention', ['title' => _('Beitrag nicht mehr merken')])->asImg() ?> + <?= Icon::create('staple', Icon::ROLE_ATTENTION)->asImg(['title' => _('Beitrag nicht mehr merken')]) ?> </a> <? endif ?> diff --git a/app/views/course/forum/index/_post.php b/app/views/course/forum/index/_post.php index 192a414ac76de2f56430c97b44e4593923ab816a..025cddf5645c1e38aa6edaebb6ea0d250f60e3b4 100644 --- a/app/views/course/forum/index/_post.php +++ b/app/views/course/forum/index/_post.php @@ -60,7 +60,7 @@ <? $parent_topic = ForumEntry::getConstraints(ForumEntry::getParentTopicId($post['topic_id'])) ?> <? if($constraint['closed']) : ?> - <?= Icon::create('lock-locked', 'info', ['title' => _('Dieses Thema wurde geschlossen. Sie können daher nicht auf diesen Beitrag antworten.')])->asImg(16) ?> + <?= Icon::create('lock-locked', 'info', ['title' => _('Dieses Thema wurde geschlossen. Sie können daher nicht auf diesen Beitrag antworten.')])->asImg() ?> <? endif ?> <span data-edit-topic="<?= $post['topic_id'] ?>"> @@ -252,7 +252,7 @@ <? if ($is_new): ?> <span class="new_posting"> - <?= Icon::create('forum', 'attention', ['title' => _("Dieser Beitrag ist seit Ihrem letzten Besuch hinzugekommen.")])->asImg(16) ?> + <?= Icon::create('forum', 'attention', ['title' => _("Dieser Beitrag ist seit Ihrem letzten Besuch hinzugekommen.")])->asImg() ?> </span> <? endif ?> </span> diff --git a/app/views/course/lvgselector/form.php b/app/views/course/lvgselector/form.php index a1ae506b64d6d41e3a1016222719f0f8db57ac35..31af08cac3a9892612a85403f1e4b8ed37983ea2 100644 --- a/app/views/course/lvgselector/form.php +++ b/app/views/course/lvgselector/form.php @@ -34,14 +34,14 @@ <h3><?=_("Suche:")?></h3> <input type="text" name="lvgruppe_selection[search_key]" value="<?= htmlReady($this->selection->getSearchKey()) ?>"> - <?= Icon::create('search', 'clickable')->asInput(false, ['name' => 'lvgruppe_selection[search_button]']); ?> + <?= Icon::create('search')->asInput(false, ['name' => 'lvgruppe_selection[search_button]']); ?> <? if ($selection->searched()) : ?> <a href="<?= URLHelper::getLink(isset($url) ? $url : '', ['lvgruppe_selection[rewind_button]' => 1, 'lvgruppe_selection[last_selected]' => $selected, 'lvgruppe_selection[showall]' => (int) $selection->getShowAll()]) ?>"> - <?= Icon::create('refresh', 'clickable', [])->asImg(); ?> + <?= Icon::create('refresh') ?> </a> <? if (!sizeof($selection->getSearchResult())) : ?> diff --git a/app/views/course/lvgselector/selected_entry.php b/app/views/course/lvgselector/selected_entry.php index b424e6ef537e365af3e52a241a07f731353a3286..678ea0c19de92a2644fc3279db021a31456af36e 100644 --- a/app/views/course/lvgselector/selected_entry.php +++ b/app/views/course/lvgselector/selected_entry.php @@ -8,7 +8,7 @@ $_id = htmlReady(implode('_', (array) $area->getId())); style="vertical-align: text-top;" type="image" name="lvgruppe_selection[remove][<?= $_id ?>]" - src="<?= Icon::create('trash', 'clickable')->asImagePath(); ?>"> + src="<?= Icon::create('trash')->asImagePath(); ?>"> <? endif; ?> <span class="lvgruppe_selection_expand"> <?= htmlReady($area->getDisplayName()) ?> @@ -17,7 +17,7 @@ $_id = htmlReady(implode('_', (array) $area->getId())); style="vertical-align: text-top;" type="image" name="lvgruppe_selection[details][<?= $_id ?>]" - src="<?= Icon::create('info', 'clickable')->asImagePath() ?>"> + src="<?= Icon::create('info')->asImagePath() ?>"> </span> <ul> <? if (Request::isXhr()) : ?> diff --git a/app/views/course/members/awaiting_list.php b/app/views/course/members/awaiting_list.php index f9dcce4181654776d370e1309d381c473b4242cb..b59767f22cda90f950c79a5eef72613e040a13b6 100644 --- a/app/views/course/members/awaiting_list.php +++ b/app/views/course/members/awaiting_list.php @@ -123,11 +123,8 @@ <? $actionMenu->addLink( $controller->url_for('course/members/cancel_subscription/singleuser/' . $waiting_type . '/' . $waiting['user_id']), _('Aus Veranstaltung austragen'), - Icon::create( - 'door-leave', - 'clickable', - ['title' => sprintf(_('%s austragen'), $fullname)] - ) + Icon::create('door-leave'), + ['title' => sprintf(_('%s austragen'), $fullname)] ) ?> <? endif ?> <?= $actionMenu->render() ?> diff --git a/app/views/course/members/tutor_list.php b/app/views/course/members/tutor_list.php index 5c622a3acdf4500558720dccdcb5edb0da0c030b..0bab83f8759eefbc11f094fbe225c6dc89a61425 100644 --- a/app/views/course/members/tutor_list.php +++ b/app/views/course/members/tutor_list.php @@ -147,11 +147,8 @@ <? $actionMenu->addLink( $controller->url_for('course/members/cancel_subscription/singleuser/tutor/' . $tutor['user_id']), _('Aus Veranstaltung austragen'), - Icon::create( - 'door-leave', - 'clickable', - ['title' => sprintf(_('%s austragen'), $fullname)] - ) + Icon::create('door-leave'), + ['title' => sprintf(_('%s austragen'), $fullname)] ) ?> <? endif ?> <?= $actionMenu->render() ?> diff --git a/app/views/course/statusgroups/_member.php b/app/views/course/statusgroups/_member.php index 2e09327e6b4133fd6fcf6fd3470720945316f093..2ca04db47ba279238a9fa94a53943b0d1400a7d9 100644 --- a/app/views/course/statusgroups/_member.php +++ b/app/views/course/statusgroups/_member.php @@ -37,46 +37,49 @@ <? $actions = ActionMenu::get()->setContext($user_fullname); if ($is_tutor || $m->user_id !== $GLOBALS['user']->id) { $actions->addLink( - $controller->url_for('messages/write', [ - 'rec_uname' => $m->username, - 'default_subject' => $course_title, - ]), - _('Nachricht schicken'), - Icon::create('mail', 'clickable', [ - 'title' => sprintf(_('Nachricht an %s schicken'), $user_fullname), - ]), - ['data-dialog' => 'size=auto'] + $controller->url_for('messages/write', [ + 'rec_uname' => $m->username, + 'default_subject' => $course_title, + ]), + _('Nachricht schicken'), + Icon::create('mail'), + [ + 'data-dialog' => 'size=auto', + 'title' => sprintf(_('Nachricht an %s schicken'), $user_fullname), + ] ); } if ($is_tutor && !$is_locked) { $actions->addLink( - $controller->url_for('course/statusgroups/move_member', $m->user_id, $group->id), - _('In eine andere Gruppe verschieben'), - Icon::create('arr_1right', 'clickable', [ - 'title' => sprintf( - _('%s in eine andere Gruppe verschieben'), + $controller->url_for('course/statusgroups/move_member', $m->user_id, $group->id), + _('In eine andere Gruppe verschieben'), + Icon::create('arr_1right'), + [ + 'data-dialog' => 'size=auto', + 'title' => sprintf( + _('%s in eine andere Gruppe verschieben'), $user_fullname - ), - ]), - ['data-dialog' => 'size=auto'] + ), + ] ); } if ($group->id !== 'nogroup' && !$is_locked && ($is_tutor || ($m->user_id === $GLOBALS['user']->id && $group->userMayLeave($GLOBALS['user']->id)))) { $actions->addLink( - $controller->url_for('course/statusgroups/delete_member', $m->user_id, $group->id), - _('Aus der Gruppe entfernen'), - Icon::create('trash', 'clickable', [ - 'title' => sprintf( - _('%s aus Gruppe %s entfernen'), - $user_fullname, - $group->name - ), - ]), - ['data-confirm' => sprintf( - _('Soll %s wirklich aus der Gruppe %s entfernt werden?'), - $user_fullname, - $group->name - )] + $controller->url_for('course/statusgroups/delete_member', $m->user_id, $group->id), + _('Aus der Gruppe entfernen'), + Icon::create('trash'), + [ + 'title' => sprintf( + _('%s aus Gruppe %s entfernen'), + $user_fullname, + $group->name + ), + 'data-confirm' => sprintf( + _('Soll %s wirklich aus der Gruppe %s entfernt werden?'), + $user_fullname, + $group->name + ) + ] ); } echo $actions; diff --git a/app/views/course/studygroup/_choose_founders.php b/app/views/course/studygroup/_choose_founders.php index 2e90379ea6bb064a89f85c9d8f40f0f49119c576..ca47782ce7b6bcecd7ac844e66e2e80b63091eb5 100644 --- a/app/views/course/studygroup/_choose_founders.php +++ b/app/views/course/studygroup/_choose_founders.php @@ -12,15 +12,30 @@ <option value="<?= $user_id ?>"><?= htmlReady(my_substr($data['fullname']." (".$data['username'],0,35)) ?>) - <?= $data['perms'] ?></option> <? endforeach; ?> </select> - <?= Icon::create('accept', 'clickable', ['title' => _('NutzerIn hinzufügen')])->asInput(["type" => "image", "class" => "middle", "name" => "add_founder"]) ?> - <?= Icon::create('refresh', 'clickable', ['title' => _('neue Suche starten')])->asInput(["type" => "image", "class" => "middle", "name" => "new_search"]) ?> + <?= Icon::create('accept')->asInput([ + 'title' => _('NutzerIn hinzufügen'), + 'type' => 'image', + 'class' => 'middle', + 'name' => 'add_founder' + ]) ?> + <?= Icon::create('refresh')->asInput([ + 'title' => _('neue Suche starten'), + 'type' => 'image', + 'class' => 'middle', + 'name' => 'new_search', + ]) ?> <? if (sizeof($results_choose_founders) == 500) : ?> <br><span style="color:red"><?= sprintf(_("Es werden nur die ersten %s Treffer angezeigt!"), 500) ?></span> <? endif; ?> <? else : ?> <input type="text" name="search_for_founder"> - <?= Icon::create('search', 'clickable', ['title' => _('Suchen')])->asInput(["type" => "image", "class" => "middle", "name" => "search_founder"]) ?> - <?= _("Geben Sie zur Suche den Vor-, Nach- oder Benutzernamen ein.") ?> + <?= Icon::create('search')->asInput([ + 'title' => _('Suchen'), + 'type' => 'image', + 'class' => 'middle', + 'name' => 'search_founder', + ]) ?> + <?= _('Geben Sie zur Suche den Vor-, Nach- oder Benutzernamen ein.') ?> <? endif; ?> </div> </td> @@ -30,7 +45,7 @@ <div style="width: 49%; float: left;"> <? if (is_array($founders) && sizeof($founders) > 0) : foreach ($founders as $user_id) :?> - + <?= htmlReady(get_fullname($user_id, 'full_rev')) ?> (<?= get_username($user_id) ?>) <input type="hidden" name="founders[]" value="<?= $user_id ?>"> <?= Icon::create('refresh', 'clickable', ['title' => _('NutzerIn entfernen')])->asInput(["type" => "image", "class" => "middle", "name" => "remove_founder"]) ?> diff --git a/app/views/course/timesrooms/_bookable_rooms_icon.php b/app/views/course/timesrooms/_bookable_rooms_icon.php index 49667303f13fe18da0a2295cc438e6ac4775e619..d0f1039466fef30678f2bb78081d1392ae16c942 100644 --- a/app/views/course/timesrooms/_bookable_rooms_icon.php +++ b/app/views/course/timesrooms/_bookable_rooms_icon.php @@ -10,4 +10,4 @@ if (Request::isDialog()) { $input_attr['data-dialog'] = 'size=big'; } ?> -<?= Icon::create('room-request')->asInput(20, $input_attr) ?> +<?= Icon::create('room-request')->asInput($input_attr) ?> diff --git a/app/views/course/timesrooms/editDate.php b/app/views/course/timesrooms/editDate.php index 5012a431d239f2a37b26c1ba6876a258d80f8fb7..b360609a26c354bd01c7aadc818a61dbae8e5a19 100644 --- a/app/views/course/timesrooms/editDate.php +++ b/app/views/course/timesrooms/editDate.php @@ -82,13 +82,10 @@ ['only_bookable_rooms' => '1'] ) ?>" <?= Request::isDialog() ? 'data-dialog="size=normal"' : '' ?> title="<?= _('Nur buchbare Räume anzeigen') ?>"> - <?= Icon::create('room-request')->asImg( - 20, - [ - 'class' => 'text-bottom', - 'style' => 'margin-left: 0.2em; margin-top: 0.6em;', - ] - ) ?> + <?= Icon::create('room-request')->asImg([ + 'class' => 'text-bottom', + 'style' => 'margin-left: 0.2em; margin-top: 0.6em;', + ]) ?> </a> <? endif ?> </span> diff --git a/app/views/course/wiki/blame.php b/app/views/course/wiki/blame.php index c1f0d9503e6857b16d38367f2197df2574ccd575..d924c17490e63148bf71ea6ad3b8cb984f43aa18 100644 --- a/app/views/course/wiki/blame.php +++ b/app/views/course/wiki/blame.php @@ -26,7 +26,7 @@ href="<?= $controller->versiondiff(!$version || is_a($version, WikiPage::class) ? $version : $version->page, is_a($version, WikiVersion::class) ? $version->id : null) ?>" data-dialog title="<?= _('Änderungen anzeigen') ?>"> - <?= Icon::create('log')->asImg(20, ['class' => 'text-bottom']) ?> + <?= Icon::create('log')->asImg(['class' => 'text-bottom']) ?> </a> <div class="content"> <?= wikiReady($collect) ?> diff --git a/app/views/file/_file_aside.php b/app/views/file/_file_aside.php index cdddc26c0e4acab430614bfba16ffc90aed471a6..b748e732db609a63f496ed24908b0cdf1bf926a2 100644 --- a/app/views/file/_file_aside.php +++ b/app/views/file/_file_aside.php @@ -49,7 +49,7 @@ <tr> <td colspan="2"> <h3><?=_('Hinweis zur Nutzung und Weitergabe:')?></h3> - <?= Icon::create($content_terms_of_use->icon, Icon::ROLE_INFO)->asImg(20) ?> + <?= Icon::create($content_terms_of_use->icon, Icon::ROLE_INFO) ?> <article><?= htmlReady($content_terms_of_use->student_description) ?></article> <? if ($content_terms_of_use->download_condition) : ?> diff --git a/app/views/file/_terms_of_use_select.php b/app/views/file/_terms_of_use_select.php index 4252b2d0d5b7c7b8b670200ca905013b496c99a1..42d16789325049de9698adac384fb6a7d9b59eac 100644 --- a/app/views/file/_terms_of_use_select.php +++ b/app/views/file/_terms_of_use_select.php @@ -24,8 +24,8 @@ if (!$selected_terms_of_use_id) { aria-description="<?= htmlReady(kill_format($content_terms_of_use_entry->description)) ?>"> <label for="content_terms_of_use-<?= htmlReady($content_terms_of_use_entry->id) ?>"> - <?= Icon::create('radiobutton-unchecked')->asImg(20, ['class' => 'arrow']) ?> - <?= Icon::create('radiobutton-checked')->asImg(20, ['class' => 'check']) ?> + <?= Icon::create('radiobutton-unchecked')->asImg(['class' => 'arrow']) ?> + <?= Icon::create('radiobutton-checked')->asImg(['class' => 'check']) ?> <div class="text"> <?= htmlReady($content_terms_of_use_entry->name) ?> </div> @@ -34,7 +34,7 @@ if (!$selected_terms_of_use_id) { <? if (filter_var($content_terms_of_use_entry['icon'], FILTER_VALIDATE_URL)): ?> <img src="<?= htmlReady($content_terms_of_use_entry['icon']) ?>" width="32" height="32"> <? else : ?> - <?= Icon::create($content_terms_of_use_entry['icon'], Icon::ROLE_CLICKABLE)->asImg(32) ?> + <?= Icon::create($content_terms_of_use_entry['icon'])->asImg(Icon::SIZE_LARGE) ?> <? endif ?> <? endif ?> </div> diff --git a/app/views/file/choose_file.php b/app/views/file/choose_file.php index 8a5cebd728e6f6a6f1b78ba47cc02b9e19de062f..1b59a9d195092edd98be458a678eea4a7f47047f 100644 --- a/app/views/file/choose_file.php +++ b/app/views/file/choose_file.php @@ -13,7 +13,7 @@ if (Request::get('to_folder_id')) { <div style="text-align: center; margin-bottom: 20px;"> <?= _('Kopieren nach') ?> - <?= Icon::create('folder-full', Icon::ROLE_INFO)->asImg(20, ['class' => 'text-bottom']) ?> + <?= Icon::create('folder-full', Icon::ROLE_INFO)->asImg(['class' => 'text-bottom']) ?> <?= htmlReady($to_folder_name) ?> </div> diff --git a/app/views/file/choose_file_from_course.php b/app/views/file/choose_file_from_course.php index 7ebf73a9595494cf2566b0288fc9aee3dd35a1d6..6de5332ee787909ade9e1fba97b22678fc88db1e 100644 --- a/app/views/file/choose_file_from_course.php +++ b/app/views/file/choose_file_from_course.php @@ -57,7 +57,7 @@ if (Request::get('range_type')) { </td> <td class="actions"> <a href="<?= $controller->link_for('file/choose_file_from_course/' . $folder_id, array_merge($options, ['course_id' => $course->id])) ?>" data-dialog> - <?= Icon::create('folder-full', Icon::ROLE_CLICKABLE)->asImg(30) ?> + <?= Icon::create('folder-full')->asImg(30) ?> </a> </td> </tr> diff --git a/app/views/file/choose_folder.php b/app/views/file/choose_folder.php index a50af25f3bdf063efff618d9316defeb36518ec7..955aa8f08f46da75669910da4b7c8e06fecbfb1d 100644 --- a/app/views/file/choose_folder.php +++ b/app/views/file/choose_folder.php @@ -23,7 +23,7 @@ $buttonLabels = [ <div style="text-align: center; margin-bottom: 20px;"> <?= $headings[$options['copymode']] ?> - <?= Icon::create('folder-full', Icon::ROLE_INFO)->asImg(20, ['class' => 'text-bottom']) ?> + <?= Icon::create('folder-full', Icon::ROLE_INFO)->asImg(['class' => 'text-bottom']) ?> <?= htmlReady($top_folder_name) ?> </div> diff --git a/app/views/file/new_edit_folder_form.php b/app/views/file/new_edit_folder_form.php index c25a71cde5a451663899a5d508313bd40af609ba..c89f4c2b792540fd410cdd836f8e1c55bf2c5da9 100644 --- a/app/views/file/new_edit_folder_form.php +++ b/app/views/file/new_edit_folder_form.php @@ -27,8 +27,8 @@ id="folder-type-<?= htmlReady($folder_type['class']) ?>" <? if ($folder_type['class'] === get_class($folder)) echo 'checked'; ?>> <label for="folder-type-<?= htmlReady($folder_type['class']) ?>"> - <?= Icon::create('radiobutton-unchecked')->asImg(20, ['class' => 'arrow']) ?> - <?= Icon::create('radiobutton-checked')->asImg(20, ['class' => 'check']) ?> + <?= Icon::create('radiobutton-unchecked')->asImg(['class' => 'arrow']) ?> + <?= Icon::create('radiobutton-checked')->asImg(['class' => 'check']) ?> <div class="text"> <?= htmlReady($folder_type['name']) ?> <? if ($template = $folder_type['instance']->getDescriptionTemplate()): ?> diff --git a/app/views/file/suggest_oer.php b/app/views/file/suggest_oer.php index 977b93395602b35c654f1b72778ea8a99667022f..64f02e859c12e8089b9759435865910cf2e2cb3d 100644 --- a/app/views/file/suggest_oer.php +++ b/app/views/file/suggest_oer.php @@ -28,7 +28,6 @@ <header> <h1> <studip-icon shape="<?= $icon_shape ?>" - :size="20" class="text-bottom"> </studip-icon> <div id="oer_title"> diff --git a/app/views/files/_folder_tr.php b/app/views/files/_folder_tr.php index c3f77f6653d8c4539114e5ee3068ce721a6bc50b..99ad224579c5fdcb44ce72b03b8446e1b591a4f5 100644 --- a/app/views/files/_folder_tr.php +++ b/app/views/files/_folder_tr.php @@ -31,7 +31,7 @@ if ($folder->isReadable($GLOBALS['user']->id)) { </td> <td class="document-icon" data-sort-value="<?=crc32(get_class($folder))?>"> <a href="<?= $controller->link_for($controllerpath . '/' . $folder->getId()) ?>"> - <?= $folder->getIcon('clickable')->asImg(26) ?> + <?= $folder->getIcon('clickable')->asImg(Icon::SIZE_FILES_TABLE) ?> </a> </td> <td> @@ -71,14 +71,14 @@ if ($folder->isReadable($GLOBALS['user']->id)) { $actionMenu->addLink( $controller->url_for('file/details/' . $folder->getId()), _('Info'), - Icon::create('info-circle', 'clickable', ['size' => 20]), + Icon::create('info-circle'), ['data-dialog' => '1'] ); if ($folder->isEditable($GLOBALS['user']->id)) { $actionMenu->addLink( $controller->url_for('file/edit_folder/' . $folder->getId()), _('Ordner bearbeiten'), - Icon::create('edit', 'clickable', ['size' => 20]), + Icon::create('edit'), ['data-dialog' => '1'] ); } @@ -86,34 +86,34 @@ if ($folder->isReadable($GLOBALS['user']->id)) { $actionMenu->addLink( $controller->url_for('file/download_folder/' . $folder->getId()), _('Ordner herunterladen'), - Icon::create('download', 'clickable', ['size' => 20]) + Icon::create('download') ); } if ($folder->isEditable($GLOBALS['user']->id)) { $actionMenu->addLink( $controller->url_for('file/choose_destination/move/' . $folder->getId(), ['isfolder' => 1]), _('Ordner verschieben'), - Icon::create('arr_1right', 'clickable', ['size' => 20]), + Icon::create('arr_1right'), ['data-dialog' => 'size=auto'] ); $actionMenu->addLink( $controller->url_for('file/choose_destination/copy/' . $folder->getId(), ['isfolder' => 1]), _('Ordner kopieren'), - Icon::create('clipboard', 'clickable', ['size' => 20]), + Icon::create('clipboard'), ['data-dialog' => 'size=auto'] ); if (Feedback::isActivated() && Feedback::hasCreatePerm($course->id)) { $actionMenu->addLink( $controller->url_for('course/feedback/create_form/' . $folder->getId() . '/Folder'), _('Neues Feedback-Element'), - Icon::create('star', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('star'), ['data-dialog' => '1'] ); } $actionMenu->addLink( $controller->url_for('file/delete_folder/' . $folder->getId()), _('Ordner löschen'), - Icon::create('trash', 'clickable', ['size' => 20]), + Icon::create('trash'), ['onclick' => "return STUDIP.Dialog.confirmAsPost('" . sprintf(_('Soll der Ordner "%s" wirklich gelöscht werden?'), jsReady($folder->name)) . "', this.href);"] ); } diff --git a/app/views/materialien/files/add_dokument.php b/app/views/materialien/files/add_dokument.php index d0f12f6ba76ebf81204285c4013e5f107f10e88b..0782f088b63f99237932859edde34768f4c72220 100644 --- a/app/views/materialien/files/add_dokument.php +++ b/app/views/materialien/files/add_dokument.php @@ -69,7 +69,7 @@ </div> <label id="upload_chooser" style="cursor: pointer;"> <input type="file" id="fileupload" multiple onChange="STUDIP.MVV.Document.upload_from_input(this, '<?= $key; ?>');" style="display: none;"> - <?= Icon::create('upload', 'clickable', ['title' => _("Datei hochladen"), 'class' => "text-bottom"])->asImg(20) ?> + <?= Icon::create('upload', 'clickable', ['title' => _("Datei hochladen"), 'class' => "text-bottom"]) ?> <?= _("Datei hochladen") ?> </label> <br> diff --git a/app/views/materialien/files/range.php b/app/views/materialien/files/range.php index 4af3320510b0c697b377167ada99feedb0f3a046..e4a24bc9ae63f9e995e492e5d034c3587f0769ce 100644 --- a/app/views/materialien/files/range.php +++ b/app/views/materialien/files/range.php @@ -90,7 +90,7 @@ $actions->addLink( $fileref->file_ref->getDownloadURL('force_download'), _('Datei herunterladen') . ' (' . $fileref->file_language . ')', - Icon::create('download', 'clickable', ['size' => 20]), + Icon::create('download'), ['target' => '_blank'] ); } diff --git a/app/views/messages/_message_row.php b/app/views/messages/_message_row.php index 4a511c2d62f17b45be3899e4ec80b8c85bfd8445..a481aa3eaff9755ce8731d998b119d4f14b693e3 100644 --- a/app/views/messages/_message_row.php +++ b/app/views/messages/_message_row.php @@ -9,8 +9,8 @@ <a href="<?= URLHelper::getLink('dispatch.php/messages/read/' . $message->getId() .'/' . ($received ? 'rec' : 'snd') ) ?>" data-dialog> <?= trim($message['subject']) ? htmlReady($message['subject']) : htmlReady(mila(kill_format($message['message']), 40)) ?> <div class="message-indicators"> - <span><?= $message->getNumAttachments() ? Icon::create('staple', 'info', ["title" => _("Mit Anhang")])->asImg(20) : "" ?></span> - <span><?= $message->isAnswered($GLOBALS['user']->id) ? Icon::create('outbox', 'info', ["title" => _("Beantwortet")])->asImg(20) : "" ?></span> + <span><?= $message->getNumAttachments() ? Icon::create('staple', Icon::ROLE_INFO)->asImg(['title' => _('Mit Anhang')]) : '' ?></span> + <span><?= $message->isAnswered($GLOBALS['user']->id) ? Icon::create('outbox', Icon::ROLE_INFO)->asImg(['title' => _('Beantwortet')]) : '' ?></span> </div> </a> <p class="hidden-medium-up responsive_author"> diff --git a/app/views/messages/overview.php b/app/views/messages/overview.php index 6e39e0d9a202da1b0d20d9c75255181ccca4c5e8..17996a6aabad2260ca798c410c0cb63db9dfad70 100644 --- a/app/views/messages/overview.php +++ b/app/views/messages/overview.php @@ -15,7 +15,7 @@ <? if (Request::get("tag")) : ?> <?= ', ' . _('Schlagwort') . ': ' . htmlReady(ucfirst(Request::get('tag'))) ?> <button onClick="STUDIP.Dialog.confirmAsPost('<?=_('Schlagwort wirklich löschen?')?>', '<?=$controller->link_for('messages/delete_tag', ['tag' => Request::get('tag')])?>');return false;" style="background: none; border: none; cursor: pointer;" title="<?= _("Schlagwort von allen Nachrichten entfernen.") ?>"> - <?= Icon::create('trash', 'clickable')->asImg(20) ?> + <?= Icon::create('trash') ?> </button> <? endif ?> </caption> @@ -90,7 +90,7 @@ <div style="display: none; background-color: rgba(255,255,255, 0.3); padding: 3px; border-radius: 5px; border: thin solid black;" id="move_handle"> - <?= Icon::create('mail', 'clickable')->asImg(20, ['class' => "text-bottom"]) ?> + <?= Icon::create('mail')->asImg(['class' => "text-bottom"]) ?> <span class="title"></span> </div> diff --git a/app/views/messages/read.php b/app/views/messages/read.php index 712b182715604afe9ee8f3f3e53403db106c39ff..9e513744078c8b6c4317ee393a33bf8e3eb73146 100644 --- a/app/views/messages/read.php +++ b/app/views/messages/read.php @@ -67,7 +67,7 @@ <?= formatReady($message["message"]) ?> </div> <? if($attachment_folder): ?> -<h3><?= Icon::create('staple', 'inactive')->asImg(20, ["class" => "text-bottom"]) ?><?= _('Anhänge') ?></h3> +<h3><?= Icon::create('staple', Icon::ROLE_INACTIVE)->asImg(['class' => 'text-bottom']) ?><?= _('Anhänge') ?></h3> <table class="default sortable-table" data-sortlist="[[2, 0]]"> <?= $this->render_partial('files/_files_thead') ?> <? foreach($attachment_folder->getFiles() as $file): ?> diff --git a/app/views/messages/write.php b/app/views/messages/write.php index f9d678054e3525d1d7f5d487ffe4d81dcca7852f..2c38d37ee7bd4f4e05229d6926543da4daad68e1 100644 --- a/app/views/messages/write.php +++ b/app/views/messages/write.php @@ -147,7 +147,7 @@ </div> <label style="cursor: pointer;"> <input type="file" id="fileupload" multiple onChange="STUDIP.Messages.upload_from_input(this);" style="display: none;"> - <?= Icon::create('upload', 'clickable', ['title' => _("Datei hochladen"), 'class' => "text-bottom"])->asImg(20) ?> + <?= Icon::create('upload')->asImg(['title' => _('Datei hochladen'), 'class' => 'text-bottom']) ?> <?= _("Datei hochladen") ?> </label> diff --git a/app/views/my_courses/archive.php b/app/views/my_courses/archive.php index 81ece3d7cb053ebfa8e410a968fe08797ddb059d..57d6f7d960e3dd71ef9c0913febef61ce2b9c524 100644 --- a/app/views/my_courses/archive.php +++ b/app/views/my_courses/archive.php @@ -38,10 +38,10 @@ <td align="center"> <? if ($row['forumdump'] and archiv_check_perm($row['seminar_id'])) : ?> <a href="<?= URLHelper::getLink('dispatch.php/archive/forum/' . $row['seminar_id']) ?>" data-dialog> - <?= Icon::create('forum', 'clickable', ['title' => _('Beiträge des Forums der Veranstaltung')])->asImg(20) ?> + <?= Icon::create('forum')->asImg(['title' => _('Beiträge des Forums der Veranstaltung')]) ?> </a> <? else: ?> - <?= Icon::create('forum', 'inactive')->asImg(20, ["style" => 'visibility: hidden;']) ?> + <?= Icon::create('forum', Icon::ROLE_INACTIVE)->asImg(['style' => 'visibility: hidden;']) ?> <? endif; ?> @@ -49,22 +49,22 @@ <? if(($row['archiv_file_id']) and archiv_check_perm($row['seminar_id'])): ?> <a href="<?= FileManager::getDownloadLinkForArchivedCourse($course, false) ?>"> - <?= Icon::create('file-archive', 'clickable', ['title' => _('Dateisammlung der Veranstaltung herunterladen')])->asImg(20) ?> + <?= Icon::create('file-archive')->asImg(['title' => _('Dateisammlung der Veranstaltung herunterladen')]) ?> </a> <? elseif(($row['archiv_protected_file_id']) and archiv_check_perm($row['seminar_id'] == 'admin')): ?> <a href="<?= FileManager::getDownloadLinkForArchivedCourse($course, true) ?>"> - <?= Icon::create('file-archive', 'clickable', ['title' => _('Dateisammlung der Veranstaltung herunterladen')])->asImg(20) ?> + <?= Icon::create('file-archive')->asImg(['title' => _('Dateisammlung der Veranstaltung herunterladen')]) ?> </a> <? else: ?> - <?= Icon::create('file-archive', 'inactive')->asImg(20, ["style" => 'visibility: hidden;']) ?> + <?= Icon::create('file-archive', Icon::ROLE_INACTIVE)->asImg(['style' => 'visibility: hidden;']) ?> <? endif; ?> <? if ($row['wikidump'] and archiv_check_perm($row['seminar_id'])) : ?> <a href="<?= URLHelper::getLink('dispatch.php/archive/wiki/' . $row['seminar_id']) ?>" data-dialog> - <?= Icon::create('wiki', 'clickable', ['title' => _('Beiträge des Wikis der Veranstaltung')])->asImg(20) ?> + <?= Icon::create('wiki')->asImg(['title' => _('Beiträge des Wikis der Veranstaltung')]) ?> </a> <? else: ?> - <?= Icon::create('wiki', 'inactive')->asImg(20, ["style" => 'visibility: hidden;']) ?> + <?= Icon::create('wiki', Icon::ROLE_INACTIVE)->asImg(['style' => 'visibility: hidden;']) ?> <? endif; ?> </td> <td style="text-align: center"><?= $row['status'] ?></td> diff --git a/app/views/my_courses/group_selector.php b/app/views/my_courses/group_selector.php index 8d99a64060890dfa8c0d6e7639732c43e8dc6609..128b7ebcf39e1f3f52630f7d7ad9509f9e60c6b7 100644 --- a/app/views/my_courses/group_selector.php +++ b/app/views/my_courses/group_selector.php @@ -13,7 +13,7 @@ <label for="course-group-<?= htmlReady($course_id) ?>-<?= $i ?>"> <span class="group-number"><?= $i + 1 ?></span> <span class="checked-icon"> - <?= Icon::create('accept', Icon::ROLE_INFO)->asImg(20) ?> + <?= Icon::create('accept', Icon::ROLE_INFO) ?> </span> </label> </td> diff --git a/app/views/my_institutes/index.php b/app/views/my_institutes/index.php index 8190a6fe1a941229f8b301f14c98223cb887c2c6..e22b6658025523e43150de104055ab06d494f696 100644 --- a/app/views/my_institutes/index.php +++ b/app/views/my_institutes/index.php @@ -62,7 +62,7 @@ URLHelper::getLink('dispatch.php/institute/overview', ['auswahl' => $instid, 'redirect_to' => $nav->getURL()]) ?>" <?= $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '' ?>> - <?= $nav->getImage()->asImg(20, $nav->getLinkAttributes()) ?> + <?= $nav->getImage()->asImg($nav->getLinkAttributes()) ?> </a> </li> <? else: ?> @@ -78,10 +78,10 @@ <td style="text-align: left; white-space: nowrap"> <? if (Config::get()->ALLOW_SELFASSIGN_INSTITUTE && $values['perms'] === 'user') : ?> <a href="<?= $controller->decline_inst($instid) ?>"> - <?= Icon::create('door-leave')->asImg(20, ['title' => _("aus der Einrichtung austragen")]) ?> + <?= Icon::create('door-leave')->asImg(['title' => _("aus der Einrichtung austragen")]) ?> </a> <? else : ?> - <?= Assets::img('blank.gif', ['size' => '20']) ?> + <?= Assets::img('blank.gif', ['size' => Icon::SIZE_DEFAULT]) ?> <? endif ?> </td> </tr> diff --git a/app/views/my_studygroups/_course.php b/app/views/my_studygroups/_course.php index 972a5775b7358e8627be8898ad8a7a1b53ed4315..87af045625ece3eafdd0d752ef0cea21199959af 100644 --- a/app/views/my_studygroups/_course.php +++ b/app/views/my_studygroups/_course.php @@ -31,7 +31,7 @@ URLHelper::getLink('seminar_main.php', ['auswahl' => $group['seminar_id'], 'redirect_to' => $nav->getURL()]) ?>" <?= $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '' ?>> - <?= $nav->getImage()->asImg(20, $nav->getLinkAttributes()) ?> + <?= $nav->getImage()->asImg($nav->getLinkAttributes()) ?> </a> </li> <? elseif (is_string($key)) : ?> @@ -51,18 +51,18 @@ <? endif ?> <? if ($adminnavigation) : ?> <a href="<?= URLHelper::getLink($adminnavigation->getURL(), ['cid' => $group['seminar_id']]) ?>"> - <?= $adminnavigation->getImage()->asImg(20, $adminnavigation->getLinkAttributes())?> + <?= $adminnavigation->getImage()->asImg($adminnavigation->getLinkAttributes())?> </a> <? endif ?> <? elseif (!empty($group['binding'])) : ?> <a href="<?= URLHelper::getLink('', ['auswahl' => $group['seminar_id'], 'cmd' => 'no_kill']) ?>"> - <?= Icon::create('door-leave', 'inactive', ['title' => _("Die Teilnahme ist bindend. Bitte wenden Sie sich an die Lehrenden.")])->asImg(20) ?> + <?= Icon::create('door-leave', Icon::ROLE_INACTIVE)->asImg(['title' => _('Die Teilnahme ist bindend. Bitte wenden Sie sich an die Lehrenden.')]) ?> </a> <? else : ?> <a href="<?= URLHelper::getLink("dispatch.php/my_courses/decline/{$group['seminar_id']}", ['cmd' => 'suppose_to_kill']) ?>"> - <?= Icon::create('door-leave', 'inactive', ['title' => _("aus der Studiengruppe abmelden")])->asImg(20) ?> + <?= Icon::create('door-leave', Icon::ROLE_INACTIVE)->asImg(['title' => _('aus der Studiengruppe abmelden')]) ?> </a> <? endif ?> </td> diff --git a/app/views/my_studygroups/index.php b/app/views/my_studygroups/index.php index 6d7ee73b4d53297c3e505100d9e91c089049907d..6fd2d20f6850c928969a231bf23a3a4edecdd8db 100644 --- a/app/views/my_studygroups/index.php +++ b/app/views/my_studygroups/index.php @@ -15,7 +15,7 @@ <th colspan="2" nowrap align="center"> <a href="<?= URLHelper::getLink('dispatch.php/my_courses/groups/all/true') ?>" data-dialog="size=normal"> - <?= Icon::create('group', 'clickable', ['title' => _('Gruppe ändern'), 'class' => 'middle'])->asImg(20) ?> + <?= Icon::create('group')->asImg(['title' => _('Gruppe ändern'), 'class' => 'middle']) ?> </a> </th> <th><?= _('Name') ?></th> diff --git a/app/views/oer/admin/hosts.php b/app/views/oer/admin/hosts.php index 0289d9069d0c5034e367d79be317504945e143a6..1bce5e5a417cd9f690d14fd904b1602a9349aed9 100644 --- a/app/views/oer/admin/hosts.php +++ b/app/views/oer/admin/hosts.php @@ -17,46 +17,46 @@ <tr id="host_<?= $host->getId() ?>" data-host_id="<?= $host->getId() ?>"> <td> <? if ($host->isMe()) : ?> - <?= Icon::create("home", Icon::ROLE_INFO)->asImg(20, ['class' => "text-bottom", 'title' => _('Das ist Ihr Stud.IP')]) ?> + <?= Icon::create('home', Icon::ROLE_INFO)->asImg(['class' => 'text-bottom', 'title' => _('Das ist Ihr Stud.IP')]) ?> <? endif ?> <?= htmlReady($host['name']) ?></td> <td> <a href="<?= htmlReady($host['url']) ?>" target="_blank"> - <?= Icon::create("link-extern", Icon::ROLE_CLICKABLE)->asImg(16, ['class' => "text-bottom"]) ?> + <?= Icon::create('link-extern')->asImg(['class' => 'text-bottom']) ?> <?= htmlReady($host['url']) ?> </a> </td> <td> <?= $host['public_key'] ? md5($host['public_key']) : "" ?> <? if (strpos($host['public_key'], "\r") !== false) : ?> - <?= Icon::create("exclaim", Icon::ROLE_STATUS_RED)->asImg(20, ['class' => "text-bottom", 'title' => _('Der Key hat ein Carriage-Return Zeichen, weshalb der Hash des Public-Keys vermutlich vom Original-Hash abweicht.')]) ?> + <?= Icon::create('exclaim', Icon::ROLE_STATUS_RED)->asImg(['class' => 'text-bottom', 'title' => _('Der Key hat ein Carriage-Return Zeichen, weshalb der Hash des Public-Keys vermutlich vom Original-Hash abweicht.')]) ?> <? endif ?> </td> <td class="index_server"> <? if ($host->isMe()) : ?> <a href="" title="<?= _('Als Index-Server aktivieren/deaktivieren') ?>" class="<?= $host['index_server'] ? "checked" : "unchecked" ?>"> - <?= Icon::create("checkbox-".($host['index_server'] ? "" : "un")."checked", Icon::ROLE_CLICKABLE)->asImg(20) ?> + <?= Icon::create("checkbox-".($host['index_server'] ? "" : "un")."checked") ?> </a> <? else : ?> <? if ($host['index_server']) : ?> <a href="" class="<?= $host['allowed_as_index_server'] ? "checked" : "unchecked" ?>" title="<?= _('Diesen Server als Indexserver aktivieren. Suchanfragen werden immer auch an ihn gerichtet. Sie sollten nur einen Indexserver verwenden.') ?>"> - <?= Icon::create("checkbox-".($host['allowed_as_index_server'] ? "" : "un")."checked", Icon::ROLE_CLICKABLE)->asImg(20) ?> + <?= Icon::create("checkbox-".($host['allowed_as_index_server'] ? "" : "un")."checked") ?> </a> <? else : ?> - <?= Icon::create("checkbox-unchecked", Icon::ROLE_INACTIVE)->asImg(20, ['title' => _('Dieser Server steht nicht als Indexserver zur Verfügung.')]) ?> + <?= Icon::create("checkbox-unchecked", Icon::ROLE_INACTIVE)->asImg(['title' => _('Dieser Server steht nicht als Indexserver zur Verfügung.')]) ?> <? endif ?> <? endif ?> </td> <td class="active"> <? if ($host->isMe()) : ?> - <?= Icon::create("checkbox-checked", Icon::ROLE_INFO)->asImg(20) ?> + <?= Icon::create("checkbox-checked", Icon::ROLE_INFO) ?> <? else : ?> <a href="" title="<?= _('Soll dieser Server und seine OERs für uns relevant sein?') ?>" class="<?= $host['active'] ? "checked" : "unchecked" ?>"> - <?= Icon::create("checkbox-".($host['active'] ? "" : "un")."checked", Icon::ROLE_CLICKABLE)->asImg(20) ?> + <?= Icon::create("checkbox-".($host['active'] ? "" : "un")."checked") ?> </a> <? endif ?> </td> @@ -64,7 +64,7 @@ <? if (!$host->isMe()) : ?> <a href="<?= $controller->link_for("oer/admin/ask_for_hosts/".$host->getId()) ?>" title="<?= _('Diesen Server nach weiteren bekannten Hosts fragen.') ?>"> - <?= Icon::create("campusnavi", Icon::ROLE_CLICKABLE)->asImg(20, ['width' => "20px", 'class' => "text-bottom"]) ?> + <?= Icon::create('campusnavi')->asImg(['class' => 'text-bottom']) ?> </a> <? endif ?> </td> diff --git a/app/views/oer/market/_details_file.php b/app/views/oer/market/_details_file.php index 4a764379d7ce285527444be98046c9ba8f806d8a..18f0f70d22082da2f35ddbb9e302cf56d6359c8c 100644 --- a/app/views/oer/market/_details_file.php +++ b/app/views/oer/market/_details_file.php @@ -1,7 +1,7 @@ <? if ($file['is_folder']) : ?> <? if ($name !== "__MACOSX") : ?> <li class="folder"> - <?= Icon::create("folder-full", Icon::ROLE_INFO)->asImg("20px", ['class' => "text-bottom"]) ?> + <?= Icon::create('folder-full', Icon::ROLE_INFO)->asImg(['class' => 'text-bottom']) ?> <?= htmlReady($name) ?> <ol> <? foreach ($file['structure'] as $name => $subfile) : ?> @@ -15,7 +15,7 @@ <div class="size" style="float: right"> <?= htmlReady(number_format($file['size'] / 1024, 2)) ?> KB </div> - <?= FileManager::getFileIcon($name, "info")->asImg("20px", ['class' => "text-bottom"]) ?> + <?= FileManager::getFileIcon($name, Icon::ROLE_INFO)->asImg(['class' => 'text-bottom']) ?> <?= htmlReady($name) ?> </li> <? endif ?> diff --git a/app/views/oer/market/_searchform.php b/app/views/oer/market/_searchform.php index 6ac771f18d8f2f11481c9e0b9392d4b70d1e8478..7a41c6ab838872b920af2c9e0f151d6102247ab3 100644 --- a/app/views/oer/market/_searchform.php +++ b/app/views/oer/market/_searchform.php @@ -8,7 +8,7 @@ @click.prevent="clearCategory" class="erasefilter" title="<?= _('Filter der Kategorie entfernen') ?>"> - <studip-icon shape="decline" role="clickable" :size="16" class="text-bottom"></studip-icon> + <studip-icon shape="decline" class="text-bottom"></studip-icon> </a> </span> @@ -56,35 +56,35 @@ <ul class="clean"> <li> <a href="<?= $controller->link_for("oer/market", ['category' => "audio"]) ?>" @click.prevent="category = 'audio'"> - <studip-icon v-if="category != 'audio'" shape="radiobutton-unchecked" role="clickable" :size="16" class="text-bottom"></studip-icon> - <studip-icon v-if="category == 'audio'" shape="radiobutton-checked" role="clickable" :size="16" class="text-bottom"></studip-icon> + <studip-icon v-if="category !== 'audio'" shape="radiobutton-unchecked" class="text-bottom"></studip-icon> + <studip-icon v-else shape="radiobutton-checked" class="text-bottom"></studip-icon> <?= _('Audio') ?> </a> </li> <li> <a href="<?= $controller->link_for("oer/market", ['category' => "video"]) ?>" @click.prevent="category = 'video'"> - <studip-icon v-if="category != 'video'" shape="radiobutton-unchecked" role="clickable" :size="16" class="text-bottom"></studip-icon> - <studip-icon v-if="category == 'video'" shape="radiobutton-checked" role="clickable" :size="16" class="text-bottom"></studip-icon> + <studip-icon v-if="category !== 'video'" shape="radiobutton-unchecked" class="text-bottom"></studip-icon> + <studip-icon v-else shape="radiobutton-checked" class="text-bottom"></studip-icon> <?= _('Video') ?> </a> </li> <li> <a href="<?= $controller->link_for("oer/market", ['category' => "presentation"]) ?>" @click.prevent="category = 'presentation'"> - <studip-icon v-if="category != 'presentation'" shape="radiobutton-unchecked" role="clickable" :size="16" class="text-bottom"></studip-icon> - <studip-icon v-if="category == 'presentation'" shape="radiobutton-checked" role="clickable" :size="16" class="text-bottom"></studip-icon> + <studip-icon v-if="category !== 'presentation'" shape="radiobutton-unchecked" class="text-bottom"></studip-icon> + <studip-icon v-else shape="radiobutton-checked" class="text-bottom"></studip-icon> <?= _('Folien') ?> </a> </li> <li> <a href="<?= $controller->link_for("oer/market", ['category' => "elearning"]) ?>" @click.prevent="category = 'elearning'"> - <studip-icon v-if="category != 'elearning'" shape="radiobutton-unchecked" role="clickable" :size="16" class="text-bottom"></studip-icon> - <studip-icon v-if="category == 'elearning'" shape="radiobutton-checked" role="clickable" :size="16" class="text-bottom"></studip-icon> + <studip-icon v-if="category !== 'elearning'" shape="radiobutton-unchecked" class="text-bottom"></studip-icon> + <studip-icon v-else shape="radiobutton-checked" class="text-bottom"></studip-icon> <?= _('Lernmodule') ?> </a> </li> <li> <a href="<?= $controller->link_for("oer/market", ['get' => "all"]) ?>"> - <studip-icon shape="link-intern" role="clickable" :size="16" class="text-bottom"></studip-icon> + <studip-icon shape="link-intern" class="text-bottom"></studip-icon> <?= _('Alles') ?> </a> </li> @@ -166,8 +166,6 @@ <header> <h1> <studip-icon :shape="getIconShape(result)" - role="clickable" - :size="20" class="text-bottom"></studip-icon> {{ shortenName(result.name) }} </h1> diff --git a/app/views/oer/market/add_to_course.php b/app/views/oer/market/add_to_course.php index 06df75b3cd8c9e7a96d16fc355c739b59721c3b2..4ac30fd37e3dde72ab08c246f990cc0c3a911534 100644 --- a/app/views/oer/market/add_to_course.php +++ b/app/views/oer/market/add_to_course.php @@ -35,7 +35,7 @@ <button type="submit" title="<?= _('Zur Veranstaltung hinzufügen') ?>" style="border: none; background: none; cursor: pointer;"> - <?= Icon::create("add", Icon::ROLE_CLICKABLE)->asImg("20px", ['class' => "text-bottom"]) ?> + <?= Icon::create('add')->asImg(['class' => 'text-bottom']) ?> </button> </form> </td> diff --git a/app/views/oer/market/details.php b/app/views/oer/market/details.php index c05bbdfceb2b1c322d7795e8b04251821cd9465c..7a08ae47ccdd1e0214bfc99e1b0ff7a1748ef1c2 100644 --- a/app/views/oer/market/details.php +++ b/app/views/oer/market/details.php @@ -241,15 +241,15 @@ <div class="stars"> <? $rating = round($review['metadata']['rating'], 1) ?> <? $v = $rating >= 0.75 ? "" : ($rating >= 0.25 ? "-halffull" : "-empty") ?> - <?= Icon::create("star$v", Icon::ROLE_INFO)->asImg(16) ?> + <?= Icon::create("star$v", Icon::ROLE_INFO) ?> <? $v = $rating >= 1.75 ? "" : ($rating >= 1.25 ? "-halffull" : "-empty") ?> - <?= Icon::create("star$v", Icon::ROLE_INFO)->asImg(16) ?> + <?= Icon::create("star$v", Icon::ROLE_INFO) ?> <? $v = $rating >= 2.75 ? "" : ($rating >= 2.25 ? "-halffull" : "-empty") ?> - <?= Icon::create("star$v", Icon::ROLE_INFO)->asImg(16) ?> + <?= Icon::create("star$v", Icon::ROLE_INFO) ?> <? $v = $rating >= 3.75 ? "" : ($rating >= 3.25 ? "-halffull" : "-empty") ?> - <?= Icon::create("star$v", Icon::ROLE_INFO)->asImg(16) ?> + <?= Icon::create("star$v", Icon::ROLE_INFO) ?> <? $v = $rating >= 4.75 ? "" : ($rating >= 4.25 ? "-halffull" : "-empty") ?> - <?= Icon::create("star$v", Icon::ROLE_INFO)->asImg(16) ?> + <?= Icon::create("star$v", Icon::ROLE_INFO) ?> <? if ($GLOBALS['perm']->have_perm("autor") && !count($review->comments)) : ?> <a href="<?= $controller->link_for("oer/market/discussion/".$review->getId()) ?>" style="font-size: 0.8em;"> @@ -260,12 +260,12 @@ <div class="comments center"> <? if (count($review->comments)) : ?> <a href="<?= $controller->link_for("oer/market/discussion/".$review->getId()) ?>"> - <?= Icon::create("comment", Icon::ROLE_CLICKABLE)->asImg(16, ['class' => "text-bottom"]) ?> + <?= Icon::create("comment")->asImg(['class' => "text-bottom"]) ?> <?= sprintf(_('%s Kommentare dazu'), count($review->comments)) ?> </a> <? elseif ($material->isMine()) : ?> <a href="<?= $controller->link_for("oer/market/discussion/".$review->getId()) ?>"> - <?= Icon::create("comment", Icon::ROLE_CLICKABLE)->asImg(16, ['class' => "text-bottom"]) ?> + <?= Icon::create("comment")->asImg(['class' => "text-bottom"]) ?> <?= _('Dazu einen Kommentar schreiben') ?> </a> <? endif ?> diff --git a/app/views/oer/market/discussion.php b/app/views/oer/market/discussion.php index 139e2b9d294fff6fa115a987f3131df7084daa72..2e10c385dbb5576b51718cc8e003dc1d1e1f61f6 100644 --- a/app/views/oer/market/discussion.php +++ b/app/views/oer/market/discussion.php @@ -1,5 +1,5 @@ <a href="<?= $controller->link_for("oer/market/details/".$thread['context_id']) ?>"> - <?= Icon::create("arr_1left", Icon::ROLE_CLICKABLE)->asImg("20px", ['class' => "text-bottom"]) ?> + <?= Icon::create('arr_1left')->asImg(['class' => 'text-bottom']) ?> <?= _('Zurück') ?> </a> diff --git a/app/views/oer/market/profile.php b/app/views/oer/market/profile.php index 5c904128fea542ea075b420eb06b1617a02d3365..0304aca76d5befcd7f8556ed792f2953943a6f7d 100644 --- a/app/views/oer/market/profile.php +++ b/app/views/oer/market/profile.php @@ -14,7 +14,7 @@ <section class="contentbox"> <header> <h1> - <?= Icon::create("service", Icon::ROLE_CLICKABLE)->asImg("16px") ?> + <?= Icon::create('service') ?> <?= _('Lernmaterialien') ?> </h1> </header> @@ -23,4 +23,3 @@ </section> </section> <? endif ?> - diff --git a/app/views/oer/mymaterial/_material_list.php b/app/views/oer/mymaterial/_material_list.php index 237ae0758fb836cd3e49ab25042605dbd842f414..afb47b3f30aef2fda2292e45b728592b659c6aee 100644 --- a/app/views/oer/mymaterial/_material_list.php +++ b/app/views/oer/mymaterial/_material_list.php @@ -14,7 +14,7 @@ <tr> <td> <? if ($material->draft) : ?> - <?= Icon::create('lock-locked', Icon::ROLE_INFO)->asImg(20, ['class' => 'text-bottom']) ?> + <?= Icon::create('lock-locked', Icon::ROLE_INFO)->asImg(['class' => 'text-bottom']) ?> <? endif ?> </td> <td> @@ -52,13 +52,13 @@ <? if ($material->isMine()) : ?> <a href="<?= $controller->link_for('oer/mymaterial/edit/' . $material->id) ?>" data-dialog title="<?= _('Lernmaterial bearbeiten') ?>"> - <?= Icon::create('edit', Icon::ROLE_CLICKABLE)->asImg(20) ?> + <?= Icon::create('edit') ?> </a> <form action="<?= $controller->link_for('oer/mymaterial/delete/' . $material->id) ?>" class="inlineform" method="post" data-confirm="<?= _('Dieses Material wirklich löschen?') ?>"> - <?= Icon::create("trash", Icon::ROLE_CLICKABLE)->asInput(20) ?> + <?= Icon::create('trash')->asInput() ?> </form> <? endif ?> </td> diff --git a/app/views/oer/mymaterial/edit.php b/app/views/oer/mymaterial/edit.php index 12c1676fea974067d5267ea5cc3cd07a2492b98e..d95b17bc4531538dae5f24e5e9e29a9f33ce33b9 100644 --- a/app/views/oer/mymaterial/edit.php +++ b/app/views/oer/mymaterial/edit.php @@ -31,8 +31,6 @@ <header> <h1> <studip-icon shape="file" - role="clickable" - :size="20" class="text-bottom"></studip-icon> <div class="title">{{ name }}</div> </h1> @@ -204,13 +202,13 @@ <a href="#" @click.prevent="removeTag(index)" title="<?= _('Thema aus der Liste streichen') ?>"> - <studip-icon shape="trash" role="clickable" :size="20" class="text-bottom"></studip-icon> + <studip-icon shape="trash" class="text-bottom"></studip-icon> </a> </li> </ul> <a href="#" @click.prevent="addTag"> - <studip-icon shape="add" role="clickable" :size="20" class="text-bottom"></studip-icon> + <studip-icon shape="add" class="text-bottom"></studip-icon> <?= _('Thema hinzufügen') ?> </a> </div> diff --git a/app/views/public_courses/index.php b/app/views/public_courses/index.php index e55899c086877e3fd60d8faee9915cec08a5a7bf..066ef7ae6ee3459b4db7871b041a738702c52b6e 100644 --- a/app/views/public_courses/index.php +++ b/app/views/public_courses/index.php @@ -69,10 +69,10 @@ } ?> <a href="<?= URLHelper::getLink('seminar_main.php?auswahl='. $id . '&redirect_to=' . str_replace('?', '&', $navigation->getURL())) ?>"<?= $badge ?>> - <?= $navigation->getImage()->asImg(20, $navigation->getLinkAttributes()) ?> + <?= $navigation->getImage()->asImg($navigation->getLinkAttributes()) ?> </a> <? else: ?> - <?= Assets::img('blank.gif', ['width' => 20, 'height' => 20]) ?> + <?= Assets::img('blank.gif', ['width' => Icon::SIZE_DEFAULT, 'height' => Icon::SIZE_DEFAULT]) ?> <? endif; ?> <? endforeach; ?> </td> diff --git a/app/views/questionnaire/_answer_description_container.php b/app/views/questionnaire/_answer_description_container.php index 6e066c82cd673b3e9a55df705eb4f10142f85548..dfdb9f80d2077d5639f4cbef215bba3a1956ba37 100644 --- a/app/views/questionnaire/_answer_description_container.php +++ b/app/views/questionnaire/_answer_description_container.php @@ -6,11 +6,11 @@ ?> <div class="description_container"> <div class="icon_container"> - <?= Icon::create($iconshape, Icon::ROLE_INFO)->asImg(20) ?> + <?= Icon::create($iconshape, Icon::ROLE_INFO) ?> </div> <article class="description"> <? if (isset($vote->questiondata['mandatory']) && $vote->questiondata['mandatory']) : ?> - <?= Icon::create('star', Icon::ROLE_ATTENTION)->asImg(20, ['class' => 'text-bottom', 'alt' => '']) ?> + <?= Icon::create('star', Icon::ROLE_ATTENTION)->asImg(['class' => 'text-bottom', 'alt' => '']) ?> <?= _('Pflichtantwort') ?> <? endif ?> <?= formatReady($vote->questiondata['description']) ?> diff --git a/app/views/questionnaire/_question.php b/app/views/questionnaire/_question.php index 44b56128ffe4415763b533bfb531ecca5c5a61c3..1ced93c7a368ab5e4d05e02210d4019bc5ec23cb 100644 --- a/app/views/questionnaire/_question.php +++ b/app/views/questionnaire/_question.php @@ -5,19 +5,19 @@ <div style="float: right; padding-top: 3px; padding-right: 5px;"> <a href="#" class="move_up" title="<?= _("Frage nach oben verschieben") ?>" onClick="STUDIP.Questionnaire.moveQuestionUp.call(this); return false;"> - <?= Icon::create("arr_1up", "clickable")->asImg("20px", ['class' => "text-bottom"]) ?> + <?= Icon::create('arr_1up')->asImg(['class' => 'text-bottom']) ?> </a> <a href="#" class="move_down" title="<?= _("Frage nach unten verschieben") ?>" onClick="STUDIP.Questionnaire.moveQuestionDown.call(this); return false;"> - <?= Icon::create("arr_1down", "clickable")->asImg("20px", ['class' => "text-bottom"]) ?> + <?= Icon::create('arr_1down')->asImg(['class' => 'text-bottom']) ?> </a> <a href="#" onClick="var that = this; STUDIP.Dialog.confirm('<?= _("Wirklich löschen?") ?>', function () { jQuery(that).closest('fieldset').remove(); }); return false;" title="<?= sprintf(_("%s löschen"), htmlReady($class::getName())) ?>"> - <?= Icon::create("trash", "clickable")->asImg("20px", ['class' => "text-bottom"]) ?> + <?= Icon::create('trash')->asImg(['class' => 'text-bottom']) ?> </a> </div> <div> - <?= $class::getIcon()->asImg("20px", ['class' => "text-bottom"]) ?> + <?= $class::getIcon()->asImg(['class' => 'text-bottom']) ?> <?= htmlReady($class::getName()) ?> </div> diff --git a/app/views/questionnaire/_widget_questionnaire.php b/app/views/questionnaire/_widget_questionnaire.php index 4f625c214b3919bf7f82693b5b1353b1b11d277d..072e2d6604885da068bd470b5e00534823334287 100644 --- a/app/views/questionnaire/_widget_questionnaire.php +++ b/app/views/questionnaire/_widget_questionnaire.php @@ -41,7 +41,7 @@ title="<?= _("QR-Code zu diesem Fragebogen anzeigen") ?>" aria-label="<?= _("QR-Code zu diesem Fragebogen anzeigen") ?>" data-qr-code> <? URLHelper::setBaseURL($oldbase) ?> - <?= Icon::create("code-qr", "clickable")->asImg(20, ['class' => "text-bottom"]) ?> + <?= Icon::create('code-qr')->asImg(['class' => 'text-bottom']) ?> </a> </span> </nav> diff --git a/app/views/questionnaire/context.php b/app/views/questionnaire/context.php index 98e08c0bd90d932427db85d3d477afc7538ef411..96190d963c145536a6b6bc2c596272a4e4f65529 100644 --- a/app/views/questionnaire/context.php +++ b/app/views/questionnaire/context.php @@ -41,7 +41,7 @@ <a href="<?= URLHelper::getLink("seminar_main.php", ['auswahl' => $course->getId()]) ?>"> <?= htmlReady((Config::get()->IMPORTANT_SEMNUMBER ? $course->veranstaltungsnummer." " : "").$course->name. ' ('.$course->semester_text.')') ?> </a> - <?= Icon::create("trash", "clickable")->asimg("20px", ['class' => "text-bottom", 'title' => _("Zuweisung zur Veranstaltung aufheben.")]) ?> + <?= Icon::create('trash')->asimg(['class' => 'text-bottom', 'title' => _('Zuweisung zur Veranstaltung aufheben.')]) ?> </span> </label> </li> @@ -63,7 +63,7 @@ <a href="<?= URLHelper::getLink("seminar_main.php", ['auswahl' => $statusgruppe->getId()]) ?>"> <?= htmlReady($statusgruppe->course['name'].": ".$statusgruppe->name) ?> </a> - <?= Icon::create("trash", "clickable")->asimg("20px", ['class' => "text-bottom", 'title' => _("Zuweisung zur Veranstaltung aufheben.")]) ?> + <?= Icon::create('trash')->asimg(['class' => 'text-bottom', 'title' => _('Zuweisung zur Veranstaltung aufheben.')]) ?> </span> </label> </li> diff --git a/app/views/questionnaire/question_types/freetext/freetext_evaluation.php b/app/views/questionnaire/question_types/freetext/freetext_evaluation.php index 43c40025b9526fe0237df37bd733bd7b3b1df03e..f25ab271af1a671179192cfd73c6efc891b8204f 100644 --- a/app/views/questionnaire/question_types/freetext/freetext_evaluation.php +++ b/app/views/questionnaire/question_types/freetext/freetext_evaluation.php @@ -6,7 +6,7 @@ ?> <div class="description_container"> <div class="icon_container"> - <?= Icon::create('guestbook', Icon::ROLE_INFO)->asImg(20) ?> + <?= Icon::create('guestbook', Icon::ROLE_INFO) ?> </div> <div class="description"> <?= formatReady($vote->questiondata['description']) ?> diff --git a/app/views/questionnaire/question_types/info/info.php b/app/views/questionnaire/question_types/info/info.php index 2faf8503e0ca5de12c2b73b358e9521a67e531b5..f37e382614a08688e0003308b473bcbdc39f12dd 100644 --- a/app/views/questionnaire/question_types/info/info.php +++ b/app/views/questionnaire/question_types/info/info.php @@ -6,7 +6,7 @@ <div class="description_container"> <div class="icon_container"> - <?= Icon::create('info-circle', Icon::ROLE_INFO)->asImg(20) ?> + <?= Icon::create('info-circle', Icon::ROLE_INFO) ?> </div> <div class="description"> <? if ($vote->hasValidURL()) : ?> diff --git a/app/views/questionnaire/question_types/likert/likert_evaluation.php b/app/views/questionnaire/question_types/likert/likert_evaluation.php index 11ef4b4b98fdfb71c726c566e1db9616976a8e79..a12a234aeb27ef64441dbc59b5a8f35ec12ed5a6 100644 --- a/app/views/questionnaire/question_types/likert/likert_evaluation.php +++ b/app/views/questionnaire/question_types/likert/likert_evaluation.php @@ -9,7 +9,7 @@ $options = $vote->questiondata['options']; <div class="description_container"> <div class="icon_container"> - <?= Icon::create('question-likert', Icon::ROLE_INFO)->asImg(20) ?> + <?= Icon::create('question-likert', Icon::ROLE_INFO) ?> </div> <div class="description"> <?= formatReady(isset($vote->questiondata) && isset($vote->questiondata['description']) ? $vote->questiondata['description'] : '') ?> @@ -98,7 +98,7 @@ $options = $vote->questiondata['options']; <?= htmlReady($hits) ?> </div> </div> - <?= Icon::create('filter2', Icon::ROLE_CLICKABLE)->asImg(16, ['class' => 'text-bottom']) ?> + <?= Icon::create('filter2')->asImg(['class' => 'text-bottom']) ?> <?= round(100 * $hits / $countAnswers) ?>% </a> <? else : ?> diff --git a/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php b/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php index 6b75ea1abe4a1fab0eebfe5fe6a155fbb397346f..b0a3df895925ede11905c97c2929355768d7c3ad 100644 --- a/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php +++ b/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php @@ -9,7 +9,7 @@ $options = range($vote->questiondata['minimum'], $vote->questiondata['maximum']) <div class="description_container"> <div class="icon_container"> - <?= Icon::create('question-rangescale', Icon::ROLE_INFO)->asImg(20) ?> + <?= Icon::create('question-rangescale', Icon::ROLE_INFO) ?> </div> <div class="description"> <?= formatReady($vote->questiondata['description']) ?> @@ -99,7 +99,7 @@ $options = range($vote->questiondata['minimum'], $vote->questiondata['maximum']) <?= htmlReady($hits) ?> </div> </div> - <?= Icon::create('filter2', Icon::ROLE_CLICKABLE)->asImg(16, ['class' => 'text-bottom']) ?> + <?= Icon::create('filter2')->asImg(['class' => 'text-bottom']) ?> <?= round(100 * $hits / $countAnswers) ?>% </a> <? else : ?> diff --git a/app/views/questionnaire/question_types/vote/vote_evaluation.php b/app/views/questionnaire/question_types/vote/vote_evaluation.php index b78ddc878a39fa515f0a4747fdc73391b5164c00..cd1222f857438aaf67d1bb1d6378b86350db644c 100644 --- a/app/views/questionnaire/question_types/vote/vote_evaluation.php +++ b/app/views/questionnaire/question_types/vote/vote_evaluation.php @@ -52,7 +52,7 @@ rsort($ordered_results); <div class="description_container"> <div class="icon_container"> - <?= Icon::create('vote', Icon::ROLE_INFO)->asImg(20) ?> + <?= Icon::create('vote', Icon::ROLE_INFO) ?> </div> <div class="description"> <?= formatReady($vote->questiondata['description']) ?> @@ -102,7 +102,7 @@ rsort($ordered_results); <a href="" title="<?= _('Zeige wieder alle Ergebnisse ohne Filterung an.') ?>" onclick="STUDIP.Questionnaire.removeFilter('<?= htmlReady($vote['questionnaire_id']) ?>'); return false;"> - <?= Icon::create('filter2', Icon::ROLE_CLICKABLE)->asImg(16, ['class' => 'text-bottom']) ?> + <?= Icon::create('filter2')->asImg(['class' => 'text-bottom']) ?> (<?= $percentage ?>% | <?= (int) ($results[$key] ?? 0) ?>/<?= $countAnswers ?>) </a> <? else : ?> diff --git a/app/views/questionnaire/widget.php b/app/views/questionnaire/widget.php index 6d7f4b3effe3597da6a6385bb3577556c49c19f2..1ea5d855b97b261d11bbf5571bf7a64cfb36ef32 100644 --- a/app/views/questionnaire/widget.php +++ b/app/views/questionnaire/widget.php @@ -2,7 +2,7 @@ <article class="studip questionnaire_widget" id="questionnaire_area"> <header> <h1> - <?= Icon::create("evaluation", "info")->asimg("16px", ['class' => "text-bottom"]) ?> + <?= Icon::create('evaluation', Icon:ROLE_INFO)->asimg(['class' => 'text-bottom']) ?> <?= _('Fragebögen') ?> </h1> <nav> @@ -10,17 +10,17 @@ <? if ($statusgruppen_ids): ?> <a href="<?= $controller->link_for('questionnaire/add_to_context') ?>" data-dialog="size=auto" title="<?= _('Fragebogen hinzufügen') ?>" aria-label="<?= _('Fragebogen hinzufügen') ?>"> - <?= Icon::create("add", "clickable")->asimg("16px", ['class' => "text-bottom"]) ?> + <?= Icon::create('add')->asimg(['class' => 'text-bottom']) ?> </a> <? else: ?> <a href="<?= $controller->link_for('questionnaire/edit', compact('range_type', 'range_id')) ?>" data-dialog title="<?= _('Fragebogen hinzufügen') ?>" aria-label="<?= _('Fragebogen hinzufügen') ?>"> - <?= Icon::create("add", "clickable")->asimg("16px", ['class' => "text-bottom"]) ?> + <?= Icon::create('add')->asimg(['class' => 'text-bottom']) ?> </a> <? endif ?> <a href="<?= URLHelper::getLink("dispatch.php/questionnaire/" . ($range_type == 'course' || $range_type == 'institute' ? 'course' : ''). "overview") ?>" title="<?= _('Fragebögen verwalten') ?>" aria-label="<?= _('Fragebögen verwalten') ?>"> - <?= Icon::create("admin", "clickable")->asimg("16px", ['class' => "text-bottom"]) ?> + <?= Icon::create('admin')->asimg(['class' => 'text-bottom']) ?> </a> <? endif ?> </nav> diff --git a/app/views/resources/_common/building.php b/app/views/resources/_common/building.php index 7eae0325c9b8851ae6df47808674a037b0c1fa13..ae914da92cb0b703514afe420992c5dcf7e0f510 100644 --- a/app/views/resources/_common/building.php +++ b/app/views/resources/_common/building.php @@ -16,7 +16,7 @@ <a href="<?= ResourceManager::getMapUrlForResourcePosition( $building->geo_coordinates ) ?>"> - <?= Icon::create('place')->asImg(16) ?> + <?= Icon::create('place') ?> </a> </dd> <dt><?= _('Verantwortliche Person') ?></dt> diff --git a/app/views/resources/_common/location.php b/app/views/resources/_common/location.php index c9f8735fa4f371a5b467acab05d23f6ee741527c..9ab869596b49a22636467b1b1ed6c7d1c18ad05f 100644 --- a/app/views/resources/_common/location.php +++ b/app/views/resources/_common/location.php @@ -11,7 +11,7 @@ <a href="<?= ResourceManager::getMapUrlForResourcePosition( $location->geo_coordinates ) ?>"> - <?= Icon::create('place')->asImg(16) ?> + <?= Icon::create('place') ?> </a> </dd> </dl> diff --git a/app/views/resources/admin/categories.php b/app/views/resources/admin/categories.php index 7f04d7961f10369693faeb864d8899b82a112e7d..185033d140bdfbf4efd2971afdd65c4a74dab19d 100644 --- a/app/views/resources/admin/categories.php +++ b/app/views/resources/admin/categories.php @@ -20,7 +20,7 @@ <? foreach ($categories as $category): ?> <tr> <td> - <?= $category->getIcon()->asImg(20) ?> + <?= $category->getIcon() ?> </td> <td><?= htmlReady($category->name) ?></td> <td><?= htmlReady($category->class_name) ?></td> diff --git a/app/views/resources/category/_add_edit_form.php b/app/views/resources/category/_add_edit_form.php index d5e0853d32136391e14526556661d0f71a3b3032..148107af722333e7c154d98d5a16d502335e1315 100644 --- a/app/views/resources/category/_add_edit_form.php +++ b/app/views/resources/category/_add_edit_form.php @@ -76,7 +76,7 @@ ) ?> <? else : ?> <a title="<?= _('Löschen') ?>" class="delete-action"> - <?= Icon::create('trash')->asImg(20) ?> + <?= Icon::create('trash') ?> </a> <? endif ?> </td> @@ -103,7 +103,7 @@ </td> <td class="actions"> <a title="<?= _('Löschen') ?>" class="delete-action"> - <?= Icon::create('trash')->asImg(20) ?> + <?= Icon::create('trash') ?> </a> </td> </tr> @@ -127,7 +127,7 @@ </td> <td class="actions"> <a title="<?= _('Löschen') ?>" class="delete-action"> - <?= Icon::create('trash')->asImg(20) ?> + <?= Icon::create('trash') ?> </a> </td> </tr> @@ -143,7 +143,7 @@ </option> <? endforeach ?> </select> - <?= Icon::create('add')->asImg(20, ['class' => 'add-action']) ?> + <?= Icon::create('add')->asImg(['class' => 'add-action']) ?> </td> </tr> </tfoot> diff --git a/app/views/room_management/planning/copy_bookings.php b/app/views/room_management/planning/copy_bookings.php index 5f2ce6ee372c11109114276597a995166d326235..d704e6802ba98c69246f7fcbcdce93a4f97b5376 100644 --- a/app/views/room_management/planning/copy_bookings.php +++ b/app/views/room_management/planning/copy_bookings.php @@ -207,17 +207,9 @@ </td> <td> <?= Icon::create( - ( - $data['available'] - ? 'accept' - : 'decline' - ), - ( - $data['available'] - ? 'status-green' - : 'status-red' - ) - )->asImg('20px', ['class' => 'text-bottom']) ?> + $data['available'] ? 'accept' : 'decline', + $data['available'] ? Icon::ROLE_STATUS_GREEN : Icon::ROLE_STATUS_RED + )->asImg(['class' => 'text-bottom']) ?> </td> </tr> <? endforeach ?> diff --git a/app/views/score/index.php b/app/views/score/index.php index 3e9a4a037fa8308196a8a24b578c9fed4b612ee0..d404c66204472def27aa1c749ea231b74d80d588 100644 --- a/app/views/score/index.php +++ b/app/views/score/index.php @@ -55,12 +55,12 @@ <?= htmlReady($person['fullname']) ?> </a> <? foreach ($person['is_king'] as $type => $text): ?> - <?= Icon::create('crown', Icon::ROLE_SORT, ['title' => $text])->asImg(16, ["alt" => $text, "class" => 'text-top']) ?> + <?= Icon::create('crown', Icon::ROLE_SORT)->asImg(['title' => $text, 'alt' => $text, 'class' => 'text-top']) ?> <? endforeach ?> </td> <td class="hidden-small-down"> <? - $content = Assets::img('blank.gif', ['width' => 16]) . ' '; + $content = Assets::img('blank.gif', ['width' => Icon::SIZE_DEFAULT]) . ' '; // News if (!empty($person['newscount'])) { @@ -71,7 +71,7 @@ Icon::create('news', Icon::ROLE_CLICKABLE, ['title' => $tmp])->asImg() ); } else { - $content .= Assets::img('blank.gif', ['width' => 16]) . ' '; + $content .= Assets::img('blank.gif', ['width' => Icon::SIZE_DEFAULT]) . ' '; } // Votes @@ -83,7 +83,7 @@ Icon::create('vote', Icon::ROLE_CLICKABLE, ['title' => $tmp])->asImg() ); } else { - $content .= Assets::img('blank.gif', ['width' => 16]) . ' '; + $content .= Assets::img('blank.gif', ['width' => Icon::SIZE_DEFAULT]) . ' '; } // Termine @@ -95,10 +95,10 @@ Icon::create('schedule', Icon::ROLE_CLICKABLE, ['title' => $tmp])->asImg() ); } else { - $content .= Assets::img('blank.gif', ['width' => 16]) . ' '; + $content .= Assets::img('blank.gif', ['width' => Icon::SIZE_DEFAULT]) . ' '; } - $content .= Assets::img('blank.gif', ['width' => 16]) . ' '; + $content .= Assets::img('blank.gif', ['width' => Icon::SIZE_DEFAULT]) . ' '; echo $content; ?> @@ -109,7 +109,7 @@ <? if($person['user_id'] == $GLOBALS['user']->id): ?> <a href="<?= $controller->url_for('score/unpublish') ?>"> <?= Icon::create('trash', Icon::ROLE_CLICKABLE, ['title' => _('Ihren Wert von der Liste löschen')]) - ->asImg(16, ["class" => 'text-top']) + ->asImg(["class" => 'text-top']) ?> </a> <? endif; ?> diff --git a/app/views/search/module/_drill_down_list.php b/app/views/search/module/_drill_down_list.php index bcb73c10a74c6572bbc10a50832162407684f1c8..b8a8b67b4e85e45f86a207fb0d5d1ee4173dff9d 100644 --- a/app/views/search/module/_drill_down_list.php +++ b/app/views/search/module/_drill_down_list.php @@ -6,31 +6,8 @@ </a> </div> <? endif; ?> -<? /* -<dl style="margin:0;"> -<? foreach ($lists as $list) : ?> - <? if (count($list['objects'])) : ?> - <dt style="font-weight:bold;margin:5px 0;"><?= $list['name'] ?></dt> - <dd> - <ul style="list-style-type:none; margin:0; padding:0;"> - <? foreach ($list['objects'] as $object) : ?> - <li style="margin:5px 0;"> - <a href="<?= $controller->url_for('search/module/drilldown', array('type' => get_class($object), 'id' => $object->getId())) ?>"> - <?= htmlReady($object->getDisplayName()) . ' (' . /*$object->count_module .*/ ')' ?> - <? /* <? if ($object->getId() == $drill_down_id) : ?> - <?= Icon::create('accept', 'clickable', array('title' => _('Bereich ausgewählt')))->asImg(); ?> - <? endif; ?> - </a> - </li> - <? endforeach; ?> - </ul> - </dd> - <? endif; ?> -<? endforeach; ?> -</dl> - */ ?> - - + + <form action="<?= $controller->action_link('index') ?>" method="post"> <select name="actlist" style="margin:0;" class="submit-upon-select"> <? foreach ($lists as $lname => $list) : ?> @@ -55,4 +32,4 @@ </ul> </dd> <? endif; ?> -</dl> \ No newline at end of file +</dl> diff --git a/app/views/settings/categories.php b/app/views/settings/categories.php index 640c81119d8bf3f7e5a451f1668cf630cddc0fbd..2bbbd5006f3001e7774a19c59f4263f8e5b9a3bf 100644 --- a/app/views/settings/categories.php +++ b/app/views/settings/categories.php @@ -16,22 +16,22 @@ <span> <? if ($index > 0): ?> <a href="<?= $controller->url_for('settings/categories/swap', $category->id, $last->id) ?>"> - <?= Icon::create('arr_2up', 'sort')->asImg(['class' => 'text-top', 'title' =>_('Kategorie nach oben verschieben')]) ?> + <?= Icon::create('arr_2up', Icon::ROLE_SORT)->asImg(['class' => 'text-bottom', 'title' =>_('Kategorie nach oben verschieben')]) ?> </a> <? else: ?> - <?= Icon::create('arr_2up', 'inactive')->asImg(['class' => 'text-top']) ?> + <?= Icon::create('arr_2up', Icon::ROLE_INACTIVE)->asImg(['class' => 'text-bottom']) ?> <? endif; ?> <? if ($index < $count - 1): ?> <a href="<?= $controller->url_for('settings/categories/swap', $category->id, $categories[$index + 1]->id) ?>"> - <?= Icon::create('arr_2down', 'sort')->asImg(['class' => 'text-top', 'title' =>_('Kategorie nach unten verschieben')]) ?> + <?= Icon::create('arr_2down', Icon::ROLE_SORT)->asImg(['class' => 'text-bottom', 'title' =>_('Kategorie nach unten verschieben')]) ?> </a> <? else: ?> - <?= Icon::create('arr_2down', 'inactive')->asImg(['class' => 'text-top']) ?> + <?= Icon::create('arr_2down', Icon::ROLE_INACTIVE)->asImg(['class' => 'text-bottom']) ?> <? endif; ?> <a href="<?= $controller->url_for('settings/categories/delete', $category->id) ?>"> - <?= Icon::create('trash')->asImg(['class' => 'text-top', 'title' => _('Kategorie löschen')]) ?> + <?= Icon::create('trash')->asImg(['class' => 'text-bottom', 'title' => _('Kategorie löschen')]) ?> </a> </span> </legend> diff --git a/app/views/settings/statusgruppen/modify.php b/app/views/settings/statusgruppen/modify.php index 9c82ac1597331288af7f53f80f101da8503423de..cea3eaf3608af506c21805f7f0d79393819942df 100644 --- a/app/views/settings/statusgruppen/modify.php +++ b/app/views/settings/statusgruppen/modify.php @@ -32,7 +32,7 @@ $default_entries = DataFieldEntry::getDataFieldEntries([$user->user_id, $inst_id </td> <td style="text-align: right"> <a href="<?= $controller->url_for('settings/statusgruppen/default', $inst_id, $role_id, $id, true) ?>"> - <?= Icon::create('checkbox-unchecked', 'clickable', ['title' => _('Diese Daten von den Standarddaten übernehmen')])->asImg(16, ["class" => 'text-top']) ?> + <?= Icon::create('checkbox-unchecked')->asImg(['title' => _('Diese Daten von den Standarddaten übernehmen'), 'class' => 'text-top']) ?> </a> </td> <? elseif ($entry->getValue() == 'default_value'): ?> @@ -42,7 +42,7 @@ $default_entries = DataFieldEntry::getDataFieldEntries([$user->user_id, $inst_id </td> <td style="text-align:right"> <? if ($entry->isEditable() && !$locked): ?> - <a href="<?= $controller->url_for('settings/statusgruppen/default', $inst_id, $role_id, $id, false) ?>"> <?= Icon::create('checkbox-checked', 'clickable', ['title' => _('Diese Daten NICHT von den Standarddaten übernehmen')])->asImg(16, ["class" => 'text-top']) ?> + <a href="<?= $controller->link_for('settings/statusgruppen/default', $inst_id, $role_id, $id, false) ?>"> <?= Icon::create('checkbox-checked')->asImg(['title' => _('Diese Daten NICHT von den Standarddaten übernehmen'), 'class' => 'text-top']) ?> </a> <? endif; ?> </td> diff --git a/app/views/studiengaenge/versionen/abschnitte.php b/app/views/studiengaenge/versionen/abschnitte.php index 83c1173e2060c85617e8ea05d83bcd5db48276bc..d4decdd08fb4e3063eb185e84ccadcfb25d25909 100644 --- a/app/views/studiengaenge/versionen/abschnitte.php +++ b/app/views/studiengaenge/versionen/abschnitte.php @@ -32,8 +32,8 @@ <? $actionMenu->addLink( $controller->action_url('abschnitt/' . $abschnitt->id), _('Studiengangteil-Abschnitt bearbeiten'), - Icon::create('edit', Icon::ROLE_CLICKABLE, tooltip2(_('Studiengangteil-Abschnitt bearbeiten'))), - ['data-dialog' => true]) + Icon::create('edit'), + tooltip2(_('Studiengangteil-Abschnitt bearbeiten')) + ['data-dialog' => true]) ?> <? endif; ?> <? if (MvvPerm::haveFieldPermAbschnitte($version, MvvPerm::PERM_CREATE)) : ?> @@ -41,8 +41,8 @@ <? $actionMenu->addButton( 'delete', _('Studiengangteil-Abschnitt löschen'), - Icon::create('trash', Icon::ROLE_CLICKABLE, tooltip2(_('Studiengangteil-Abschnitt löschen'))), - [ + Icon::create('trash'), + tooltip2(_('Studiengangteil-Abschnitt löschen')) + [ 'formaction' => $controller->action_url('delete_abschnitt/' . $abschnitt->id), 'data-confirm' => sprintf(_('Wollen Sie den Studiengangteil-Abschnitt "%s" wirklich löschen?'), $abschnitt->getDisplayName()) ] diff --git a/app/views/userfilter/filter/configure.php b/app/views/userfilter/filter/configure.php index 59155c06f3163d01c296eb14b0d061334f332677..6b824ab57bf0c04d2ab00d1ab6ed6c142122658d 100644 --- a/app/views/userfilter/filter/configure.php +++ b/app/views/userfilter/filter/configure.php @@ -6,7 +6,7 @@ use Studip\Button, Studip\LinkButton; </div> <br/> <a href="#" onclick="return STUDIP.UserFilter.addConditionField('conditionfields', '<?= $controller->url_for('userfilter/field/configure') ?>')"> - <?= Icon::create('add', 'clickable')->asImg(16, ["alt" => _('Auswahlfeld hinzufügen')]) ?> + <?= Icon::create('add')->asImg(['alt' => _('Auswahlfeld hinzufügen')]) ?> <?php $text = _('Auswahlfeld hinzufügen'); echo $text; diff --git a/lib/admissionrules/preferentialadmission/templates/configure.php b/lib/admissionrules/preferentialadmission/templates/configure.php index c31575c1d24b91560c62bea7de50f946ef0b453e..1568caffb9c74da97bb8f350b2e561bb414de648 100644 --- a/lib/admissionrules/preferentialadmission/templates/configure.php +++ b/lib/admissionrules/preferentialadmission/templates/configure.php @@ -27,7 +27,7 @@ <a href="<?= URLHelper::getURL('dispatch.php/userfilter/filter/configure/prefadmission_conditions') ?>" onclick="return STUDIP.UserFilter.configureCondition('condition', '<?= URLHelper::getLink('dispatch.php/userfilter/filter/configure/prefadmission_conditions') ?>')"> - <?= Icon::create('add', 'clickable', ['title' => _('Bedingung hinzufügen')])->asImg(16, ["alt" => _('Bedingung hinzufügen')]) ?> + <?= Icon::create('add')->asImg(['title' => _('Bedingung hinzufügen'), 'alt' => _('Bedingung hinzufügen')]) ?> <?= _('Bedingung hinzufügen') ?> </a> </div> diff --git a/lib/classes/HTMLAttributes.php b/lib/classes/HTMLAttributes.php new file mode 100644 index 0000000000000000000000000000000000000000..d9500d1e6203ae05a2057d9b7693393c8ba7dfff --- /dev/null +++ b/lib/classes/HTMLAttributes.php @@ -0,0 +1,218 @@ +<?php +/** + * @author Jan-Hendrik Willms <tleilax+studip@gmail.com> + * @license GPL2 or any later version + * @since Stud.IP 5.5 + */ +class HTMLAttributes implements Stringable, ArrayAccess +{ + protected static $handlers = [ + 'class' => [self::class, 'handleCSSClass'], + 'style' => [self::class, 'handleCSSStyle'], + ]; + + public static function from(array $attributes): HTMLAttributes + { + return new static($attributes); + } + + public static function merge(array ...$attr): HTMLAttributes + { + $result = new static(array_pop($attr)); + foreach ($attr as $a) { + $result->addAttributes($a); + } + return $result; + } + + public static function addHandler(string $key, callable $handler): void + { + $key = self::sanitizeKey($key); + self::$handlers[$key] = $handler; + } + + public static function removeHandler(string $key): void + { + $key = self::sanitizeKey($key); + if (isset(self::$handlers[$key])) { + unset(self::$handlers[$key]); + } + } + + public static function sanitizeKey(string $key): string + { + return strtolower(trim($key)); + } + + public static function handleCSSClass($value, string $previous, bool $replace = false): string + { + $classes = []; + if (!$replace) { + $classes = explode(' ', $previous); + $classes = array_filter($classes); + } + + foreach ((array) $value as $class) { + if (!in_array($class, $classes)) { + $classes[] = $class; + } + } + + return implode(' ', $classes); + } + + public static function parseCSSStyles(string $style): array + { + $temp = explode(';', $style); + $temp = array_filter($temp); + + $styles = []; + foreach ($temp as $item) { + [$k, $v] = array_map('trim', explode(':', $item, 2)); + $styles[$k] = $v; + } + return $styles; + } + + public static function renderCSSStyles(array $styles): string + { + $rows = []; + foreach ($styles as $key => $value) { + $rows[] = "{$key}:{$value}"; + } + return implode(';', $rows); + } + + public static function handleCSSStyle($value, string $previous, bool $replace = false): string + { + $styles = array_merge( + $replace ? [] : self::parseCSSStyles($previous), + self::parseCSSStyles($value) + ); + return self::renderCSSStyles($styles); + } + + protected $attributes = []; + + final public function __construct(array $attributes = []) + { + $this->addAttributes($attributes); + } + + public function isAttributeValid($value, ?string $key = null): bool + { + return isset($value) && $value !== false; + } + + public function hasAttribute(string $key): bool + { + $key = $this->sanitizeKey($key); + return isset($this->attributes[$key]); + } + + public function setAttribute(string $key, $value): void + { + $this->addAttribute($key, $value, true); + } + + public function addAttribute(string $key, $value, bool $replace = false): bool + { + $key = $this->sanitizeKey($key); + + if (!$this->isAttributeValid($value, $key)) { + return false; + } + + if (isset(self::$handlers[$key])) { + $this->attributes[$key] = self::$handlers[$key]($value, $this->attributes[$key] ?? '', $replace); + } else { + $this->attributes[$key] = $value; + } + + return true; + } + + public function setAttributes(array $attributes): void + { + $this->addAttributes($attributes, true); + } + + public function addAttributes(array $attributes, bool $replace = false): void + { + foreach ($attributes as $key => $value) { + $this->addAttribute($key, $value, $replace); + } + } + + public function getAttribute(string $key) + { + if (!$this->hasAttribute($key)) { + return null; + } + + $key = $this->sanitizeKey($key); + return $this->attributes[$key]; + } + + public function getAttributes(): array + { + return $this->attributes; + } + + public function removeAttribute(string $key): bool + { + if (!$this->hasAttribute($key)) { + return false; + } + + $key = $this->sanitizeKey($key); + unset($this->attributes[$key]); + return true; + } + + public function asString(): string + { + // Filter empty attributes + $attributes = array_filter($this->attributes, function ($value) { + return isset($value) && $value !== false; + }); + + // Actual conversion + $result = []; + foreach ($attributes as $key => $value) { + if ($value === true) { + $result[] = htmlReady($key); + } else { + $result[] = sprintf('%s="%s"', htmlReady($key), htmlReady($value)); + } + } + return implode(' ', $result); + } + + public function __toString() + { + return $this->asString(); + } + + # ArrayAccess + + public function offsetExists($offset): bool + { + return $this->hasAttribute($offset); + } + + public function offsetGet($offset): mixed + { + return $this->getAttribute($offset); + } + + public function offsetSet($offset, $value): void + { + $this->addAttribute($offset, $value); + } + + public function offsetUnset($offset): void + { + $this->removeAttribute($offset); + } +} diff --git a/lib/classes/Icon.php b/lib/classes/Icon.php index fd2a25b5e9aedb217c0de2ac703e873422a91115..ad1327cbddc1470ba08ee2b3dbf90d41ae1d42e9 100644 --- a/lib/classes/Icon.php +++ b/lib/classes/Icon.php @@ -11,37 +11,41 @@ */ class Icon implements JsonSerializable { - const SVG = 1; - const CSS_BACKGROUND = 4; - const INPUT = 256; - - const DEFAULT_SIZE = 16; - const DEFAULT_COLOR = 'blue'; - const DEFAULT_ROLE = 'clickable'; - - const ROLE_INFO = 'info'; - const ROLE_CLICKABLE = 'clickable'; - const ROLE_ACCEPT = 'accept'; - const ROLE_STATUS_GREEN = 'status-green'; - const ROLE_INACTIVE = 'inactive'; - const ROLE_NAVIGATION = 'navigation'; - const ROLE_NEW = 'new'; - const ROLE_ATTENTION = 'attention'; - const ROLE_STATUS_RED = 'status-red'; - const ROLE_INFO_ALT = 'info_alt'; - const ROLE_SORT = 'sort'; - const ROLE_STATUS_YELLOW = 'status-yellow'; - - - protected $shape; - protected $role; - protected $attributes = []; + public const SVG = 1; + public const CSS_BACKGROUND = 4; + public const INPUT = 256; + + public const SIZE_DEFAULT = 20; + public const SIZE_INLINE = 16; + public const SIZE_BUTTON = self::SIZE_INLINE; + public const SIZE_FILES_TABLE = 26; + public const SIZE_LARGE = 32; + + public const DEFAULT_COLOR = 'blue'; + public const DEFAULT_ROLE = 'clickable'; + + public const ROLE_INFO = 'info'; + public const ROLE_CLICKABLE = 'clickable'; + public const ROLE_ACCEPT = 'accept'; + public const ROLE_STATUS_GREEN = 'status-green'; + public const ROLE_INACTIVE = 'inactive'; + public const ROLE_NAVIGATION = 'navigation'; + public const ROLE_NEW = 'new'; + public const ROLE_ATTENTION = 'attention'; + public const ROLE_STATUS_RED = 'status-red'; + public const ROLE_INFO_ALT = 'info_alt'; + public const ROLE_SORT = 'sort'; + public const ROLE_STATUS_YELLOW = 'status-yellow'; + + protected string $shape; + protected string $role; + protected array $attributes = []; /** * This is the magical Role to Color mapping. */ - private static $roles_to_colors = [ + private static array $roles_to_colors = [ self::ROLE_INFO => 'black', self::ROLE_CLICKABLE => 'blue', self::ROLE_ACCEPT => 'green', @@ -213,7 +217,7 @@ class Icon implements JsonSerializable public function asImg($size = null, $view_attributes = []) { if (is_array($size)) { - list($view_attributes, $size) = [$size, null]; + [$view_attributes, $size] = [$size, null]; } return sprintf( '<img %s>', @@ -235,7 +239,7 @@ class Icon implements JsonSerializable public function asInput($size = null, $view_attributes = []) { if (is_array($size)) { - list($view_attributes, $size) = [$size, null]; + [$view_attributes, $size] = [$size, null]; } return sprintf( '<input type="image" %s>', @@ -253,18 +257,20 @@ class Icon implements JsonSerializable */ public function asCSS($size = null) { + $size = $this->get_size($size); + if (self::isStatic($this->shape)) { return sprintf( 'background-image:url(%1$s);background-size:%2$upx %2$upx;', $this->shapeToPath($this->shape), - $this->get_size($size) + $size ); } return sprintf( - 'background-image:url(%1$s);background-size:%2$upx %2$upx;', + 'background-image:url(%1$s);background-size:%2$s %2$s;', $this->get_asset_svg(), - $this->get_size($size) + $size === self::SIZE_DEFAULT ? 'var(--icon-size-default)' : "{$size}px" ); } @@ -322,33 +328,36 @@ class Icon implements JsonSerializable * @param array $attributes Additional attributes * @return Array containing the merged attributes */ - private function prepareHTMLAttributes($size, $attributes) + private function prepareHTMLAttributes($size, array $attributes) { - $dimensions = []; + $html_attributes = HTMLAttributes::merge($this->attributes, $attributes); + if ($size !== false) { $size = $this->get_size($size); - $dimensions = ['width' => $size, 'height' => $size]; + if ($size !== self::SIZE_DEFAULT && $size !== self::SIZE_INLINE) { + $html_attributes['style'] = "width: {$size}px; height: {$size}px"; + } } - $result = array_merge($this->attributes, $attributes, $dimensions, [ - 'src' => self::isStatic($this->shape) ? $this->shape : $this->get_asset_svg(), - ]); + $html_attributes['src'] = self::isStatic($this->shape) ? $this->shape : $this->get_asset_svg(); - if (!isset($result['alt']) && !isset($result['title'])) { + if (!isset($html_attributes['alt']) && !isset($html_attributes['title'])) { //Add an empty alt attribute to prevent screen readers from //reading the URL of the icon: - $result['alt'] = ''; + $html_attributes['alt'] = ''; } - $classNames = 'icon-role-' . $this->role; + $html_attributes['class'] = ['studip-icon', "icon-role-{$this->role}"]; - if (!self::isStatic($this->shape)) { - $classNames .= ' icon-shape-' . $this->shapeToPath($this->shape); + if ((int)$size === self::SIZE_INLINE) { + $html_attributes['class'] = 'studip-icon-inline'; } - $result['class'] = isset($result['class']) ? $result['class'] . ' ' . $classNames : $classNames; + if (!self::isStatic($this->shape)) { + $html_attributes['class'] = 'icon-shape-' . $this->shapeToPath($this->shape); + } - return $result; + return $html_attributes->getAttributes(); } /** @@ -371,7 +380,7 @@ class Icon implements JsonSerializable */ protected function get_size($size) { - $size = $size ?: Icon::DEFAULT_SIZE; + $size = $size ?: Icon::SIZE_DEFAULT; if (isset($this->attributes['size'])) { $parts = explode('@', $this->attributes['size'], 2); $size = $parts[0]; diff --git a/lib/classes/MyRealmModel.php b/lib/classes/MyRealmModel.php index 3dd7d8642408fb2c3bdefdd56dde04643573b4ea..54252881a1d4ebda39d30d5440148f538be67eb3 100644 --- a/lib/classes/MyRealmModel.php +++ b/lib/classes/MyRealmModel.php @@ -109,7 +109,8 @@ class MyRealmModel ])); $nav->setBadgeNumber($neue); } else if ($count) { - $nav->setImage(Icon::create('vote', Icon::ROLE_CLICKABLE, [ + $nav->setImage(Icon::create('vote')); + $nav->setLinkAttributes([ 'title' => sprintf( ngettext( '%u Fragebogen', @@ -118,7 +119,7 @@ class MyRealmModel ), $count ) - ])); + ]); } return $nav; } diff --git a/lib/filesystem/FilesystemVueDataManager.php b/lib/filesystem/FilesystemVueDataManager.php index 28670bf197cfd024a64e9b9cbe3fdd1dff2a68fa..f3c3c6b1cbd4619b426e204ef6d26e21c50a9582 100644 --- a/lib/filesystem/FilesystemVueDataManager.php +++ b/lib/filesystem/FilesystemVueDataManager.php @@ -62,14 +62,14 @@ class FilesystemVueDataManager $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/details/' . $folder->getId()), _('Info'), - Icon::create('info-circle', 'clickable', ['size' => 20]), + Icon::create('info-circle'), ['data-dialog' => '1'] ); if ($folder->isEditable($GLOBALS['user']->id)) { $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/edit_folder/' . $folder->getId()), _('Ordner bearbeiten'), - Icon::create('edit', 'clickable', ['size' => 20]), + Icon::create('edit'), ['data-dialog' => '1'] ); } @@ -77,26 +77,26 @@ class FilesystemVueDataManager $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/download_folder/' . $folder->getId()), _('Ordner herunterladen'), - Icon::create('download', 'clickable', ['size' => 20]) + Icon::create('download') ); } if ($folder->isEditable($GLOBALS['user']->id)) { $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/choose_destination/move/' . $folder->getId(), ['isfolder' => 1]), _('Ordner verschieben'), - Icon::create('arr_1right', 'clickable', ['size' => 20]), + Icon::create('arr_1right'), ['data-dialog' => 'size=auto'] ); $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/choose_destination/copy/' . $folder->getId(), ['isfolder' => 1]), _('Ordner kopieren'), - Icon::create('clipboard', 'clickable', ['size' => 20]), + Icon::create('clipboard'), ['data-dialog' => 'size=auto'] ); $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/delete_folder/' . $folder->getId()), _('Ordner löschen'), - Icon::create('trash', 'clickable', ['size' => 20]), + Icon::create('trash'), ['onclick' => "return STUDIP.Dialog.confirmAsPost('" . sprintf(_('Soll der Ordner "%s" wirklich gelöscht werden?'), htmlReady($folder->name)) . "', this.href);"] ); } diff --git a/lib/filesystem/LibraryFile.php b/lib/filesystem/LibraryFile.php index 8de46f8aa77bdaf1f1444c62045186e29a803ef5..d2e26cbc7c60fc9e0b7e3522fdfb3d85dc8d1f62 100644 --- a/lib/filesystem/LibraryFile.php +++ b/lib/filesystem/LibraryFile.php @@ -206,7 +206,7 @@ class LibraryFile extends StandardFile $action_menu->addLink( URLHelper::getURL(sprintf('dispatch.php/file/details/%s/1', $this->fileref->id)), _('Info'), - Icon::create('info-circle', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('info-circle'), ['data-dialog' => ''], 'file-display-info' ); @@ -237,14 +237,14 @@ class LibraryFile extends StandardFile $action_menu->addLink( URLHelper::getURL('dispatch.php/library_file/edit/' . $this->fileref->id), _('Bearbeiten'), - Icon::create('edit', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('edit'), ['data-dialog' => 'size=auto'] ); } $action_menu->addButton( 'delete', _('Datei löschen'), - Icon::create('trash', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('trash'), [ 'formaction' => URLHelper::getURL("dispatch.php/file/delete/{$this->fileref->id}"), 'data-confirm' => sprintf(_('Soll die Datei "%s" wirklich gelöscht werden?'), $this->fileref->name), diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php index 4eb31408402efb8ba3b71f56899b88d996fd59d7..b11e2f592b77eebfb71f67a948b7858d162c7a01 100644 --- a/lib/filesystem/StandardFile.php +++ b/lib/filesystem/StandardFile.php @@ -236,7 +236,7 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface $actionMenu->addLink( URLHelper::getURL("dispatch.php/file/details/{$this->fileref->id}/1"), _('Info'), - Icon::create('info-circle', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('info-circle'), ['data-dialog' => ''], 'file-display-info' ); @@ -244,14 +244,14 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/edit/' . $this->fileref->id), _('Datei bearbeiten'), - Icon::create('edit', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('edit'), ['data-dialog' => ''], 'file-edit' ); $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/update/' . $this->fileref->id), _('Datei aktualisieren'), - Icon::create('refresh', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('refresh'), ['data-dialog' => ''], 'file-update' ); @@ -260,7 +260,7 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/choose_destination/move/' . $this->fileref->id), _('Datei verschieben'), - Icon::create('arr_1right', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('arr_1right'), ['data-dialog' => 'size=auto'], 'file-move' ); @@ -269,7 +269,7 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/choose_destination/copy/' . $this->fileref->id), _('Datei kopieren'), - Icon::create('files', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('files'), ['data-dialog' => 'size=auto'], 'file-copy' ); @@ -314,7 +314,7 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface $actionMenu->addLink( URLHelper::getURL('dispatch.php/course/feedback/create_form/'. $this->fileref->id . '/FileRef'), _('Neues Feedback-Element'), - Icon::create('star', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('star'), ['data-dialog' => '1'] ); } @@ -323,7 +323,7 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface $actionMenu->addButton( 'delete', _('Datei löschen'), - Icon::create('trash', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('trash'), [ 'formaction' => URLHelper::getURL("dispatch.php/file/delete/{$this->fileref->id}"), 'data-confirm' => sprintf(_('Soll die Datei "%s" wirklich gelöscht werden?'), $this->fileref->name), diff --git a/lib/filesystem/URLFile.php b/lib/filesystem/URLFile.php index 3a5b15c22dad1bb6568cce0635c1395445480114..9046853dfe2fc86cbdb30099cf91b669d1c51704 100644 --- a/lib/filesystem/URLFile.php +++ b/lib/filesystem/URLFile.php @@ -81,7 +81,7 @@ class URLFile extends StandardFile $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/edit_urlfile/' . $this->fileref->id), _('Datei bearbeiten'), - Icon::create('edit', Icon::ROLE_CLICKABLE, ['size' => 20]), + Icon::create('edit'), ['data-dialog' => ''], 'file-edit' ); diff --git a/lib/models/PersonalNotifications.php b/lib/models/PersonalNotifications.php index c4230b8dd647fcc3e4c68f7fbeed67cdad9de78b..8ce1dba044500617eb7457fcc938101656de2a93 100644 --- a/lib/models/PersonalNotifications.php +++ b/lib/models/PersonalNotifications.php @@ -13,7 +13,7 @@ * $url_of_wiki_page, //when user A clicks this URL he/she should jump directly to the changed wiki-page * "User B changed wiki-page xyz", //a small text that describes the notification * "wiki_page_1234", //an (optional) html-id of the content of the wiki page. If the user is looking at the content already, the notification will disappear automatically - * Icon::create('wiki', 'clickable'), //an (optional) icon that is displayed next to the notification-text + * Icon::create('wiki'), //an (optional) icon that is displayed next to the notification-text * ); * * Appearing to the user, deleting by the user and so on of the notification is diff --git a/lib/modules/ActivityFeed.php b/lib/modules/ActivityFeed.php index e3ebe7ae10f1500b1b2a0f496f371a59007a0dc9..b57f4a1819d96d5a40ee1cd12fd329329ddaf991 100644 --- a/lib/modules/ActivityFeed.php +++ b/lib/modules/ActivityFeed.php @@ -27,11 +27,16 @@ class ActivityFeed extends CorePlugin implements PortalPlugin $template->config = UserConfig::get($GLOBALS['user']->id)->getValue('ACTIVITY_FEED'); $navigation = new Navigation('', 'dispatch.php/activityfeed/configuration'); - $navigation->setImage(Icon::create('edit', 'clickable', ["title" => _('Konfigurieren'), 'size' => 20]), ['data-dialog'=>'size=auto']); + $navigation->setImage(Icon::create('edit')); + $navigation->setLinkAttributes([ + 'data-dialog' =>'size=auto', + 'title' => _('Konfigurieren'), + ]); + $icons[] = $navigation; $navigation = new Navigation('', '#', ['cid' => null]); - $navigation->setImage(Icon::create('person-online', 'clickable')); + $navigation->setImage(Icon::create('person-online')); $navigation->setLinkAttributes([ 'id' => 'toggle-user-activities', 'title' => _('Eigene Aktivitäten ein-/ausblenden'), @@ -39,7 +44,7 @@ class ActivityFeed extends CorePlugin implements PortalPlugin $icons[] = $navigation; $navigation = new Navigation('', '#', ['cid' => null]); - $navigation->setImage(Icon::create('no-activity', 'clickable')); + $navigation->setImage(Icon::create('no-activity')); $navigation->setLinkAttributes([ 'id' => 'toggle-all-activities', 'title' => _('Aktivitätsdetails ein-/ausblenden'), diff --git a/lib/modules/Blubber.php b/lib/modules/Blubber.php index 4dd2f998e297c47fa1646a82a65e208d2559dd81..a07169fe677f2ff4c48c4782fd230a89666ee516 100644 --- a/lib/modules/Blubber.php +++ b/lib/modules/Blubber.php @@ -44,7 +44,8 @@ class Blubber extends CorePlugin implements StudipModule _('Blubber'), 'dispatch.php/course/messenger/course' ); - $icon->setImage(Icon::create('blubber', Icon::ROLE_CLICKABLE, ['title' => _('Blubber-Messenger')])); + $icon->setImage(Icon::create('blubber')); + $icon->setLinkAttributes(['title' => _('Blubber-Messenger')]); $condition = "INNER JOIN blubber_threads USING (thread_id) WHERE blubber_threads.context_type = 'course' @@ -124,7 +125,7 @@ class Blubber extends CorePlugin implements StudipModule 'category' => _('Kommunikation und Zusammenarbeit'), 'keywords' => _('Einfach Text schreiben und mit <Enter> abschicken; Direktes Kontaktieren anderer Stud.IP-NutzerInnen (@Vorname Nachname); Setzen von und Suche nach Stichworten über Hashtags (#Stichwort); Einbinden von Dateien per drag and drop'), 'icon' => Icon::create('blubber', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('blubber', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('blubber'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Blubber', 'pictures' => [ diff --git a/lib/modules/ConsultationModule.php b/lib/modules/ConsultationModule.php index c68f8ca2d5819642a1e25b8ba3f0ae578d2aa80a..2fcc8ad9b1eac1f9913c2e4dc22de4d078a49331 100644 --- a/lib/modules/ConsultationModule.php +++ b/lib/modules/ConsultationModule.php @@ -143,7 +143,7 @@ class ConsultationModule extends CorePlugin implements StudipModule, SystemPlugi 'keywords' => _('Terminvergabe, Sprechstunden'), 'displayname' => _('Terminvergabe'), 'icon' => Icon::create('consultation', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('consultation', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('consultation'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Terminvergabe', 'pictures' => [ diff --git a/lib/modules/CoreAdmin.php b/lib/modules/CoreAdmin.php index 8941cf24f06c00c747b9f32c3451afec63b536e9..4c0cc3c1fcd6abbae257d017f48bcdb11bdd98d4 100644 --- a/lib/modules/CoreAdmin.php +++ b/lib/modules/CoreAdmin.php @@ -15,7 +15,8 @@ class CoreAdmin extends CorePlugin implements StudipModule public function getIconNavigation($course_id, $last_visit, $user_id) { $navigation = new Navigation(_('Verwaltung'), 'dispatch.php/course/management'); - $navigation->setImage(Icon::create('admin', Icon::ROLE_CLICKABLE, ['title' => _('Verwaltung')])); + $navigation->setImage(Icon::create('admin')); + $navigation->setLinkAttributes(['title' => _('Verwaltung')]); return $navigation; } diff --git a/lib/modules/CoreCalendar.php b/lib/modules/CoreCalendar.php index 318a2ba7da89a9090d7a1a9d1262b9991e90f0bf..bc20bdbb205a406db3e59cd62cd1ddc1bf0e4d6a 100644 --- a/lib/modules/CoreCalendar.php +++ b/lib/modules/CoreCalendar.php @@ -21,7 +21,7 @@ class CoreCalendar extends CorePlugin implements StudipModule } $navigation = new Navigation(_('Kalender'), URLHelper::getURL('dispatch.php/calendar/calendar/course/' . $course_id)); - $navigation->setImage(Icon::create('schedule', Icon::ROLE_CLICKABLE)); + $navigation->setImage(Icon::create('schedule')); return $navigation; } diff --git a/lib/modules/CoreDocuments.php b/lib/modules/CoreDocuments.php index 96afa479dd758e188ac007962faeb85e24d6b6c4..3accbbef5c375f9ff59b44c297f2605dafc7ec67 100644 --- a/lib/modules/CoreDocuments.php +++ b/lib/modules/CoreDocuments.php @@ -25,7 +25,7 @@ class CoreDocuments extends CorePlugin implements StudipModule, OERModule */ public function oerGetIcon($role = Icon::ROLE_CLICKABLE) { - return Icon::create("file", $role); + return Icon::create('file', $role); } /** @@ -113,7 +113,8 @@ class CoreDocuments extends CorePlugin implements StudipModule, OERModule _('Dateibereich'), "dispatch.php/{$range_type}/files" ); - $navigation->setImage(Icon::create('files', Icon::ROLE_CLICKABLE, ['title' => _('Dateien')])); + $navigation->setImage(Icon::create('files')); + $navigation->setLinkAttributes(['title' => _('Dateien')]); $condition = "INNER JOIN folders ON (folders.id = file_refs.folder_id) WHERE folders.range_type = :range_type @@ -187,7 +188,7 @@ class CoreDocuments extends CorePlugin implements StudipModule, OERModule 'können Im Dateibereich bestimmte Rechte (r, w, x, f) für Studierende, wie z.B. das ' . 'Leserecht (r), festgelegt werden.'), 'icon' => Icon::create('files', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('files', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('files'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Dateibereich_-_Dateiordnerberechtigung', 'pictures' => [ diff --git a/lib/modules/CoreForum.php b/lib/modules/CoreForum.php index 0283a09df03c53cb2e2b9801eea275ac55c68f5e..3b3fb09abf7bc9badb2e5ddce355a0081435ee28 100644 --- a/lib/modules/CoreForum.php +++ b/lib/modules/CoreForum.php @@ -61,11 +61,12 @@ class CoreForum extends CorePlugin implements ForumModule $navigation = new Navigation('forum', 'dispatch.php/course/forum/index/enter_seminar'); $navigation->setBadgeNumber($num_entries); + $navigation->setLinkAttributes(['title' => $text]); if ($num_entries > 0) { - $navigation->setImage(Icon::create('forum', Icon::ROLE_ATTENTION, ['title' => $text])); + $navigation->setImage(Icon::create('forum', Icon::ROLE_ATTENTION)); } else { - $navigation->setImage(Icon::create('forum', Icon::ROLE_CLICKABLE, ['title' => $text])); + $navigation->setImage(Icon::create('forum')); } return $navigation; @@ -196,7 +197,7 @@ class CoreForum extends CorePlugin implements ForumModule 'category' => _('Kommunikation und Zusammenarbeit'), 'keywords' => _('Möglichkeit zum intensiven, nachhaltigen textbasierten Austausch; (nachträgliche) Strukturierung der Beiträge; Editierfunktion für Lehrende'), 'icon' => Icon::create('forum', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('forum', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('forum'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Forum', 'pictures' => [ diff --git a/lib/modules/CoreOverview.php b/lib/modules/CoreOverview.php index 81bb704f8919dfc6e02728d579b1944ab8299e35..e7798c8d2539fd57361fc916aa0650ddb507789f 100644 --- a/lib/modules/CoreOverview.php +++ b/lib/modules/CoreOverview.php @@ -56,7 +56,8 @@ class CoreOverview extends CorePlugin implements StudipModule ])); $nav->setBadgeNumber($result['neue']); } elseif ($result['count']) { - $nav->setImage(Icon::create('news', Icon::ROLE_CLICKABLE, [ + $nav->setImage(Icon::create('news')); + $nav->setLinkAttributes([ 'title' => sprintf( ngettext( '%d Ankündigung', @@ -65,7 +66,7 @@ class CoreOverview extends CorePlugin implements StudipModule ), $result['count'] ) - ])); + ]); } return $nav; } @@ -124,7 +125,7 @@ class CoreOverview extends CorePlugin implements StudipModule 'displayname' => _('Übersicht'), 'summary' => _('Ankündigungen, Termine, Fragebögen & Details'), 'icon' => Icon::create('home', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('home', Icon::ROLE_CLICKABLE) + 'icon_clickable' => Icon::create('home') ]; } diff --git a/lib/modules/CoreParticipants.php b/lib/modules/CoreParticipants.php index ddc0686dead7ecaa4825c247edc4795e652bdbbc..b26559808942d4514dc925910af715f4bc3ff67c 100644 --- a/lib/modules/CoreParticipants.php +++ b/lib/modules/CoreParticipants.php @@ -42,7 +42,7 @@ class CoreParticipants extends CorePlugin implements StudipModule $first_nav = reset($sub_nav); $navigation = new Navigation($first_nav->getTitle(), $first_nav->getURL()); - $navigation->setImage(Icon::create('persons', Icon::ROLE_CLICKABLE)); + $navigation->setImage(Icon::create('persons')); return $navigation; } @@ -59,7 +59,7 @@ class CoreParticipants extends CorePlugin implements StudipModule } $navigation = new Navigation(_('Teilnehmende'), $url); - $navigation->setImage(Icon::create('persons', Icon::ROLE_CLICKABLE)); + $navigation->setImage(Icon::create('persons')); // Check permission, show no indicator if not at least tutor if (!$GLOBALS['perm']->have_studip_perm('tutor', $course_id, $user_id)) { @@ -186,7 +186,7 @@ class CoreParticipants extends CorePlugin implements StudipModule 'bzw. einzelne Teilnehmende separat anzuschreiben.'), 'category' => _('Lehr- und Lernorganisation'), 'icon' => Icon::create('persons', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('persons', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('persons'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/TeilnehmerInnen', 'pictures' => [ diff --git a/lib/modules/CorePersonal.php b/lib/modules/CorePersonal.php index 71aaa6b728fa5f69aa883b71787c7200629733c4..48aa5b2505109a2be2cd731b6cbbe60a27b5583e 100644 --- a/lib/modules/CorePersonal.php +++ b/lib/modules/CorePersonal.php @@ -49,7 +49,7 @@ class CorePersonal extends CorePlugin implements StudipModule 'displayname' => _('MitarbeiterInnen'), 'category' => _('Sonstiges'), 'icon' => Icon::create('persons', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('persons', Icon::ROLE_CLICKABLE) + 'icon_clickable' => Icon::create('persons') ]; } diff --git a/lib/modules/CoreSchedule.php b/lib/modules/CoreSchedule.php index 17e6ee76d8ed9d9416c9bb9eebb056eabb481386..5c350cf5beefd0fd4c1e089855dbb8dfc8936147 100644 --- a/lib/modules/CoreSchedule.php +++ b/lib/modules/CoreSchedule.php @@ -51,7 +51,8 @@ class CoreSchedule extends CorePlugin implements StudipModule ])); $nav->setBadgeNumber($result['neue']); } else { - $nav->setImage(Icon::create('schedule', Icon::ROLE_CLICKABLE, [ + $nav->setImage(Icon::create('schedule')); + $nav->setLinkAttributes([ 'title' => sprintf( ngettext( '%d Termin', @@ -60,7 +61,7 @@ class CoreSchedule extends CorePlugin implements StudipModule ), $result['count'] ) - ])); + ]); } return $nav; } @@ -106,7 +107,7 @@ class CoreSchedule extends CorePlugin implements StudipModule 'inhaltlichen Einstimmung der Studierenden können Lehrende den Terminen ' . 'Themen hinzufügen, die z. B. eine Kurzbeschreibung der Inhalte darstellen.'), 'icon' => Icon::create('schedule', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('schedule', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('schedule'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Ablaufplan', 'pictures' => [ diff --git a/lib/modules/CoreScm.php b/lib/modules/CoreScm.php index db1131d804ac65c08350e93d22527cf42e61b6d4..d5838db51677e6ed653cf52202e27aab0b4fd533 100644 --- a/lib/modules/CoreScm.php +++ b/lib/modules/CoreScm.php @@ -49,7 +49,7 @@ class CoreScm extends CorePlugin implements StudipModule if ($result['count']) { if ($result['neue']) { - $image = Icon::create('infopage', Icon::ROLE_NEW); + $nav->setImage(Icon::create('infopage', Icon::ROLE_NEW)); $nav->setBadgeNumber($result['neue']); if ($result['count'] == 1) { $title = $scm->tab_name . _(' (geändert)'); @@ -61,7 +61,7 @@ class CoreScm extends CorePlugin implements StudipModule ); } } else { - $image = Icon::create('infopage', Icon::ROLE_CLICKABLE); + $nav->setImage(Icon::create('infopage')); if ($result['count'] == 1) { $title = $scm->tab_name; } else { @@ -75,7 +75,7 @@ class CoreScm extends CorePlugin implements StudipModule ); } } - $nav->setImage($image, ['title' => $title]); + $nav->setLinkAttributes(['title' => $title]); } return $nav; } @@ -139,7 +139,7 @@ class CoreScm extends CorePlugin implements StudipModule 'Literatur. Sie kann aber auch für andere beliebige Zusatzinformationen (Links, Protokolle '. 'etc.) verwendet werden.'), 'icon' => Icon::create('infopage', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('infopage', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('infopage'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Freie_Informationsseite', 'pictures' => [ diff --git a/lib/modules/CoreStudygroupAdmin.php b/lib/modules/CoreStudygroupAdmin.php index f9be2af4c9b255fcfdfcfd59e7158eebc94523c4..acf59737330e97f737566fdbeb2795577ba816a7 100644 --- a/lib/modules/CoreStudygroupAdmin.php +++ b/lib/modules/CoreStudygroupAdmin.php @@ -18,7 +18,8 @@ class CoreStudygroupAdmin extends CorePlugin implements StudipModule public function getIconNavigation($course_id, $last_visit, $user_id) { $navigation = new Navigation(_('Verwaltung'), "dispatch.php/course/studygroup/edit/?cid={$course_id}"); - $navigation->setImage(Icon::create('admin', Icon::ROLE_CLICKABLE, ['title' => _('Verwaltung')])); + $navigation->setImage(Icon::create('admin')); + $navigation->setLinkAttributes(['title' => _('Verwaltung')]); return $navigation; } diff --git a/lib/modules/CoreStudygroupParticipants.php b/lib/modules/CoreStudygroupParticipants.php index 334f84ab6d841b5344751fc413eb52a399eeb943..5f8ac8764124610bbdf6736363e13f65a36e0f2d 100644 --- a/lib/modules/CoreStudygroupParticipants.php +++ b/lib/modules/CoreStudygroupParticipants.php @@ -17,7 +17,7 @@ class CoreStudygroupParticipants extends CorePlugin implements StudipModule public function getIconNavigation($course_id, $last_visit, $user_id) { $navigation = new Navigation(_('Teilnehmende'), "dispatch.php/course/studygroup/members/{$course_id}"); - $navigation->setImage(Icon::create('persons', Icon::ROLE_CLICKABLE)); + $navigation->setImage(Icon::create('persons')); if ($last_visit && CourseMember::countBySQL("seminar_id = :course_id AND mkdate >= :last_visit", ['last_visit' => $last_visit, 'course_id' => $course_id]) > 0) { $navigation->setImage(Icon::create('persons', Icon::ROLE_ATTENTION)); } diff --git a/lib/modules/CoreWiki.php b/lib/modules/CoreWiki.php index b544af3f54fa9c16ed9ba86965a51562fd3e76cc..4a400100423290fffd5ae26b8e8cd92c60a63030 100644 --- a/lib/modules/CoreWiki.php +++ b/lib/modules/CoreWiki.php @@ -88,7 +88,8 @@ class CoreWiki extends CorePlugin implements StudipModule $nav->setBadgeNumber($new_pages); } else { $nav->setURL('dispatch.php/course/wiki/page'); - $nav->setImage(Icon::create('wiki', Icon::ROLE_CLICKABLE, [ + $nav->setImage(Icon::create('wiki')); + $nav->setLinkAttributes([ 'title' => sprintf( ngettext( '%d Wiki-Seite', @@ -97,7 +98,7 @@ class CoreWiki extends CorePlugin implements StudipModule ), count($wiki_page_ids) ) - ])); + ]); } return $nav; } @@ -161,7 +162,7 @@ class CoreWiki extends CorePlugin implements StudipModule 'PDF-Datei ist integriert.'), 'category' => _('Kommunikation und Zusammenarbeit'), 'icon' => Icon::create('wiki', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('wiki', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('wiki'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Wiki-Web', 'pictures' => [ diff --git a/lib/modules/CoursewareModule.php b/lib/modules/CoursewareModule.php index a5e2fde38f7b541a0da99b5c893f6a577402bdb3..7238c93941cbad4bb687160ff86b5e545a8c091b 100644 --- a/lib/modules/CoursewareModule.php +++ b/lib/modules/CoursewareModule.php @@ -109,9 +109,8 @@ class CoursewareModule extends CorePlugin implements SystemPlugin, StudipModule $new = $statement->fetchColumn(); $nav = new Navigation(_('Courseware'), 'dispatch.php/course/courseware'); - $nav->setImage(Icon::create('courseware', Icon::ROLE_CLICKABLE, [ - 'title' => _('Courseware'), - ])); + $nav->setImage(Icon::create('courseware')); + $nav->setLinkAttributes(['title' => _('Courseware')]); if ($new > 0) { if ($new === 1) { @@ -120,10 +119,9 @@ class CoursewareModule extends CorePlugin implements SystemPlugin, StudipModule } else { $text = _('neue Seiten'); } - $nav->setImage(Icon::create('courseware', Icon::ROLE_ATTENTION, [ - 'title' => $new . ' ' . $text, - ])); - $nav->setBadgeNumber("$new"); + $nav->setImage(Icon::create('courseware', Icon::ROLE_ATTENTION)); + $nav->setLinkAttributes(['title' => $new . ' ' . $text]); + $nav->setBadgeNumber($new); } return $nav; @@ -149,7 +147,7 @@ class CoursewareModule extends CorePlugin implements SystemPlugin, StudipModule 'displayname' => _('Courseware'), 'category' => _('Lehr- und Lernorganisation'), 'icon' => Icon::create('courseware', 'info'), - 'icon_clickable' => Icon::create('courseware', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('courseware'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Courseware', 'pictures' => [ diff --git a/lib/modules/FeedbackModule.php b/lib/modules/FeedbackModule.php index 2fc657d3d6d93045b749fab8449671f278e49c6e..5da167dde9e65e00fded5e5834fc055a254cf874 100644 --- a/lib/modules/FeedbackModule.php +++ b/lib/modules/FeedbackModule.php @@ -53,7 +53,7 @@ class FeedbackModule extends CorePlugin implements StudipModule, SystemPlugin 'category' => _('Kommunikation und Zusammenarbeit'), 'keywords' => _('Anlegen von Feedback-Elementen an verschiedenen Stellen; Auswahl verschiedener Feedback-Modi, wie Sternbewertung; Übersicht über alle Feedback-Elemente einer Veranstaltung'), 'icon' => Icon::create('star', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('star', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('star'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Feedback', 'pictures' => [ diff --git a/lib/modules/GradebookModule.php b/lib/modules/GradebookModule.php index 3de94a5071347bc57e2b3c0adc5e1676af183f07..aab5c6566365287f9ecc6dd72ad9df3e903abfbc 100644 --- a/lib/modules/GradebookModule.php +++ b/lib/modules/GradebookModule.php @@ -66,10 +66,11 @@ class GradebookModule extends CorePlugin implements SystemPlugin, StudipModule $icon = $changed ? Icon::create('assessment', Icon::ROLE_NEW) - : Icon::create('assessment', Icon::ROLE_CLICKABLE); + : Icon::create('assessment'); $navigation = new Navigation($title, 'dispatch.php/course/gradebook/overview'); - $navigation->setImage($icon->copyWithAttributes(['title' => $title])); + $navigation->setImage($icon); + $navigation->setLinkAttributes(['title' => $title]); return $navigation; } @@ -157,7 +158,7 @@ class GradebookModule extends CorePlugin implements SystemPlugin, StudipModule 'category' => _('Lehr- und Lernorganisation'), 'keywords' => _('automatische und manuelle Erfassung von gewichteten Leistungen;Export von Leistungen;persönliche Fortschrittskontrolle'), 'icon' => Icon::create('assessment', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('assessment', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('assessment'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Gradebook', 'pictures' => [ diff --git a/lib/modules/IliasInterfaceModule.php b/lib/modules/IliasInterfaceModule.php index e3fde44dd626afb1ec2b3ba305a4ad777ff473b5..2ab82ad1bb1614284f249d4cdbf7ed2a6a176c45 100644 --- a/lib/modules/IliasInterfaceModule.php +++ b/lib/modules/IliasInterfaceModule.php @@ -70,7 +70,8 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu $title = CourseConfig::get($course_id)->getValue('ILIAS_INTERFACE_MODULETITLE'); $nav = new Navigation($title, 'dispatch.php/course/ilias_interface/index'); if ($result['neue']) { - $nav->setImage(Icon::create('learnmodule', Icon::ROLE_ATTENTION, [ + $nav->setImage(Icon::create('learnmodule', Icon::ROLE_ATTENTION)); + $nav->setLinkAttributes([ 'title' => sprintf( ngettext( '%1$d Lernobjekt, %2$d neues', @@ -80,9 +81,10 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu $result['count_modules'], $result['neue'] ) - ])); + ]); } elseif ($result['count_modules']) { - $nav->setImage(Icon::create('learnmodule', Icon::ROLE_CLICKABLE, [ + $nav->setImage(Icon::create('learnmodule')); + $nav->setLinkAttributes([ 'title' => sprintf( ngettext( '%d Lernobjekt', @@ -91,9 +93,10 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu ), $result['count_modules'] ) - ])); + ]); } elseif ($result['count_courses']) { - $nav->setImage(Icon::create('learnmodule', Icon::ROLE_CLICKABLE, [ + $nav->setImage(Icon::create('learnmodule')); + $nav->setLinkAttributes([ 'title' => sprintf( ngettext( '%d ILIAS-Kurs', @@ -102,7 +105,7 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu ), $result['count_courses'] ) - ])); + ]); } return $nav; } @@ -153,7 +156,7 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu Zugang zu ILIAS; Aufgaben- und Test-Erstellung'), 'icon' => Icon::create('learnmodule', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('learnmodule', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('learnmodule'), 'descriptionshort' => _('Zugang zu extern erstellten ILIAS-Lernobjekten'), 'descriptionlong' => _('Über diese Schnittstelle ist es möglich, Lernobjekte aus ' . 'einer ILIAS-Installation (> 5.3.8) in Stud.IP zur Verfügung ' . diff --git a/lib/modules/LtiToolModule.php b/lib/modules/LtiToolModule.php index 7e67072eaa95bca5058a8a3a9bcd93cf88f9fd36..507fc269750f94dccc04275c0805dfd4908aaf13 100644 --- a/lib/modules/LtiToolModule.php +++ b/lib/modules/LtiToolModule.php @@ -46,10 +46,11 @@ class LtiToolModule extends CorePlugin implements StudipModule, SystemPlugin, Pr $icon = $changed ? Icon::create('link-extern', Icon::ROLE_NEW) - : Icon::create('link-extern', Icon::ROLE_CLICKABLE); + : Icon::create('link-extern'); $navigation = new Navigation($title, 'dispatch.php/course/lti'); - $navigation->setImage($icon->copyWithAttributes(['title' => $title])); + $navigation->setImage($icon); + $navigation->setLinkAttributes(['title' => $title]); return $navigation; } @@ -112,7 +113,7 @@ class LtiToolModule extends CorePlugin implements StudipModule, SystemPlugin, Pr 'category' => _('Kommunikation und Zusammenarbeit'), 'keywords' => _('Einbindung von LTI-Tools (Version 1.x)'), 'icon' => Icon::create('link-extern', Icon::ROLE_INFO), - 'icon_clickable' => Icon::create('link-extern', Icon::ROLE_CLICKABLE), + 'icon_clickable' => Icon::create('link-extern'), 'screenshots' => [ 'path' => 'assets/images/plus/screenshots/Lti', 'pictures' => [ diff --git a/lib/modules/NewsWidget.php b/lib/modules/NewsWidget.php index 04f6b08a4c814da6112260eb0fdb2838d7187dbf..d8ecd02c1df9a8a39b393163ca8045af62ccce2f 100644 --- a/lib/modules/NewsWidget.php +++ b/lib/modules/NewsWidget.php @@ -32,35 +32,39 @@ class NewsWidget extends CorePlugin implements PortalPlugin $icons = []; if (StudipNews::CountUnread() > 0) { $navigation = new Navigation('', 'dispatch.php/news/visit_all'); - $navigation->setImage(Icon::create('refresh', Icon::ROLE_CLICKABLE, ['title' => _('Alle als gelesen markieren'), 'size' => 20])); - $navigation->setLinkAttributes(['class' => 'visit-all']); + $navigation->setImage(Icon::create('refresh')); + $navigation->setLinkAttributes([ + 'class' => 'visit-all', + 'title' => _('Alle als gelesen markieren'), + ]); $icons[] = $navigation; } if (Config::get()->NEWS_RSS_EXPORT_ENABLE) { if ($rss_id = StudipNews::GetRssIdFromRangeId('studip')) { $navigation = new Navigation('', 'rss.php', ['id' => $rss_id]); - $navigation->setImage(Icon::create('rss', Icon::ROLE_CLICKABLE, ['title' => _('RSS-Feed'), 'size' => 20])); + $navigation->setImage(Icon::create('rss')); + $navigation->setLinkAttributes(['title' => _('RSS-Feed')]); $icons[] = $navigation; } } if ($GLOBALS['perm']->have_perm('root')) { $navigation = new Navigation('', 'dispatch.php/news/edit_news/new/studip'); - $navigation->setImage(Icon::create('add', Icon::ROLE_CLICKABLE, ['title' => _('Ankündigungen bearbeiten'), 'size' => 20])); - $navigation->setLinkAttributes(['data-dialog' => '']); + $navigation->setImage(Icon::create('add')); + $navigation->setLinkAttributes([ + 'title' => _('Ankündigungen bearbeiten'), + 'data-dialog' => '', + ]); $icons[] = $navigation; if (Config::get()->NEWS_RSS_EXPORT_ENABLE) { $navigation = new Navigation('', 'dispatch.php/news/rss_config/studip'); - $navigation->setImage( - Icon::create( - 'admin', - Icon::ROLE_CLICKABLE, - ['title' => _('RSS-Feed konfigurieren')] - ), - ); - $navigation->setLinkAttributes(['data-dialog' => 'size=auto']); + $navigation->setImage(Icon::create('admin')); + $navigation->setLinkAttributes([ + 'title' => _('RSS-Feed konfigurieren'), + 'data-dialog' => 'size=auto', + ]); $icons[] = $navigation; } } diff --git a/lib/modules/QuickSelection.php b/lib/modules/QuickSelection.php index 6e80ea580815fd00cb244161580baecea86f12e2..1892754172fa8e4a7e41b68a32d8bdffd0d9e37b 100644 --- a/lib/modules/QuickSelection.php +++ b/lib/modules/QuickSelection.php @@ -31,8 +31,11 @@ class QuickSelection extends CorePlugin implements PortalPlugin $template->navigation = $this->getFilteredNavigation($names); $navigation = new Navigation('', 'dispatch.php/quickselection/configuration'); - $navigation->setImage(Icon::create('edit', Icon::ROLE_CLICKABLE, ["title" => _('Konfigurieren'), 'size' => 20])); - $navigation->setLinkAttributes(['data-dialog' => 'size=auto']); + $navigation->setImage(Icon::create('edit')); + $navigation->setLinkAttributes([ + 'title' => _('Konfigurieren'), + 'data-dialog' => 'size=auto', + ]); $template->icons = [$navigation]; diff --git a/lib/modules/TerminWidget.php b/lib/modules/TerminWidget.php index 9bc8e9df213c933cf1603be85cd26fcd2216fbc8..56f1ffdc2195c9f9923b111005462a82110ea800 100644 --- a/lib/modules/TerminWidget.php +++ b/lib/modules/TerminWidget.php @@ -32,8 +32,11 @@ class TerminWidget extends CorePlugin implements PortalPlugin $template->content = $response->body; $navigation = new Navigation('', 'dispatch.php/calendar/date/add'); - $navigation->setImage(Icon::create('add', Icon::ROLE_CLICKABLE, ['title' => _('Neuen Termin anlegen'), 'size' => 20])); - $navigation->setLinkAttributes(['data-dialog' => 'reload-on-close']); + $navigation->setImage(Icon::create('add')); + $navigation->setLinkAttributes([ + 'title' => _('Neuen Termin anlegen'), + 'data-dialog' => 'reload-on-close' + ]); $template->icons = [$navigation]; return $template; diff --git a/lib/statusgruppe.inc.php b/lib/statusgruppe.inc.php index 41a60b94540a299cfc69b9f42897fb3cc8e61e20..a9c382cd9cf98092ec41b33c6bc23530e5eb6ae0 100644 --- a/lib/statusgruppe.inc.php +++ b/lib/statusgruppe.inc.php @@ -161,7 +161,7 @@ function get_role_data_recursive($roles, $user_or_id, $default_entries, $level = if ($role['user_there'] && $role['visible']) { $out .= '<tr><td>' - . Icon::create('arr_1right', Icon::ROLE_INFO) + . Icon::create('arr_1right', Icon::ROLE_INFO)->asImg(Icon::SIZE_INLINE, []) . '</td><td colspan="2"><b>'. htmlReady($new_pred) .'</b></td></tr>'; $entries = DataFieldEntry::getDataFieldEntries([$user->id, $role_id]); diff --git a/lib/visual.inc.php b/lib/visual.inc.php index 9988236bf64d6cb3c89bd42c3de9e78844478737..2282a685124c5511e515ae88b680cf18f3da212f 100644 --- a/lib/visual.inc.php +++ b/lib/visual.inc.php @@ -521,19 +521,5 @@ function display_exception($exception, $as_html = false, $deep = false) { * @todo Nested attribute definitions? */ function arrayToHtmlAttributes(array $attributes) { - // Filter empty attributes - $attributes = array_filter($attributes, function ($value) { - return isset($value) && $value !== false; - }); - - // Actual conversion - $result = []; - foreach ($attributes as $key => $value) { - if ($value === true) { - $result[] = htmlReady($key); - } else { - $result[] = sprintf('%s="%s"', htmlReady($key), htmlReady($value)); - } - } - return implode(' ', $result); + return (string) HTMLAttributes::from($attributes); } diff --git a/resources/assets/javascripts/lib/fullcalendar.js b/resources/assets/javascripts/lib/fullcalendar.js index f3f6e1c4fbefccc48d3e8833e0a8e3aaa98c4e97..af86d59cf9c97007cdb77c94dfa51d3c86f5395f 100644 --- a/resources/assets/javascripts/lib/fullcalendar.js +++ b/resources/assets/javascripts/lib/fullcalendar.js @@ -658,7 +658,7 @@ class Fullcalendar $('<a>').attr('href', url).text(renderInfo.resource.title) ); } else if ($("*[data-fullcalendar='1']").hasClass('institute-plan') && renderInfo.resource.id > 0) { - let icon = '<img class="text-bottom icon-role-clickable icon-shape-edit" width="16" height="16" src="' + STUDIP.URLHelper.getURL('assets/images/icons/blue/edit.svg') + '" alt="edit">'; + let icon = '<img class="text-bottom icon-role-clickable icon-shape-edit" width="20" height="20" src="' + STUDIP.URLHelper.getURL('assets/images/icons/blue/edit.svg') + '" alt="edit">'; $(renderInfo.el).append( '<a href="' + STUDIP.URLHelper.getURL('dispatch.php/admin/courseplanning/rename_column/' diff --git a/resources/assets/stylesheets/highcontrast.scss b/resources/assets/stylesheets/highcontrast.scss index 29b6fd5baaf9b94c57577850d3f0cd0fdd5103bf..aba822354ea3b4615dbd57c7164669c17c52df35 100644 --- a/resources/assets/stylesheets/highcontrast.scss +++ b/resources/assets/stylesheets/highcontrast.scss @@ -496,11 +496,11 @@ section.course-statusgroups article header h1 a img { .js form.default.collapsable fieldset legend, form.default fieldset.collapsable legend { - @include background-icon('arr_1down', 'info_alt', 20); + @include background-icon(arr_1down, info_alt); } .js form.default.collapsable fieldset.collapsed legend, form.default fieldset.collapsable.collapsed legend { - @include background-icon('arr_1right', 'info_alt', 20); + @include background-icon(arr_1right, info_alt); } .sidebar-widget-header > div > a > img { diff --git a/resources/assets/stylesheets/mixins/studip.scss b/resources/assets/stylesheets/mixins/studip.scss index 713f2fa3a827976ee4d40d499157c8da976dda3c..320c6f7fd63650611caf9ea518dd31c32c01f14a 100644 --- a/resources/assets/stylesheets/mixins/studip.scss +++ b/resources/assets/stylesheets/mixins/studip.scss @@ -66,16 +66,32 @@ @return "#{$icon-path}/#{$color}/#{$icon}.svg"; } -@mixin background-icon($icon, $role: clickable, $size: 16) { +@function icon-size($size) { + @if unitless($size) { + @warn "Assuming icon size to be in pixels"; + $size: $size * 1px; + } + + @if $size == $icon-size-default { + @return var(--icon-size-default); + } + @if $size == $icon-size-inline { + @return var(--icon-size-inline); + } + @if $size == $icon-size-button { + @return var(--icon-size-button); + } + + @return $size; +} + +@mixin background-icon($icon, $role: clickable, $size: $icon-size-default) { $svg: icon-path($icon, $role); background-image: url("#{$svg}"); @if $size { - @if unitless($size) { - $size: $size * 1px; - } - background-size: $size; + background-size: icon-size($size); } } @@ -88,12 +104,11 @@ } } -@mixin icon($position, $icon, $role, $size: 16px, $padding: 0) { +@mixin icon($position, $icon, $role: clickable, $size: $icon-size-default, $padding: 0, $inline: false) { $position: unquote($position); - @if unitless($size) { - @warn "Assuming icon size to be in pixels"; - $size: $size * 1px; + @if $inline { + $size: $icon-size-inline; } @if $position == before or $position == after { @@ -102,11 +117,11 @@ background-repeat: no-repeat; content: ' '; display: inline-block; - height: $size; + height: icon-size($size); vertical-align: text-top; - width: $size; + width: icon-size($size); - @if position == before { + @if $position == before { margin-right: $padding; } @else { margin-left: $padding; @@ -122,12 +137,12 @@ display: inline-block; vertical-align: bottom; - @include background-icon($default-icon-name, clickable, 20); + @include background-icon($default-icon-name, $size: $icon-size-default); @include hide-text(); - @include square(20px); + @include square($icon-size-default); &.toggled { - @include background-icon($toggled-icon-name, clickable, 20); + @include background-icon($toggled-icon-name, $size: $icon-size-default); } } @@ -155,7 +170,7 @@ height: 180px; width: 180px; opacity: 0.6; - transform: translate(20px, -50px); + transform: translate($icon-size-default, -50px); } @@ -220,10 +235,10 @@ .widget-action[data-action="#{$action}"] { @include hide-text(); - width: 16px; - height: 16px; + width: var(--icon-size-default); + height: var(--icon-size-default); - @include background-icon($icon, $role, 16px); + @include background-icon($icon, $role); background-repeat: no-repeat; cursor: pointer; diff --git a/resources/assets/stylesheets/print.scss b/resources/assets/stylesheets/print.scss index ee1e8a88b2e645b14c27cb4e97c3e0e4247cfad0..7148cdbc431df88f0bcaba6e1ed96d40e9cf51c3 100644 --- a/resources/assets/stylesheets/print.scss +++ b/resources/assets/stylesheets/print.scss @@ -180,13 +180,13 @@ td.quote { a.link-intern { padding-left: 18px; - @include background-icon(intern, clickable); + @include background-icon(intern); background-repeat: no-repeat; } a.link-extern { padding-left: 18px; - @include background-icon(link-extern, clickable); + @include background-icon(link-extern); background-repeat: no-repeat; } diff --git a/resources/assets/stylesheets/scss/actionmenu.scss b/resources/assets/stylesheets/scss/actionmenu.scss index dfc1fd163a267fb2588f263b6dbae5f535de0f00..4d678eaafd9f224c4bea513b1333213cd0872e4e 100644 --- a/resources/assets/stylesheets/scss/actionmenu.scss +++ b/resources/assets/stylesheets/scss/actionmenu.scss @@ -1,4 +1,3 @@ -$action-menu-icon-size: 20px; $action-menu-shadow: 1px 1px 1px var(--dark-gray-color-60); .action-menu { @@ -48,14 +47,14 @@ $action-menu-shadow: 1px 1px 1px var(--dark-gray-color-60); cursor: pointer; display: block; padding: 0; - width: $action-menu-icon-size; - height: $action-menu-icon-size; + width: var(--icon-size-action-menu); + height: var(--icon-size-action-menu); // Create animated icon that changes to close icon on activation/hover span { - width: calc($action-menu-icon-size / 4); - height: calc($action-menu-icon-size / 4); - transform: translate(calc(-1 * ($action-menu-icon-size / 8)), 0); + width: calc(var(--icon-size-action-menu) / 4); + height: calc(var(--icon-size-action-menu) / 4); + transform: translate(calc(-1 * (var(--icon-size-action-menu) / 8)), 0); transition: all .25s ease-in-out; display: block; @@ -70,8 +69,8 @@ $action-menu-shadow: 1px 1px 1px var(--dark-gray-color-60); } &:nth-child(2) { - top: calc($action-menu-icon-size / 2); - transform: translate(calc(-1 * ($action-menu-icon-size / 8)), calc(-1 * ($action-menu-icon-size / 8))); + top: calc(var(--icon-size-action-menu) / 2); + transform: translate(calc(-1 * (var(--icon-size-action-menu) / 8)), calc(-1 * (var(--icon-size-action-menu) / 8))); } &:nth-child(3) { @@ -107,8 +106,8 @@ $action-menu-shadow: 1px 1px 1px var(--dark-gray-color-60); margin: 0 0.25em; vertical-align: middle; - width: $action-menu-icon-size; - height: $action-menu-icon-size; + width: var(--icon-size-action-menu); + height: var(--icon-size-action-menu); } > button { @@ -155,7 +154,7 @@ $action-menu-shadow: 1px 1px 1px var(--dark-gray-color-60); &:nth-child(1) { left: 0; - transform: rotate(45deg) translate(calc(($action-menu-icon-size / 4) + 0.5px), calc(($action-menu-icon-size / 4) + 0.5px)); + transform: rotate(45deg) translate(calc((var(--icon-size-action-menu) / 4) + 0.5px), calc((var(--icon-size-action-menu) / 4) + 0.5px)); width: 100%; } @@ -165,7 +164,7 @@ $action-menu-shadow: 1px 1px 1px var(--dark-gray-color-60); &:nth-child(3) { left: 0; - transform: rotate(-45deg) translate(calc($action-menu-icon-size / 4), calc(-1 * ($action-menu-icon-size / 4))); + transform: rotate(-45deg) translate(calc(var(--icon-size-action-menu) / 4), calc(-1 * (var(--icon-size-action-menu) / 4))); width: 100%; } } @@ -202,7 +201,7 @@ $action-menu-shadow: 1px 1px 1px var(--dark-gray-color-60); text-align: center; - @include icon(before, check-circle, status-green, 16px, 5px); + @include icon(before, check-circle, status-green, $padding: 5px); } // Flip the link and confirmation message along the x axis diff --git a/resources/assets/stylesheets/scss/admin-courses.scss b/resources/assets/stylesheets/scss/admin-courses.scss index 09ec6ca139353190547ca633de5e9dbfe77a3257..c98157983a4b165830101bb03aad9f596baf2cae 100644 --- a/resources/assets/stylesheets/scss/admin-courses.scss +++ b/resources/assets/stylesheets/scss/admin-courses.scss @@ -2,9 +2,9 @@ .button.has-no-notice { &::before { display: inline-block; - height: 16px; + height: var(--icon-size-inline); vertical-align: sub; - width: 16px; + width: var(--icon-size-inline); } &::before { margin-right: 0.5ex; @@ -34,7 +34,7 @@ } .action-menu.filter:not(.is-open) .action-menu-icon { - @include background-icon(settings, clickable, 20); + @include background-icon(settings); span { display: none; } diff --git a/resources/assets/stylesheets/scss/admin.scss b/resources/assets/stylesheets/scss/admin.scss index 634c4e8394198461cc998bf998abe13e7fec30a1..7136737f7ebd606b0292d2ab692fe2d2f31b8ece 100644 --- a/resources/assets/stylesheets/scss/admin.scss +++ b/resources/assets/stylesheets/scss/admin.scss @@ -19,7 +19,7 @@ text-align: left; background-color: transparent; border: solid thin transparent; - @include background-icon(upload, clickable, 48); + @include background-icon(upload, $size: 48px); background-repeat: no-repeat; background-position: 15px center; color: var(--base-color); @@ -135,13 +135,13 @@ fieldset.attribute_table { .course-admin { .course-completion { @include hide-text(); - @include square(16px); + @include square($icon-size-default); background-repeat: no-repeat; display: block; } th .course-completion { - @include background-icon(radiobutton-checked, clickable); + @include background-icon(radiobutton-checked); } td .course-completion { diff --git a/resources/assets/stylesheets/scss/ajax.scss b/resources/assets/stylesheets/scss/ajax.scss index 98e8e4fb769be4d2ed7a35da15dab2c6b7c08f0d..e79e44fc45d6daa25cd07fd0aa102250f162cd36 100644 --- a/resources/assets/stylesheets/scss/ajax.scss +++ b/resources/assets/stylesheets/scss/ajax.scss @@ -24,19 +24,23 @@ border: 1px solid var(--dark-gray-color-30); border-radius: 8px; display: inline-block; - height: 16px; + height: var(--icon-size-inline); margin: 0 3px; opacity: 1; position: absolute; - width: 16px; + width: var(--icon-size-inline); } } .ajaxing { background: url("#{$image-path}/loading-indicator.svg") center no-repeat; display: inline-block; - @include size(16px, 16px); + @include size(var(--icon-size-inline), var(--icon-size-inline)); @include hide-text(); - img, image, svg { display: none; } + img, + image, + svg { + display: none; + } } diff --git a/resources/assets/stylesheets/scss/article.scss b/resources/assets/stylesheets/scss/article.scss index 872dd61cb5ea1e33d302a92bfe42948c6f607dcb..d11d36932c717239633823de4fb0c4fd82f1ba0a 100644 --- a/resources/assets/stylesheets/scss/article.scss +++ b/resources/assets/stylesheets/scss/article.scss @@ -88,7 +88,7 @@ article.studip { &.toggle { > header { h1 > a { - @include icon(before, arr_1right, clickable); + @include icon(before, arr_1right); &::before { flex: 0 0 auto; margin-right: 5px; @@ -161,4 +161,4 @@ article.new { &:last-child { margin-bottom: 0; } -} \ No newline at end of file +} diff --git a/resources/assets/stylesheets/scss/buttons.scss b/resources/assets/stylesheets/scss/buttons.scss index dc43a03990e525dcd4b161aa7c6d9bd9d0107e5a..f6158bcf778a4e6373895d78405f312c9ebfb715 100644 --- a/resources/assets/stylesheets/scss/buttons.scss +++ b/resources/assets/stylesheets/scss/buttons.scss @@ -53,26 +53,26 @@ button.button { background-repeat: no-repeat; content: " "; float: left; - height: 16px; + height: var(--icon-size-button); margin: 1px 10px 0 0; - width: 16px; + width: var(--icon-size-button); } } @mixin button-with-icon($icon, $role, $roleOnHover) { @extend .button-with-empty-icon; &::before { - @include background-icon($icon, $role); + @include background-icon($icon, $role, $icon-size-button); } &:hover::before { - @include background-icon($icon, $roleOnHover); + @include background-icon($icon, $roleOnHover, $icon-size-button); } &.disabled, &[disabled] { &:hover::before { - @include background-icon($icon, $role); + @include background-icon($icon, $role, $icon-size-button); } } } @@ -95,7 +95,7 @@ $button-icons: ( @each $class, $icon in $button-icons { .button { &.#{'' + $class} { - padding-right: 20px; + padding-right: ($icon-size-button + 4px); @include button-with-icon($icon, clickable, info_alt); &.disabled, &[disabled] { @include button-with-icon($icon, inactive, inactive); @@ -158,4 +158,4 @@ button, pointer-events: none; } } -} \ No newline at end of file +} diff --git a/resources/assets/stylesheets/scss/clipboard.scss b/resources/assets/stylesheets/scss/clipboard.scss index 21415a8f5b29e3c2e5abbaba83b8f0996d4749d7..d13921ca95e2be610cded1147d1d68ea7a06e607 100644 --- a/resources/assets/stylesheets/scss/clipboard.scss +++ b/resources/assets/stylesheets/scss/clipboard.scss @@ -44,11 +44,9 @@ table.clipboard-area { } td { padding: 2px 5px; - &.item-name { - max-width: 160px; - } - &.action { + &.actions { vertical-align: top; + white-space: nowrap; } } } diff --git a/resources/assets/stylesheets/scss/content_box.scss b/resources/assets/stylesheets/scss/content_box.scss index ac932a265cc09cdc979f6d2b5d342987dc5169bb..e98a3bc3a4dc20c209dd7d2b92f1e739c97c13ac 100644 --- a/resources/assets/stylesheets/scss/content_box.scss +++ b/resources/assets/stylesheets/scss/content_box.scss @@ -153,7 +153,7 @@ section.contentbox { header { h1 a { - @include icon(before, arr_1right, clickable); + @include icon(before, arr_1right); &::before { transition: all var(--transition-duration) ease 0s; diff --git a/resources/assets/stylesheets/scss/contentbar.scss b/resources/assets/stylesheets/scss/contentbar.scss index 338737bac03b05c0c41c1236057b48aa40505100..1ea85d69bac6f40cc2d61e636c6dbf6466898b36 100644 --- a/resources/assets/stylesheets/scss/contentbar.scss +++ b/resources/assets/stylesheets/scss/contentbar.scss @@ -105,7 +105,7 @@ &.contentbar-button-menu, &.cw-ribbon-button-menu { - @include background-icon(table-of-contents, clickable, 24); + @include background-icon(table-of-contents, $size: 24px); } &.contentbar-button-zoom::before { diff --git a/resources/assets/stylesheets/scss/courseware/blockadder.scss b/resources/assets/stylesheets/scss/courseware/blockadder.scss index 350bb7ca5cb55aeb5ac638dda762b371e79f8f53..a2d5bba983500757cd522218d9aa5c40a388ec27 100644 --- a/resources/assets/stylesheets/scss/courseware/blockadder.scss +++ b/resources/assets/stylesheets/scss/courseware/blockadder.scss @@ -32,14 +32,14 @@ border: none; background-color: var(--white); padding: 64px 10px 4px 10px; - @include background-icon(unit-test, clickable, 48); + @include background-icon(unit-test, $size: 48px); background-position: 16px 10px; background-repeat: no-repeat; cursor: pointer; @each $item, $icon in $blockadder-items { &.cw-blockadder-item-#{$item} { - @include background-icon($icon, clickable, 48); + @include background-icon($icon, $size: 48px); } } .cw-blockadder-item-title { @@ -87,7 +87,7 @@ background-color: var(--white); min-height: 5em; padding: 1em 1em 1em 6em; - @include background-icon(unit-test, clickable, 48); + @include background-icon(unit-test, $size: 48px); background-position: 16px center; background-repeat: no-repeat; text-align: left; @@ -96,7 +96,7 @@ @each $item, $icon in $containeradder-items { &.cw-containeradder-item-#{$item} { - @include background-icon($icon, clickable, 48); + @include background-icon($icon, $size: 48px); } } @@ -127,13 +127,13 @@ cursor: pointer; &.full { - @include background-icon(column-full, clickable, 32); + @include background-icon(column-full, $size: 32px); } &.half { - @include background-icon(column-half, clickable, 32); + @include background-icon(column-half, $size: 32px); } &.half-center { - @include background-icon(column-half-centered, clickable, 32); + @include background-icon(column-half-centered, $size: 32px); } &:hover { color: var(--active-color); @@ -189,7 +189,7 @@ .cw-clipboard-item { width: calc(100% - 36px); padding: 64px 10px 4px 10px; - @include background-icon(unit-test, clickable, 48); + @include background-icon(unit-test, $size: 48px); background-position: 16px 10px; background-repeat: no-repeat; cursor: pointer; @@ -200,12 +200,12 @@ @each $item, $icon in $blockadder-items { &.cw-clipboard-item-#{$item} { - @include background-icon($icon, clickable, 48); + @include background-icon($icon, $size: 48px); } } @each $item, $icon in $containeradder-items { &.cw-clipboard-item-#{$item} { - @include background-icon($icon, clickable, 48); + @include background-icon($icon, $size: 48px); } } diff --git a/resources/assets/stylesheets/scss/courseware/blocks/biography.scss b/resources/assets/stylesheets/scss/courseware/blocks/biography.scss index a40239bc3f34495633ef2ae4b0a139f6105e4dad..cdc7a14aaf9962770cd67bab81534bc3809960ef 100644 --- a/resources/assets/stylesheets/scss/courseware/blocks/biography.scss +++ b/resources/assets/stylesheets/scss/courseware/blocks/biography.scss @@ -46,7 +46,7 @@ $goals-types: ( .cw-block-biography-achievements { @each $type, $icon in $achievement-types { .cw-block-biography-achievements-type-#{$type} { - @include background-icon($icon, clickable, 96); + @include background-icon($icon, $size: 96px); } } } @@ -54,7 +54,7 @@ $goals-types: ( .cw-block-biography-goals { @each $type, $icon in $goals-types { .cw-block-biography-goals-type-#{$type} { - @include background-icon($icon, clickable, 96); + @include background-icon($icon, $size: 96px); } } } @@ -64,7 +64,7 @@ $goals-types: ( min-height: 140px; .cw-block-biography-personal-information-type { - @include background-icon(person2, clickable, 96); + @include background-icon(person2, $size: 96px); } .cw-block-biography-personal-information-details { @@ -79,4 +79,4 @@ $goals-types: ( } } } -} \ No newline at end of file +} diff --git a/resources/assets/stylesheets/scss/courseware/blocks/canvas.scss b/resources/assets/stylesheets/scss/courseware/blocks/canvas.scss index acfd935a8403b2f930c9750a5eb204e6283e6e4e..decabf106eb7ccf7691646908808e04cf865d538 100644 --- a/resources/assets/stylesheets/scss/courseware/blocks/canvas.scss +++ b/resources/assets/stylesheets/scss/courseware/blocks/canvas.scss @@ -68,11 +68,11 @@ } &.cw-canvasblock-reset { - @include background-icon(refresh, clickable, 24); + @include background-icon(refresh, $size: 24px); } &.cw-canvasblock-size { - @include background-icon(stop, clickable); + @include background-icon(stop); &.cw-canvasblock-size-small { background-size: 8px 7px; @@ -93,7 +93,7 @@ &.cw-canvasblock-tool { &.cw-canvasblock-tool-pen { - @include background-icon(comment, clickable); + @include background-icon(comment); } &.cw-canvasblock-tool-text { @@ -109,19 +109,19 @@ } &.cw-canvasblock-undo { - @include background-icon(arr_2left, clickable, 24); + @include background-icon(arr_2left, $size: 24px); } &.cw-canvasblock-download { - @include background-icon(download, clickable, 24); + @include background-icon(download, $size: 24px); } &.cw-canvasblock-store { - @include background-icon(upload, clickable, 24); + @include background-icon(upload, $size: 24px); } &.cw-canvasblock-show-all { - @include background-icon(group2, clickable, 24); + @include background-icon(group2, $size: 24px); &.selected-view { border: solid 2px var(--black); @@ -129,7 +129,7 @@ } &.cw-canvasblock-show-own { - @include background-icon(person, clickable, 24); + @include background-icon(person, $size: 24px); &.selected-view { border: solid 2px var(--black); diff --git a/resources/assets/stylesheets/scss/courseware/blocks/default-block.scss b/resources/assets/stylesheets/scss/courseware/blocks/default-block.scss index fb868ddccd1bcc5a22e23f816e421ce4aea14be1..2a0e6d36794d641ee79ea31cc5206b95ea0e253d 100644 --- a/resources/assets/stylesheets/scss/courseware/blocks/default-block.scss +++ b/resources/assets/stylesheets/scss/courseware/blocks/default-block.scss @@ -32,7 +32,8 @@ } img { - vertical-align: text-bottom; + vertical-align: middle; + margin-bottom: 2px; } .cw-block-actions { @@ -99,7 +100,7 @@ } .cw-file-empty { - @include background-icon(file, info, 96); + @include background-icon(file, info, 96px); border: solid thin var(--content-color-40); background-position: center 1em; background-repeat: no-repeat; diff --git a/resources/assets/stylesheets/scss/courseware/blocks/dialog-cards.scss b/resources/assets/stylesheets/scss/courseware/blocks/dialog-cards.scss index e8ba46720e0fb485fc56130f8d2242747be1e0c0..dfc35b463c76cf8003cc58ca17443a2e8e5ab5f9 100644 --- a/resources/assets/stylesheets/scss/courseware/blocks/dialog-cards.scss +++ b/resources/assets/stylesheets/scss/courseware/blocks/dialog-cards.scss @@ -54,11 +54,11 @@ } .cw-dialogcards-front-no-image { - @include background-icon(question, navigation, 150); + @include background-icon(question, navigation, 150px); } .cw-dialogcards-back-no-image { - @include background-icon(exclaim, navigation, 150); + @include background-icon(exclaim, navigation, 150px); } .cw-dialogcards-front-no-image, @@ -80,14 +80,14 @@ } .card__face--front { - @include background-icon(arr_1right, clickable); + @include background-icon(arr_1right); background-color: var(--white); background-repeat: no-repeat; background-position: 95% 95%; } .card__face--back { - @include background-icon(arr_1left, clickable); + @include background-icon(arr_1left); background-color: var(--white); background-repeat: no-repeat; background-position: 5% 95%; @@ -111,11 +111,11 @@ cursor: pointer; &.cw-dialogcards-prev { - @include background-icon(arr_1left, info-alt, 24); + @include background-icon(arr_1left, info-alt, 24px); } &.cw-dialogcards-next { - @include background-icon(arr_1right, info-alt, 24); + @include background-icon(arr_1right, info-alt, 24px); right: 0; } diff --git a/resources/assets/stylesheets/scss/courseware/blocks/files.scss b/resources/assets/stylesheets/scss/courseware/blocks/files.scss index 48a599511f2ff3f7170193b7248045ed69d9745a..77ed00d951d77b43e1ed3e14449034e9fad9a3e2 100644 --- a/resources/assets/stylesheets/scss/courseware/blocks/files.scss +++ b/resources/assets/stylesheets/scss/courseware/blocks/files.scss @@ -30,7 +30,7 @@ } .cw-block-folder-download-icon { - @include background-icon(download, clickable, 24); + @include background-icon(download, $size: 24px); background-repeat: no-repeat; float: right; height: 24px; @@ -52,7 +52,7 @@ // for folder and download block .cw-block-file-info { - @include background-icon(file, clickable, 24); + @include background-icon(file, $size: 24px); background-repeat: no-repeat; display: block; padding: 16px 16px 16px 40px; @@ -64,91 +64,91 @@ &.cw-block-file-icon-empty { color: var(--black); - @include background-icon(folder-empty, info, 24); + @include background-icon(folder-empty, info, 24px); } &.cw-block-file-icon-none { color: var(--black); - @include background-icon(file, info, 24); + @include background-icon(file, info, 24px); } &.cw-block-file-icon-audio { - @include background-icon(file-audio, clickable, 24); + @include background-icon(file-audio, $size: 24px); &.download-disabled { - @include background-icon(file-audio, info, 24); + @include background-icon(file-audio, info, 24px); } } &.cw-block-file-icon-pic { - @include background-icon(file-pic, clickable, 24); + @include background-icon(file-pic, $size: 24px); &.download-disabled { - @include background-icon(file-pic, info, 24); + @include background-icon(file-pic, info, 24px); } } &.cw-block-file-icon-video { - @include background-icon(file-video, clickable, 24); + @include background-icon(file-video, $size: 24px); &.download-disabled { - @include background-icon(file-video, info, 24); + @include background-icon(file-video, info, 24px); } } &.cw-block-file-icon-pdf { - @include background-icon(file-pdf, clickable, 24); + @include background-icon(file-pdf, $size: 24px); &.download-disabled { - @include background-icon(file-pdf, info, 24); + @include background-icon(file-pdf, info, 24px); } } &.cw-block-file-icon-word { - @include background-icon(file-word, clickable, 24); + @include background-icon(file-word, $size: 24px); &.download-disabled { - @include background-icon(file-word, info, 24); + @include background-icon(file-word, info, 24px); } } &.cw-block-file-icon-spreadsheet { - @include background-icon(file-excel, clickable, 24); + @include background-icon(file-excel, $size: 24px); &.download-disabled { - @include background-icon(file-excel, info, 24); + @include background-icon(file-excel, info, 24px); } } &.cw-block-file-icon-text { - @include background-icon(file-text, clickable, 24); + @include background-icon(file-text, $size: 24px); &.download-disabled { - @include background-icon(file-text, info, 24); + @include background-icon(file-text, info, 24px); } } &.cw-block-file-icon-ppt { - @include background-icon(file-ppt, clickable, 24); + @include background-icon(file-ppt, $size: 24px); &.download-disabled { - @include background-icon(file-ppt, info, 24); + @include background-icon(file-ppt, info, 24px); } } &.cw-block-file-icon-archive { - @include background-icon(file-archive, clickable, 24); + @include background-icon(file-archive, $size: 24px); &.download-disabled { - @include background-icon(file-archive, info, 24); + @include background-icon(file-archive, info, 24px); } } &.cw-block-file-icon-file { - @include background-icon(file, clickable, 24); + @include background-icon(file, $size: 24px); &.download-disabled { - @include background-icon(file, info, 24); + @include background-icon(file, info, 24px); } } } @@ -181,7 +181,7 @@ } .cw-block-download-download-icon { - @include background-icon(download, clickable, 24); + @include background-icon(download, $size: 24px); background-repeat: no-repeat; float: right; height: 24px; diff --git a/resources/assets/stylesheets/scss/courseware/blocks/gallery.scss b/resources/assets/stylesheets/scss/courseware/blocks/gallery.scss index 9e1cfb468d41c49dab937dd9fdcf9220c0c08e6d..6bacf7af4ce859e7b9e99f9032d67dc0248e726c 100644 --- a/resources/assets/stylesheets/scss/courseware/blocks/gallery.scss +++ b/resources/assets/stylesheets/scss/courseware/blocks/gallery.scss @@ -43,19 +43,19 @@ } .cw-block-gallery-prev { - @include background-icon(arr_1left, clickable, 24); + @include background-icon(arr_1left, $size: 24px); &:hover { - @include background-icon(arr_1left, info-alt, 24); + @include background-icon(arr_1left, info-alt, 24px); } } .cw-block-gallery-next { right: 0; - @include background-icon(arr_1right, clickable, 24); + @include background-icon(arr_1right, $size: 24px); &:hover { - @include background-icon(arr_1right, info-alt, 24); + @include background-icon(arr_1right, info-alt, 24px); } } diff --git a/resources/assets/stylesheets/scss/courseware/blocks/headline.scss b/resources/assets/stylesheets/scss/courseware/blocks/headline.scss index 36463276e77237f969af54c5f99e3c69455c7c00..9fa792f61956b41f895474d34aa1bc89dd4f618b 100644 --- a/resources/assets/stylesheets/scss/courseware/blocks/headline.scss +++ b/resources/assets/stylesheets/scss/courseware/blocks/headline.scss @@ -3,9 +3,9 @@ @import '../variables.scss'; $big-icon-size: 196; -$big-icon-size-px: $big-icon-size + px; +$big-icon-size-px: $big-icon-size * 1px; $large-icon-size: 128; -$large-icon-size-px: $large-icon-size + px; +$large-icon-size-px: $large-icon-size * 1px; .cw-block-headline { .cw-block-headline-content { @@ -66,25 +66,25 @@ $large-icon-size-px: $large-icon-size + px; @each $icon in $icons { &.icon-black-#{$icon} { - @include background-icon($icon, info, $big-icon-size); + @include background-icon($icon, info, $big-icon-size-px); } &.icon-white-#{$icon} { - @include background-icon($icon, info-alt, $big-icon-size); + @include background-icon($icon, info-alt, $big-icon-size-px); } &.icon-studip-blue-#{$icon} { - @include background-icon($icon, clickable, $big-icon-size); + @include background-icon($icon, $size: $big-icon-size-px); } &.icon-studip-red-#{$icon} { - @include background-icon($icon, status-red, $big-icon-size); + @include background-icon($icon, status-red, $big-icon-size-px); } &.icon-studip-yellow-#{$icon} { - @include background-icon($icon, status-yellow, $big-icon-size); + @include background-icon($icon, status-yellow, $big-icon-size-px); } &.icon-studip-green-#{$icon} { - @include background-icon($icon, status-green, $big-icon-size); + @include background-icon($icon, status-green, $big-icon-size-px); } &.icon-studip-gray-#{$icon} { - @include background-icon($icon, inactive, $big-icon-size); + @include background-icon($icon, inactive, $big-icon-size-px); } } @@ -155,25 +155,25 @@ $large-icon-size-px: $large-icon-size + px; @each $icon in $icons { &.icon-black-#{$icon} { - @include background-icon($icon, info, $big-icon-size); + @include background-icon($icon, info, $big-icon-size-px); } &.icon-white-#{$icon} { - @include background-icon($icon, info-alt, $big-icon-size); + @include background-icon($icon, info-alt, $big-icon-size-px); } &.icon-studip-blue-#{$icon} { - @include background-icon($icon, clickable, $big-icon-size); + @include background-icon($icon, $size: $big-icon-size-px); } &.icon-studip-red-#{$icon} { - @include background-icon($icon, status-red, $big-icon-size); + @include background-icon($icon, status-red, $big-icon-size-px); } &.icon-studip-yellow-#{$icon} { - @include background-icon($icon, status-yellow, $big-icon-size); + @include background-icon($icon, status-yellow, $big-icon-size-px); } &.icon-studip-green-#{$icon} { - @include background-icon($icon, status-green, $big-icon-size); + @include background-icon($icon, status-green, $big-icon-size-px); } &.icon-studip-gray-#{$icon} { - @include background-icon($icon, inactive, $big-icon-size); + @include background-icon($icon, inactive, $big-icon-size-px); } } @@ -377,25 +377,25 @@ $large-icon-size-px: $large-icon-size + px; @each $icon in $icons { &.icon-black-#{$icon} { - @include background-icon($icon, info, 128); + @include background-icon($icon, info, 128px); } &.icon-white-#{$icon} { - @include background-icon($icon, info-alt, 128); + @include background-icon($icon, info-alt, 128px); } &.icon-studip-blue-#{$icon} { - @include background-icon($icon, clickable, 128); + @include background-icon($icon, $size: 128px); } &.icon-studip-red-#{$icon} { - @include background-icon($icon, status-red, 128); + @include background-icon($icon, status-red, 128px); } &.icon-studip-yellow-#{$icon} { - @include background-icon($icon, status-yellow, 128); + @include background-icon($icon, status-yellow, 128px); } &.icon-studip-green-#{$icon} { - @include background-icon($icon, status-green, 128); + @include background-icon($icon, status-green, 128px); } &.icon-studip-gray-#{$icon} { - @include background-icon($icon, inactive, 128); + @include background-icon($icon, inactive, 128px); } } @@ -511,25 +511,25 @@ $large-icon-size-px: $large-icon-size + px; @each $icon in $icons { &.icon-black-#{$icon} { - @include background-icon($icon, info, 98); + @include background-icon($icon, info, 98px); } &.icon-white-#{$icon} { - @include background-icon($icon, info-alt, 98); + @include background-icon($icon, info-alt, 98px); } &.icon-studip-blue-#{$icon} { - @include background-icon($icon, clickable, 98); + @include background-icon($icon, $size: 98px); } &.icon-studip-red-#{$icon} { - @include background-icon($icon, status-red, 98); + @include background-icon($icon, status-red, 98px); } &.icon-studip-yellow-#{$icon} { - @include background-icon($icon, status-yellow, 98); + @include background-icon($icon, status-yellow, 98px); } &.icon-studip-green-#{$icon} { - @include background-icon($icon, status-green, 98); + @include background-icon($icon, status-green, 98px); } &.icon-studip-gray-#{$icon} { - @include background-icon($icon, inactive, 98); + @include background-icon($icon, inactive, 98px); } } @@ -565,25 +565,25 @@ $large-icon-size-px: $large-icon-size + px; background-position: 0 center; @each $icon in $icons { &.icon-black-#{$icon} { - @include background-icon($icon, info, 92); + @include background-icon($icon, info, 92px); } &.icon-white-#{$icon} { - @include background-icon($icon, info-alt, 92); + @include background-icon($icon, info-alt, 92px); } &.icon-studip-blue-#{$icon} { - @include background-icon($icon, clickable, 92); + @include background-icon($icon, $size: 92px); } &.icon-studip-red-#{$icon} { - @include background-icon($icon, status-red, 92); + @include background-icon($icon, status-red, 92px); } &.icon-studip-yellow-#{$icon} { - @include background-icon($icon, status-yellow, 92); + @include background-icon($icon, status-yellow, 92px); } &.icon-studip-green-#{$icon} { - @include background-icon($icon, status-green, 92); + @include background-icon($icon, status-green, 92px); } &.icon-studip-gray-#{$icon} { - @include background-icon($icon, inactive, 92); + @include background-icon($icon, inactive, 92px); } } } diff --git a/resources/assets/stylesheets/scss/courseware/blocks/keypoint.scss b/resources/assets/stylesheets/scss/courseware/blocks/keypoint.scss index a0e496be07f083c83933423c3363f281027bed6f..f162403016a1829cbf313c6ed3ed2be32717e2b1 100644 --- a/resources/assets/stylesheets/scss/courseware/blocks/keypoint.scss +++ b/resources/assets/stylesheets/scss/courseware/blocks/keypoint.scss @@ -17,7 +17,7 @@ padding: 16px; margin: 1px 0; } - + .cw-keypoint-sentence { display: block; background-color: var(--dark-gray-color-20); @@ -145,4 +145,4 @@ .cw-keypoint-sentence { background-color: var(--violet-20); } -} \ No newline at end of file +} diff --git a/resources/assets/stylesheets/scss/courseware/blocks/link.scss b/resources/assets/stylesheets/scss/courseware/blocks/link.scss index 35f01ae10c81bd60bbbba2d10835301f4e05253d..bfa286df77ec2c0515ecc27bbd67203a64d8f277 100644 --- a/resources/assets/stylesheets/scss/courseware/blocks/link.scss +++ b/resources/assets/stylesheets/scss/courseware/blocks/link.scss @@ -27,22 +27,22 @@ } &.internal { - @include background-icon(link-intern, clickable, 28); + @include background-icon(link-intern, $size: 28px); background-position: 1em 50%; background-repeat: no-repeat; &:hover { - @include background-icon(link-intern, info-alt, 28); + @include background-icon(link-intern, info-alt, 28px); } } &.external { - @include background-icon(link-extern, clickable, 28); + @include background-icon(link-extern, $size: 28px); background-position: 1em 50%; background-repeat: no-repeat; &:hover { - @include background-icon(link-extern, info-alt, 28); + @include background-icon(link-extern, info-alt, 28px); } .cw-link-og-image { @@ -100,7 +100,7 @@ header { color: var(--active-color); } - + } } } diff --git a/resources/assets/stylesheets/scss/courseware/blocks/lti.scss b/resources/assets/stylesheets/scss/courseware/blocks/lti.scss index c3d7af1144bd4c3e683c6bb6170eff4c301f0aa0..5f4a82aaba705201dbb4b44fba9221e73547667a 100644 --- a/resources/assets/stylesheets/scss/courseware/blocks/lti.scss +++ b/resources/assets/stylesheets/scss/courseware/blocks/lti.scss @@ -8,7 +8,7 @@ } .cw-block-lti-icon-tool { - @include background-icon(plugin, info, 24); + @include background-icon(plugin, info, 24px); background-repeat: no-repeat; display: block; padding: 16px 16px 16px 40px; diff --git a/resources/assets/stylesheets/scss/courseware/containers/default-container.scss b/resources/assets/stylesheets/scss/courseware/containers/default-container.scss index 948339ce94651c0668f218b5503fd363ba6b60c1..5f73f4c757b7e383e3324b8a8cef7862b4100111 100644 --- a/resources/assets/stylesheets/scss/courseware/containers/default-container.scss +++ b/resources/assets/stylesheets/scss/courseware/containers/default-container.scss @@ -30,7 +30,7 @@ color: var(--base-color); font-weight: 700; line-height: 2em; - font-size: 1.1em; + font-size: 16px; &.cw-default-container-blocker-warning { font-weight: 400; @@ -38,7 +38,8 @@ } img { - vertical-align: text-bottom; + vertical-align: middle; + margin-bottom: 2px; } .cw-container-actions { diff --git a/resources/assets/stylesheets/scss/courseware/layouts/collapsible.scss b/resources/assets/stylesheets/scss/courseware/layouts/collapsible.scss index 1e71346fb83c4256a398ed56548ade8fd30ca503..39b6514dc04ea7252ba9058fd133296069ff5daf 100644 --- a/resources/assets/stylesheets/scss/courseware/layouts/collapsible.scss +++ b/resources/assets/stylesheets/scss/courseware/layouts/collapsible.scss @@ -5,7 +5,7 @@ margin-bottom: -1px; .cw-collapsible-title { - @include background-icon(arr_1right, clickable); + @include background-icon(arr_1right); background-position: 6px center; background-repeat: no-repeat; background-color: var(--content-color-20); @@ -16,7 +16,7 @@ cursor: pointer; &.cw-collapsible-open { - @include background-icon(arr_1down, clickable); + @include background-icon(arr_1down); .cw-container-list-sort-mode { margin-top: 8px; diff --git a/resources/assets/stylesheets/scss/courseware/layouts/companion.scss b/resources/assets/stylesheets/scss/courseware/layouts/companion.scss index acd1abc98df5feef588ca20d6d82ab30e50e9242..dc80d3962a41ad3099fcea3a2cc8d9be8b627e72 100644 --- a/resources/assets/stylesheets/scss/courseware/layouts/companion.scss +++ b/resources/assets/stylesheets/scss/courseware/layouts/companion.scss @@ -55,8 +55,8 @@ $companion-types: ( position: absolute; top: 7px; right: 7px; - height: 16px; - width: 16px; + height: var(--icon-size-default); + width: var(--icon-size-default); border: none; cursor: pointer; } @@ -92,4 +92,4 @@ $companion-types: ( margin: 0 1em 10px 0; color: var(--black); } -} \ No newline at end of file +} diff --git a/resources/assets/stylesheets/scss/courseware/layouts/radioset.scss b/resources/assets/stylesheets/scss/courseware/layouts/radioset.scss index a65a189b3a1eac6ad2679136f415602e75a3584b..0be379b606f1015d1da0b86bc9ddf1b11ed4ccad 100644 --- a/resources/assets/stylesheets/scss/courseware/layouts/radioset.scss +++ b/resources/assets/stylesheets/scss/courseware/layouts/radioset.scss @@ -27,7 +27,7 @@ $radio-icons: ( width: 100%; margin: 0; cursor: pointer; - @include background-icon(radiobutton-unchecked, clickable); + @include background-icon(radiobutton-unchecked); background-position: center 104px; background-repeat: no-repeat; @@ -48,7 +48,7 @@ $radio-icons: ( @each $type, $icon in $radio-icons { &.#{$type} { - @include background-icon(#{$icon}, clickable, 48); + @include background-icon(#{$icon}, $size: 48px); } } } @@ -71,11 +71,11 @@ $radio-icons: ( border-color: var(--base-color); background-color: var(--content-color-20); label { - @include background-icon(check-circle, clickable); + @include background-icon(check-circle); .label-icon { @each $type, $icon in $radio-icons { &.#{$type} { - @include background-icon(#{$icon}, info, 48); + @include background-icon(#{$icon}, $size: 48px); } } } @@ -85,4 +85,4 @@ $radio-icons: ( margin-right: 0; } } -} \ No newline at end of file +} diff --git a/resources/assets/stylesheets/scss/courseware/layouts/ribbon.scss b/resources/assets/stylesheets/scss/courseware/layouts/ribbon.scss index 28ecfbe2c716d4d53911c9f65d5aea62c87310c0..1b4169aa2cc745420a27bc9a4d7a99e7dc709b96 100644 --- a/resources/assets/stylesheets/scss/courseware/layouts/ribbon.scss +++ b/resources/assets/stylesheets/scss/courseware/layouts/ribbon.scss @@ -175,27 +175,27 @@ $consum_ribbon_width: calc(100% - 58px); cursor: pointer; &.cw-ribbon-button-menu { - @include background-icon(table-of-contents, clickable, 24); + @include background-icon(table-of-contents, $size: 24px); } &.cw-ribbon-button-prev { - @include background-icon(arr_1left, clickable, 24); + @include background-icon(arr_1left, $size: 24px); margin: 0 0.5em 0 0; } &.cw-ribbon-button-next { - @include background-icon(arr_1right, clickable, 24); + @include background-icon(arr_1right, $size: 24px); margin: 0 0.5em 0 0; } &.cw-ribbon-button-prev-disabled { - @include background-icon(arr_1left, inactive, 24); + @include background-icon(arr_1left, inactive, 24px); margin: 0 0.5em 0 0; cursor: default; } &.cw-ribbon-button-next-disabled { - @include background-icon(arr_1right, inactive, 24); + @include background-icon(arr_1right, inactive, 24px); margin: 0 0.5em 0 0; cursor: default; } @@ -269,7 +269,7 @@ $consum_ribbon_width: calc(100% - 58px); right: 0; top: 12px; cursor: pointer; - @include background-icon(decline, clickable, 24); + @include background-icon(decline, $size: 24px); background-repeat: no-repeat; background-size: 24px; background-position: center right; diff --git a/resources/assets/stylesheets/scss/courseware/layouts/tabs.scss b/resources/assets/stylesheets/scss/courseware/layouts/tabs.scss index 023b31d162b2e3a435f06c7f81d1a5c05997c82e..0f653eb3dc8e6b79c18247864f0b4ecfc97952c0 100644 --- a/resources/assets/stylesheets/scss/courseware/layouts/tabs.scss +++ b/resources/assets/stylesheets/scss/courseware/layouts/tabs.scss @@ -49,8 +49,8 @@ background-position: left bottom; display: inline-block; - height: 16px; - width: 16px; + height: var(--icon-size-inline); + width: var(--icon-size-inline); margin-bottom: -2px; padding-left: 4px; content: ''; @@ -71,7 +71,7 @@ width: 24px; content: ''; - @include background-icon($icon, clickable, 24); + @include background-icon($icon, $size: 24px); background-repeat: no-repeat; background-position: center; } @@ -79,7 +79,7 @@ &.is-active.cw-tabs-nav-icon-solo-#{$icon}, &.cw-tabs-nav-icon-solo-#{$icon}:hover { &::before { - @include background-icon($icon, info); + @include background-icon($icon, info, 24px); } } } diff --git a/resources/assets/stylesheets/scss/courseware/layouts/talk-bubble.scss b/resources/assets/stylesheets/scss/courseware/layouts/talk-bubble.scss index c3d30c2f84fc3f8962864da939e62cb004613fba..84683dd7fd91f3b84b7934daa3954fd53e39b64b 100644 --- a/resources/assets/stylesheets/scss/courseware/layouts/talk-bubble.scss +++ b/resources/assets/stylesheets/scss/courseware/layouts/talk-bubble.scss @@ -62,12 +62,12 @@ $ownColor: var(--petrol-40); } } - &:after { + &::after { content: ' '; position: absolute; width: 0; height: 0; - top: 0px; + top: 0; bottom: auto; border: 16px solid; border-color: $color transparent transparent transparent; @@ -96,4 +96,4 @@ $ownColor: var(--petrol-40); flex-direction: row-reverse; } } -} \ No newline at end of file +} diff --git a/resources/assets/stylesheets/scss/courseware/layouts/tile.scss b/resources/assets/stylesheets/scss/courseware/layouts/tile.scss index 7b56857b0d4b0519cdb32cbd8f1a953e93a9df6c..022dde9fe94dafc0a426a0d0d2d3c088d7a43382 100644 --- a/resources/assets/stylesheets/scss/courseware/layouts/tile.scss +++ b/resources/assets/stylesheets/scss/courseware/layouts/tile.scss @@ -32,7 +32,7 @@ .overlay-handle { @extend .drag-handle; - background-color: $white; + background-color: var(--white); background-position: center !important; height: 22px; padding: 4px 8px; @@ -57,7 +57,7 @@ .overlay-text-bottom { padding: 6px 7px; - margin: 146px -33px 4px 4px; + margin: 146px -33px 4px 4px; background-color: rgba(255, 255, 255, 0.8); width: fit-content; max-width: 100%; diff --git a/resources/assets/stylesheets/scss/courseware/layouts/tree.scss b/resources/assets/stylesheets/scss/courseware/layouts/tree.scss index 10469a3e6cc6b0404b58be8b5788f48867257fc4..1ff0312afeb0f8ea226e8d48f89b83e2f1b05916 100644 --- a/resources/assets/stylesheets/scss/courseware/layouts/tree.scss +++ b/resources/assets/stylesheets/scss/courseware/layouts/tree.scss @@ -77,7 +77,7 @@ width: calc(100% - 38px); } - @include background-icon(bullet-dot, clickable, 18); + @include background-icon(bullet-dot, $size: 18px); } form { display: inline; @@ -87,10 +87,10 @@ display: inline-block; &:hover { - @include background-icon(bullet-dot, attention, 18); + @include background-icon(bullet-dot, attention, 18px); } &.cw-tree-item-link-current { - @include background-icon(bullet-dot, info, 18); + @include background-icon(bullet-dot, info, 18px); } } } @@ -163,19 +163,19 @@ @each $type, $icon in $tree-item-flag-icons { .cw-tree-item-flag-#{$type} { - width: 16px; - height: 16px; + width: var(--icon-size-inline); + height: var(--icon-size-inline); vertical-align: top; float: right; - @include background-icon(#{$icon}, clickable, 16); + @include background-icon(#{$icon}, $size: $icon-size-inline); } &:hover .cw-tree-item-flag-#{$type} { - @include background-icon(#{$icon}, attention, 16); + @include background-icon(#{$icon}, $size: $icon-size-inline); } &.cw-tree-item-link-current .cw-tree-item-flag-#{$type} { - @include background-icon(#{$icon}, info, 16); + @include background-icon(#{$icon}, $size: $icon-size-inline); } } } @@ -186,10 +186,10 @@ right: 8px; &.cw-tree-item-sequential-complete { - width: 16px; - height: 16px; + width: var(--icon-size-inline); + height: var(--icon-size-inline); vertical-align: top; - @include background-icon(accept, info, 16); + @include background-icon(accept, info, $icon-size-inline); } &.cw-tree-item-sequential-percentage { diff --git a/resources/assets/stylesheets/scss/courseware/structural-element.scss b/resources/assets/stylesheets/scss/courseware/structural-element.scss index 9bf9dec4541f82cf80356ed74b4584ce4badbb7a..565f0da3a536affac08844cedac8a01210c3076f 100644 --- a/resources/assets/stylesheets/scss/courseware/structural-element.scss +++ b/resources/assets/stylesheets/scss/courseware/structural-element.scss @@ -168,7 +168,7 @@ background-size: 100% auto; background-repeat: no-repeat; background-position: center; - @include background-icon(courseware, clickable, 128); + @include background-icon(courseware, $size: 128px); margin-bottom: 1em; } @@ -197,7 +197,7 @@ height: 24px; border: none; background-color: transparent; - @include background-icon(trash, clickable); + @include background-icon(trash); background-repeat: no-repeat; cursor: pointer; } diff --git a/resources/assets/stylesheets/scss/courseware/widgets.scss b/resources/assets/stylesheets/scss/courseware/widgets.scss index 44b069bd72a57e738c7b4fed4f864d69a2100461..cef91c5dc88c2d64cc4abeb6461f33eb56aefb7a 100644 --- a/resources/assets/stylesheets/scss/courseware/widgets.scss +++ b/resources/assets/stylesheets/scss/courseware/widgets.scss @@ -1,59 +1,59 @@ .cw-action-widget { .cw-action-widget-show-toc { - @include background-icon(table-of-contents, clickable); + @include background-icon(table-of-contents); } .cw-action-widget-edit { - @include background-icon(edit, clickable); + @include background-icon(edit); } .cw-action-widget-sort { - @include background-icon(arr_1sort, clickable); + @include background-icon(arr_1sort); } .cw-action-widget-add { - @include background-icon(add, clickable); + @include background-icon(add); } .cw-action-widget-export { - @include background-icon(export, clickable); + @include background-icon(export); } .cw-action-widget-info { - @include background-icon(info, clickable); + @include background-icon(info); } .cw-action-widget-star { - @include background-icon(star, clickable); + @include background-icon(star); } .cw-action-widget-trash { - @include background-icon(trash, clickable); + @include background-icon(trash); } .cw-action-widget-oer { - @include background-icon(oer-campus, clickable); + @include background-icon(oer-campus); } .cw-action-widget-remove-lock { - @include background-icon(lock-unlocked, clickable); + @include background-icon(lock-unlocked); } } .cw-export-widget { .cw-export-widget-export { - @include background-icon(export, clickable); + @include background-icon(export); } .cw-export-widget-export-pdf { - @include background-icon(export, clickable); + @include background-icon(export); } .cw-export-widget-oer { - @include background-icon(share, clickable); + @include background-icon(share); } } .cw-import-widget { .cw-import-widget-archive { - @include background-icon(import, clickable); + @include background-icon(import); } .cw-import-widget-copy { - @include background-icon(copy, clickable); + @include background-icon(copy); } .cw-import-widget-import { - @include background-icon(import, clickable); + @include background-icon(import); } .cw-action-widget-link { - @include background-icon(group, clickable); + @include background-icon(group); } } diff --git a/resources/assets/stylesheets/scss/css_tree.scss b/resources/assets/stylesheets/scss/css_tree.scss index 69cc50ee372b115303c6acac6d517c499c836d6d..d446b9c28e20cb9d9306cf2115845bf3bef9aca9 100644 --- a/resources/assets/stylesheets/scss/css_tree.scss +++ b/resources/assets/stylesheets/scss/css_tree.scss @@ -52,7 +52,7 @@ $css-tree-border: 1px solid var(--light-gray-color-80); input[type=checkbox] { display: none; + label { - @include icon(before, arr_1right, clickable); + @include icon(before, arr_1right); cursor: pointer; &:before { diff --git a/resources/assets/stylesheets/scss/dialog.scss b/resources/assets/stylesheets/scss/dialog.scss index bd8ad030e68f2739b58b43ece6767c9b18f3016f..3db493a329c3f66a2b1abd19f98e40bcbff0ea0c 100644 --- a/resources/assets/stylesheets/scss/dialog.scss +++ b/resources/assets/stylesheets/scss/dialog.scss @@ -38,7 +38,7 @@ padding: 0; } .ui-icon { - @include square(16px); + @include square($icon-size-default); @include background-icon(decline, info_alt); background-position: 0; display:inline-block; @@ -113,7 +113,7 @@ } } .ui-dialog-titlebar-wiki { - @include background-icon(question-circle, info_alt, 24); + @include background-icon(question-circle, info_alt, 24px); background-position: center; background-repeat: no-repeat; display: inline-block; @@ -151,7 +151,7 @@ border: 0; .ui-icon, .ui-icon:hover { - @include background-icon(decline, clickable); + @include background-icon(decline); background-position: 0; } } @@ -215,7 +215,7 @@ left: 0; right: 50%; - @include icon(before, arr_1left, clickable, $arrow-size); + @include icon(before, arr_1left, $size: $arrow-size); &::before { position: absolute; left: $arrow-distance; @@ -243,7 +243,7 @@ right: 0; left: 50%; - @include icon(before, arr_1right, clickable, $arrow-size); + @include icon(before, arr_1right, $size: $arrow-size); &::before { position: absolute; right: $arrow-distance; @@ -306,7 +306,7 @@ h2.dialog-subtitle { margin-bottom: 0.25em; } -/* * * * * * * * * +/* * * * * * * * * v u e d i a l o g * * * * * * * * */ @@ -395,7 +395,7 @@ v u e d i a l o g background: var(--active-color) none repeat scroll 0 0; } .studip-dialog-content { - @include background-icon(question-circle-full, attention, 32); + @include background-icon(question-circle-full, attention, 32px); } } &.studip-dialog-warning { @@ -404,12 +404,12 @@ v u e d i a l o g background: var(--activity-color) none repeat scroll 0 0; } .studip-dialog-close-button { - @include background-icon(decline, clickable); + @include background-icon(decline); border: none; background-color: transparent; } .studip-dialog-content { - @include background-icon(question-circle-full, status-yellow, 32); + @include background-icon(question-circle-full, status-yellow, 32px); } } diff --git a/resources/assets/stylesheets/scss/documents.scss b/resources/assets/stylesheets/scss/documents.scss index 936efcf5cf6b11d92b2e16bbd4f2cc3611ba9bd4..b3d1238b8e4cfab53fe286218720e59ddf25a7ea 100644 --- a/resources/assets/stylesheets/scss/documents.scss +++ b/resources/assets/stylesheets/scss/documents.scss @@ -40,13 +40,13 @@ line-height: 1.5em; a { - @include background-icon(folder-parent, clickable, 24); + @include background-icon(folder-parent, $size: 24px); background-position: left center; background-repeat: no-repeat; padding-left: 30px; } &:first-child a { - @include background-icon(folder-empty, clickable, 24); + @include background-icon(folder-empty, $size: 24px); } } } diff --git a/resources/assets/stylesheets/scss/forms.scss b/resources/assets/stylesheets/scss/forms.scss index d526075baf5c3b3cf8a9db6a8ff96582b57e01db..a9cb286fb4217e9cdc57165f42926b8b33c08b74 100644 --- a/resources/assets/stylesheets/scss/forms.scss +++ b/resources/assets/stylesheets/scss/forms.scss @@ -79,7 +79,7 @@ form.default { } input[list] { - @include background-icon(arr_1down, clickable); + @include background-icon(arr_1down); background-repeat: no-repeat; background-position: center right 4px; @@ -276,7 +276,7 @@ form.default { //Special inputs label.file-upload { - @include background-icon(upload, clickable); + @include background-icon(upload); background-repeat: no-repeat; background-position: top left; @@ -396,7 +396,7 @@ form.default { fieldset.collapsable { > legend { box-sizing: border-box; - @include background-icon(arr_1down, clickable, 20); + @include background-icon(arr_1down); background-position: 6px center; background-repeat: no-repeat; cursor: pointer; @@ -405,7 +405,7 @@ form.default { &.collapsed { > legend { - @include background-icon(arr_1right, clickable, 20); + @include background-icon(arr_1right); margin-bottom: 0; } padding-bottom: 0; @@ -510,7 +510,7 @@ form.default { &.show_validation_hints { :invalid, .invalid { - @include icon(before, exclaim-circle, attention, 16px, 5px); + @include icon(before, exclaim-circle, attention, $padding: 5px); display: inline-block; } textarea:invalid, input[type=text]:invalid { diff --git a/resources/assets/stylesheets/scss/forum.scss b/resources/assets/stylesheets/scss/forum.scss index 00ec7cab1dcc5430f7298b2f798bb43631e1c924..0810bae6e8331a9939eda5ac5874559a55c4f40f 100644 --- a/resources/assets/stylesheets/scss/forum.scss +++ b/resources/assets/stylesheets/scss/forum.scss @@ -88,6 +88,10 @@ $shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); td.answer { width: 300px; + + img { + vertical-align: text-bottom; + } } .area_title { @@ -255,7 +259,7 @@ $shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); a.marked div { cursor: pointer; - @include background-icon(staple, clickable, 32px); + @include background-icon(staple, $size: 32px); position: absolute; top: -10px; right: 10px; diff --git a/resources/assets/stylesheets/scss/fullscreen.scss b/resources/assets/stylesheets/scss/fullscreen.scss index 6ecdf0e5ec9693c6b289291966776fa154891832..6897fd68ae0dabfeb387ef084fe783a2955d2c23 100644 --- a/resources/assets/stylesheets/scss/fullscreen.scss +++ b/resources/assets/stylesheets/scss/fullscreen.scss @@ -9,7 +9,7 @@ cursor: pointer; height: 28px; - @include background-icon(zoom-in2, clickable, 20); + @include background-icon(zoom-in2); background-position: center; background-repeat: no-repeat; diff --git a/resources/assets/stylesheets/scss/globalsearch.scss b/resources/assets/stylesheets/scss/globalsearch.scss index cca121cd8d9bf0c6c3a82ab21cd11d748f7fb58b..f6823eb71c8309130056cd2dbefe2ef99bb7d824 100644 --- a/resources/assets/stylesheets/scss/globalsearch.scss +++ b/resources/assets/stylesheets/scss/globalsearch.scss @@ -16,8 +16,9 @@ // Defines the clear icon for the input #globalsearch-clear { - @include square(16px); - margin-left: -22px; + @include square(var(--icon-size-default)); + margin-left: -28px; + margin-top: -5px; vertical-align: middle; } &:not(.has-value) #globalsearch-clear { @@ -95,8 +96,7 @@ header { color: var(--base-color); - margin: 5px; - margin-bottom: 0; + margin: 5px 5px 0; } p { @@ -238,7 +238,7 @@ margin: 20px 0 0 -32px; a { - @include background-icon(arr_1right, clickable, 24); + @include background-icon(arr_1right, $size: 24px); @include square(24px); display: inline-block; } diff --git a/resources/assets/stylesheets/scss/header.scss b/resources/assets/stylesheets/scss/header.scss index 18f007cedfe3423ae9c1ec0125378b1487d7d324..0356ee95c06fd0738402c7482990c66ced04cec3 100644 --- a/resources/assets/stylesheets/scss/header.scss +++ b/resources/assets/stylesheets/scss/header.scss @@ -7,20 +7,20 @@ } #top-bar { background-color: var(--base-color); - border: 1px var(--brand-color-darker); color: var(--contrast-content-white); - border-bottom-style: solid; + border-bottom: 1px solid var(--brand-color-darker); height: $bar-bottom-container-height; width: 100%; min-width: $site-width; + box-sizing: border-box; display: flex; flex: 0 1 auto; flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; - padding: 0 10px; + padding: 0 $page-margin; transform: translate(0, 0) !important; // We need !important due to the horizontal scroll handler position: fixed; top: 0; @@ -45,11 +45,10 @@ justify-content: space-between; list-style-type: none; height: 40px; - padding: 0; + gap: 20px; > li { margin: 2px; - padding: 0 10px; > a { color: var(--white); @@ -187,7 +186,7 @@ } #site-title { - padding: 0 5px; + padding: 0 5px 0 0; } #avatar-menu-container { @@ -211,7 +210,7 @@ border: 1px solid var(--dark-gray-color-40); background-color: var(--dark-gray-color-5); height: 28px; - margin: 0 32px 0 0; + margin: 0 22px 0 0; position: relative; width: 28px; z-index: 1; @@ -227,7 +226,7 @@ &::after { background-position: center; background-repeat: no-repeat; - padding: 7px 8px; + padding: 4px 6px; position: absolute; left: 100%; top: 0; diff --git a/resources/assets/stylesheets/scss/jquery-ui/custom.scss b/resources/assets/stylesheets/scss/jquery-ui/custom.scss index 025c0ffbba711489678646fb29e67afd6f2d66e6..2a7d639a43f9c27d173d7ab89aed3f7b3985ecc2 100644 --- a/resources/assets/stylesheets/scss/jquery-ui/custom.scss +++ b/resources/assets/stylesheets/scss/jquery-ui/custom.scss @@ -206,8 +206,8 @@ a.ui-button:active, /* states and images */ .ui-icon { - width: 16px; - height: 16px; + width: var(--icon-size-default); + height: var(--icon-size-default); } diff --git a/resources/assets/stylesheets/scss/jquery-ui/studip.scss b/resources/assets/stylesheets/scss/jquery-ui/studip.scss index 7bbd93d2b95c0fde68e4d144583a8777fd26bdae..db487f0d4c3d8280445ff573d5e6af8b775e72fa 100644 --- a/resources/assets/stylesheets/scss/jquery-ui/studip.scss +++ b/resources/assets/stylesheets/scss/jquery-ui/studip.scss @@ -158,6 +158,8 @@ textarea.ui-resizable-handle.ui-resizable-s { .ui-datepicker-header .ui-icon { background-image: url(../images/vendor/jquery-ui/ui-icons_ffffff_256x240.png); + height: $icon-size-inline; + width: $icon-size-inline; } .ui-datepicker-calendar .ui-state-active { @@ -176,7 +178,7 @@ textarea.ui-resizable-handle.ui-resizable-s { .has-date-picker, [data-datetime-picker], .has-datetime-picker { - @include background-icon(schedule, clickable, 20px); + @include background-icon(schedule); background-position: right 3px center; background-repeat: no-repeat; min-width: 12ex; @@ -188,7 +190,7 @@ textarea.ui-resizable-handle.ui-resizable-s { .hasTimepicker, [data-time-picker], .has-time-picker { - @include background-icon(date, clickable, 20px); + @include background-icon(date); background-position: right 3px center; background-repeat: no-repeat; min-width: 10ex; diff --git a/resources/assets/stylesheets/scss/links.scss b/resources/assets/stylesheets/scss/links.scss index b92e1ccc509d8b9d27553e321e8f1e083288ac8a..33da2748acaeec217ca1857186b61f89edbef4d0 100644 --- a/resources/assets/stylesheets/scss/links.scss +++ b/resources/assets/stylesheets/scss/links.scss @@ -28,16 +28,16 @@ a:hover.toolbar { } a.link-intern { - @include icon(before, link-intern, clickable, 16px, 2px); + @include icon(before, link-intern, $padding: 2px, $inline: true); } a.link-extern { - @include icon(before, link-extern, clickable, 16px, 2px); + @include icon(before, link-extern, $padding: 2px, $inline: true); } a.link-add { - @include icon(before, add, clickable, 16px, 2px); + @include icon(before, add, $padding: 2px, $inline: true); } a.link-edit { - @include icon(before, edit, clickable, 16px, 2px); + @include icon(before, edit, $padding: 2px, $inline: true); } a img { diff --git a/resources/assets/stylesheets/scss/messagebox.scss b/resources/assets/stylesheets/scss/messagebox.scss index 7d0faa8f20d452572385fcc46ea59e877d57f3bf..6f34ef8a344aa51c8af8e26d281323fa6450e97d 100644 --- a/resources/assets/stylesheets/scss/messagebox.scss +++ b/resources/assets/stylesheets/scss/messagebox.scss @@ -20,12 +20,12 @@ div.messagebox { a { background: transparent no-repeat center center; - background-size: 16px 16px; + background-size: var(--icon-size-default) var(--icon-size-default); display: inline-block; margin: 1px; - width: 16px; - height: 16px; + width: var(--icon-size-default); + height: var(--icon-size-default); &.close, &.details { diff --git a/resources/assets/stylesheets/scss/messages.scss b/resources/assets/stylesheets/scss/messages.scss index d9f368357447ddab1ae1fbf55328c792dc536fb0..a3849d6a0ec509ea33b5c774093c5173565b6ef0 100644 --- a/resources/assets/stylesheets/scss/messages.scss +++ b/resources/assets/stylesheets/scss/messages.scss @@ -8,7 +8,7 @@ a.message-tag { white-space: nowrap; - @include icon(before, tag, clickable); + @include icon(before, tag); } #statusbar_container { diff --git a/resources/assets/stylesheets/scss/mvv.scss b/resources/assets/stylesheets/scss/mvv.scss index fef7505f9322fab85d0c3568af97a1a6150ea51e..289b50ebc575f22c988340f1a6d18dc8041aa507 100644 --- a/resources/assets/stylesheets/scss/mvv.scss +++ b/resources/assets/stylesheets/scss/mvv.scss @@ -256,7 +256,7 @@ ul { } &.mvv-modul li { - @include icon(before, learnmodule, info, 16px, 2px); + @include icon(before, learnmodule, info, $padding: 2px); padding-left: 20px; } @@ -264,29 +264,29 @@ ul { width: 100%; & li { - @include icon(before, person, info, 16px, 2px); + @include icon(before, person, info, $padding: 2px); padding-left: 20px; } } &.mvv-faecher li { - @include icon(before, file, info, 16px, 2px); + @include icon(before, file, info, $padding: 2px); padding-left: 20px; } &.mvv-dokumente li { > div:first-child { - @include icon(before, file, info, 16px, 2px); + @include icon(before, file, info, $padding: 2px); } } &.mvv-institute li { - @include icon(before, institute, info, 16px, 2px); + @include icon(before, institute, info, $padding: 2px); padding-left: 20px; } &.mvv-languages li { - @include icon(before, consultation, info, 16px, 2px); + @include icon(before, consultation, info, $padding: 2px); padding-left: 20px; } @@ -418,7 +418,7 @@ select.mvv-search-select-list { } #mvv-chooser-toggle { - @include icon(before,'arr_2up', 'clickable', 16px, 2px); + @include icon(before, arr_2up, $padding: 2px); width: 20px; height: 20px; float: right; @@ -443,7 +443,7 @@ select.mvv-search-select-list { } .mvv-chooser-hidden { - @include icon(before,'arr_2down', 'clickable', 16px, 2px); + @include icon(before, arr_2down, $padding: 2px); } .mvv-search-reset { diff --git a/resources/assets/stylesheets/scss/plugins.scss b/resources/assets/stylesheets/scss/plugins.scss index 1673ad7c05773a8a27ddb0cb28c51f94ccb49ec1..0805f706a1a1866dbd72b73259629dd1b30beab4 100644 --- a/resources/assets/stylesheets/scss/plugins.scss +++ b/resources/assets/stylesheets/scss/plugins.scss @@ -36,7 +36,7 @@ } .read_more_link { - @include icon(before, add, clickable); + @include icon(before, add); span { vertical-align: middle; diff --git a/resources/assets/stylesheets/scss/plus.scss b/resources/assets/stylesheets/scss/plus.scss index ea0b7b35f14da566e3f80cbc4af505f63b21ae11..5c032cd0e6d7981a2a68ca443dcaadc27e7ab07e 100644 --- a/resources/assets/stylesheets/scss/plus.scss +++ b/resources/assets/stylesheets/scss/plus.scss @@ -10,11 +10,6 @@ margin-left: 20px; } - .plugin_icon { - width: 16px; - height: 16px; - } - .shortdesc { margin-left: 3px; } diff --git a/resources/assets/stylesheets/scss/progress_indicator.scss b/resources/assets/stylesheets/scss/progress_indicator.scss index 1bf0d1a34d0982335da35ce1bb64bd177be7e98c..12ea750b6e68754a1369040cc769f2c4a12ce609 100644 --- a/resources/assets/stylesheets/scss/progress_indicator.scss +++ b/resources/assets/stylesheets/scss/progress_indicator.scss @@ -24,7 +24,7 @@ } @media (prefers-reduced-motion) { .progress-indicator { - @include background-icon(refresh, info, 32); + @include background-icon(refresh, info, 32px); } .progress-indicator-description-default { display: block; diff --git a/resources/assets/stylesheets/scss/raumzeit.scss b/resources/assets/stylesheets/scss/raumzeit.scss index c14e01114074c5db4729136fb13baedc7941e981..982cebc83dac804521c46b65ce293b9d9ea5192d 100644 --- a/resources/assets/stylesheets/scss/raumzeit.scss +++ b/resources/assets/stylesheets/scss/raumzeit.scss @@ -64,7 +64,7 @@ div.at_least_one_teacher { // Show visual toggle indicator header h1 a { - @include icon(before, arr_1right, clickable); + @include icon(before, arr_1right); } &.open { diff --git a/resources/assets/stylesheets/scss/report.scss b/resources/assets/stylesheets/scss/report.scss index 3e89af696fcb7b769addf6ce0e2695f1415239e9..d00ce06e35a00acd564a819e5bdf55ed1ee9cdd0 100644 --- a/resources/assets/stylesheets/scss/report.scss +++ b/resources/assets/stylesheets/scss/report.scss @@ -62,7 +62,7 @@ .ui-button-icon { .ui-icon { .ui-icon-closethick { - @include background-icon(decline, clickable); + @include background-icon(decline); } } } diff --git a/resources/assets/stylesheets/scss/resources.scss b/resources/assets/stylesheets/scss/resources.scss index 1d792a37988869c786404697da2bcbdbadbfb257..517ad473ed81a65ea6b2ef6d47acdf7a9d42051d 100644 --- a/resources/assets/stylesheets/scss/resources.scss +++ b/resources/assets/stylesheets/scss/resources.scss @@ -361,8 +361,8 @@ ul.resource-tree { a.request-marking-icon { background-repeat: no-repeat; display: block; - width: 16px; - height: 16px; + width: var(--icon-size-default); + height: var(--icon-size-default); @include background-icon(radiobutton-unchecked); &[data-marked="1"] { diff --git a/resources/assets/stylesheets/scss/search.scss b/resources/assets/stylesheets/scss/search.scss index d5a269159cdfc3fdfa79d0734766ca86ec4bdbb7..535306f3b951a449e00b8bce2628b0e8597129cc 100644 --- a/resources/assets/stylesheets/scss/search.scss +++ b/resources/assets/stylesheets/scss/search.scss @@ -155,7 +155,7 @@ label.inactive-settings-category { margin: 20px 0 0 -32px; a { - @include background-icon(arr_1right, clickable, 24); + @include background-icon(arr_1right, $size: 24px); @include square(24px); display: inline-block; } @@ -210,13 +210,13 @@ div#div-search-input { background-repeat: no-repeat; content: " "; float: right; - height: 16px; - width: 16px; - @include background-icon(trash, clickable); + height: var(--icon-size-default); + width: var(--icon-size-default); + @include background-icon(trash); } &:hover::before { - @include background-icon(trash, clickable); + @include background-icon(trash); } } } diff --git a/resources/assets/stylesheets/scss/selects.scss b/resources/assets/stylesheets/scss/selects.scss index 45cd6c1df0de03c300f6cb8653bff2ef2eb42a79..16bb90c546ca7b6980ff8ce24d08068b87729aaa 100644 --- a/resources/assets/stylesheets/scss/selects.scss +++ b/resources/assets/stylesheets/scss/selects.scss @@ -2,7 +2,7 @@ $select-border: 1px solid var(--light-gray-color-40); $select-border-focus: 1px solid var(--brand-color-dark); $select-border-radius: 0; $select-height-default: 30px; -$select-arrow-size: 10; +$select-arrow-size: 10px; select { // Reset appearance @@ -26,7 +26,7 @@ select { // to ensure the icon is always clearly visible padding-right: 20px; - @include background-icon(arr_1down, clickable, $select-arrow-size); + @include background-icon(arr_1down, $size: $select-arrow-size); background-position: right 4px center; background-repeat: no-repeat; @@ -92,7 +92,7 @@ select { .select2-selection--single { .select2-selection__clear { - @include background-icon(decline, clickable, $select-arrow-size); + @include background-icon(decline, $size: $select-arrow-size); background-position: right center; background-repeat: no-repeat; color: transparent; @@ -119,13 +119,13 @@ select { .select2-selection--multiple { padding-right: ($select-arrow-size + 5px); - @include background-icon('arr_1down', 'clickable', $select-arrow-size); + @include background-icon(arr_1down, $size: $select-arrow-size); $backgroundPosition: calc($select-height-default / 2 - 4px); background-position: right 4px top $backgroundPosition; background-repeat: no-repeat; .select2-selection__choice__remove { - @include background-icon('decline', 'clickable', $select-arrow-size); + @include background-icon(decline, $size: $select-arrow-size); background-position: right center; background-repeat: no-repeat; color: transparent !important; @@ -151,7 +151,7 @@ select { } .select2-selection__arrow { - @include background-icon('arr_1down', 'clickable', $select-arrow-size); + @include background-icon(arr_1down, $size: $select-arrow-size); background-position: right 4px center; background-repeat: no-repeat; diff --git a/resources/assets/stylesheets/scss/sidebar.scss b/resources/assets/stylesheets/scss/sidebar.scss index d27418b66396a438d239549df9f463b52e52b7d0..8f270b0070863bb4e5c66e7d781303c175f0673f 100644 --- a/resources/assets/stylesheets/scss/sidebar.scss +++ b/resources/assets/stylesheets/scss/sidebar.scss @@ -1,4 +1,4 @@ -$icon-size: 16px; +$icon-size: 20px; #sidebar { background: var(--white); @@ -87,10 +87,10 @@ $icon-size: 16px; // Links inside the sidebar a.link-intern { - @include icon(before, link-intern, clickable, $icon-size, 2px); + @include icon(before, link-intern, $padding: 2px); } a.link-extern { - @include icon(before, link-extern, clickable, $icon-size, 2px); + @include icon(before, link-extern, $padding: 2px); } // Prevent selects from growing too large @@ -114,8 +114,8 @@ ul.widget-list { border-left: solid 4px var(--white); > *:not(label) { - padding: 4px 0 4px 24px; - line-height: $icon-size + 1; + padding: 4px 0 4px 28px; + line-height: $icon-size; } &:has(>button:not(.options-radio, .options-checkbox)), &:has(>a):not(:last-child) { @@ -130,7 +130,7 @@ ul.widget-list { &:hover { background-color: var(--color--sidebar-active); - border-left: solid 4px var(--color--sidebar-marker-active); + border-left-color: var(--color--sidebar-marker-active); a, button { color: var(--color--font-primary); @@ -245,14 +245,19 @@ div#sidebar-navigation { > li { margin-left: 0; - padding-left: 2px; + padding-left: 0; + border: none; + + &:hover { + background-color: unset; + } } .options-checkbox { background-repeat: no-repeat; background-position: 2px center; display: block; - padding-left: 24px; + padding-left: 28px; &.options-checked { @include background-icon(checkbox-checked); @@ -269,7 +274,7 @@ div#sidebar-navigation { background-repeat: no-repeat; background-position: 2px center; display: block; - padding-left: 24px; + padding-left: 28px; &.options-checked { @include background-icon(radiobutton-checked); diff --git a/resources/assets/stylesheets/scss/studip-cke-ui.scss b/resources/assets/stylesheets/scss/studip-cke-ui.scss index 750a35b2d4d193657a36e5ca59210eecaadef4ce..8c2a06a6318518f79b016afe64ad9eea3aab7089 100644 --- a/resources/assets/stylesheets/scss/studip-cke-ui.scss +++ b/resources/assets/stylesheets/scss/studip-cke-ui.scss @@ -86,13 +86,13 @@ } .ck.ck-button.ck-off.ck-button-save { - @include background-icon(accept, clickable, 24); + @include background-icon(accept, $size: 24px); background-position: center; background-repeat: no-repeat; } .ck.ck-button.ck-off.ck-button-cancel { - @include background-icon(decline, clickable, 24); + @include background-icon(decline, $size: 24px); background-position: center; background-repeat: no-repeat; } @@ -138,15 +138,15 @@ } .ck.ck-button.ck-off.ck-button-save:hover:not(.ck-disabled) { - @include background-icon(accept, info_alt, 24); + @include background-icon(accept, info_alt, 24px); } .ck.ck-button.ck-off.ck-button-save.ck-disabled { - @include background-icon(accept, inactive, 24); + @include background-icon(accept, inactive, 24px); } .ck.ck-button.ck-off.ck-button-cancel:hover { - @include background-icon(decline, info_alt, 24); + @include background-icon(decline, info_alt, 24px); } .ck.ck-button.ck-off.ck-button-save svg, diff --git a/resources/assets/stylesheets/scss/studip-selection.scss b/resources/assets/stylesheets/scss/studip-selection.scss index a2bbcc71371bc8f8a8dd7a8d0cef6c7123740bce..6b940413b7e381a0f79aecd3b43acac797f5c494 100644 --- a/resources/assets/stylesheets/scss/studip-selection.scss +++ b/resources/assets/stylesheets/scss/studip-selection.scss @@ -50,11 +50,11 @@ } .studip-selection-selected .studip-selection-label { - @include icon(before, radiobutton-checked, clickable); + @include icon(before, radiobutton-checked); } .studip-selection-selectable .studip-selection-label { - @include icon(before, radiobutton-unchecked, clickable); + @include icon(before, radiobutton-unchecked); } .studip-selection-image + .studip-selection-label { @@ -66,14 +66,14 @@ .studip-selection-selected li:hover { .studip-selection-image, .studip-selection-label::before { - @include background-icon(remove-circle-full, clickable); + @include background-icon(remove-circle-full); } } .studip-selection-selectable li:hover { .studip-selection-image, .studip-selection-label::before { - @include background-icon(add-circle-full, clickable); + @include background-icon(add-circle-full); } } diff --git a/resources/assets/stylesheets/scss/tables.scss b/resources/assets/stylesheets/scss/tables.scss index 288c667ef0394e679738a7b46f2811e9b2c2c46a..08ec3e006d8481d4b9fd37da5aa007173850afe9 100644 --- a/resources/assets/stylesheets/scss/tables.scss +++ b/resources/assets/stylesheets/scss/tables.scss @@ -271,11 +271,11 @@ tr.sortable { } th.sortasc { - @include icon('after', 'arr_1up', 'clickable'); + @include icon('after', 'arr_1up', 'clickable', $icon-size-inline); } th.sortdesc { - @include icon('after', 'arr_1down', 'clickable'); + @include icon('after', 'arr_1down', 'clickable', $icon-size-inline); } } @@ -669,10 +669,10 @@ table.default { @include hide-text(); @include background-icon(arr_1down); display: inline-block; - height: 16px; + height: $icon-size-inline; text-align: center; vertical-align: top; - width: 16px; + width: $icon-size-inline; } } @@ -796,11 +796,11 @@ table.withdetails { background-repeat: no-repeat; content: ' '; display: inline-block; - height: 16px; + height: $icon-size-inline; margin-left: 0; - @include background-icon('arr_1#{$direction}'); + @include background-icon('arr_1#{$direction}', clickable, $icon-size-inline); vertical-align: text-bottom; - width: 16px; + width: $icon-size-inline; } } @@ -817,11 +817,11 @@ table.withdetails { } &.tablesorter-headerDesc:hover .tablesorter-header-inner::after { - @include background-icon(arr_1down, status-red); + @include background-icon(arr_1down, status-red, $icon-size-inline); } &.tablesorter-headerAsc:hover .tablesorter-header-inner::after { - @include background-icon(arr_1up, status-red); + @include background-icon(arr_1up, status-red, $icon-size-inline); } } diff --git a/resources/assets/stylesheets/scss/talk-bubble.scss b/resources/assets/stylesheets/scss/talk-bubble.scss index 380fb6dfc6bccf316b4b71a757f3976e07678702..2da274df8d32c86a2c88235a5a305ed0a1e2caa6 100644 --- a/resources/assets/stylesheets/scss/talk-bubble.scss +++ b/resources/assets/stylesheets/scss/talk-bubble.scss @@ -109,12 +109,12 @@ $ownColor: var(--petrol-40); } } - &:after { + &::after { content: ' '; position: absolute; width: 0; height: 0; - top: 0px; + top: 0; bottom: auto; border: 16px solid; border-color: $color transparent transparent transparent; diff --git a/resources/assets/stylesheets/scss/tooltip.scss b/resources/assets/stylesheets/scss/tooltip.scss index 873eeede2382ebe456416652b1bdd73d6b7d1b5a..34e635241ea35f2d0400bf67bbe9428c0837ce0a 100644 --- a/resources/assets/stylesheets/scss/tooltip.scss +++ b/resources/assets/stylesheets/scss/tooltip.scss @@ -27,12 +27,13 @@ cursor: help; display: inline-block; position: relative; + vertical-align: text-bottom; &.tooltip-icon { - @include icon(before, info-circle, inactive); + @include icon(before, info-circle, inactive, $icon-size-inline); } &.tooltip-important { - @include icon(before, info-circle, attention); + @include icon(before, info-circle, attention, $icon-size-inline); } .tooltip-content { diff --git a/resources/assets/stylesheets/scss/variables.scss b/resources/assets/stylesheets/scss/variables.scss index 605dca757664277f807ec614181635986dca5672..3b8a73d78ae1105ffd6b00facfe41bc4eef5d1fb 100644 --- a/resources/assets/stylesheets/scss/variables.scss +++ b/resources/assets/stylesheets/scss/variables.scss @@ -37,7 +37,12 @@ $headings-color: #000; $bar-bottom-container-height: 40px; $header-height: 80px; -//Avatar sizes: +// Icons sizes: +$icon-size-default: 20px; +$icon-size-inline: 16px; +$icon-size-button: $icon-size-inline; + +// Avatar sizes: $avatar-small: 25px; $avatar-medium: 100px; $avatar-normal: 250px; @@ -69,194 +74,199 @@ $page-width: ($sidebar-width + $sidebar-padding * 2 + $sidebar-border-width * 2 $grid-gap: 0; :root { - // The special handling for -- as #{"--"} seems to be neccessary to make + // The special handling for -- as -- seems to be neccessary to make // scss evaluate the color variables - #{"--"}text-color: $text-color; - #{"--"}active-color: $active-color; - #{"--"}activity-color: $activity-color; - #{"--"}activity-color-20: $activity-color-20; - #{"--"}activity-color-40: $activity-color-40; - #{"--"}activity-color-60: $activity-color-60; - #{"--"}activity-color-80: $activity-color-80; - #{"--"}base-color: $base-color; - #{"--"}base-color-20: $base-color-20; - #{"--"}base-color-40: $base-color-40; - #{"--"}base-color-60: $base-color-60; - #{"--"}base-color-80: $base-color-80; - #{"--"}base-gray: $base-gray; - #{"--"}black: $black; - #{"--"}brand-color-dark: $brand-color-dark; - #{"--"}brand-color-darker: $brand-color-darker; - #{"--"}brand-color-light: $brand-color-light; - #{"--"}brand-color-lighter: $brand-color-lighter; - #{"--"}brown: $brown; - #{"--"}brown-20: $brown-20; - #{"--"}brown-40: $brown-40; - #{"--"}brown-60: $brown-60; - #{"--"}brown-80: $brown-80; - #{"--"}content-color: $content-color; - #{"--"}content-color-10: $content-color-10; - #{"--"}content-color-20: $content-color-20; - #{"--"}content-color-40: $content-color-40; - #{"--"}content-color-60: $content-color-60; - #{"--"}content-color-80: $content-color-80; - #{"--"}contrast-content-gray: $contrast-content-gray; - #{"--"}contrast-content-hovergray: $contrast-content-hovergray; - #{"--"}contrast-content-white: $contrast-content-white; - #{"--"}dark-gray-color: $dark-gray-color; - #{"--"}dark-gray-color-10: $dark-gray-color-10; - #{"--"}dark-gray-color-15: $dark-gray-color-15; - #{"--"}dark-gray-color-20: $dark-gray-color-20; - #{"--"}dark-gray-color-30: $dark-gray-color-30; - #{"--"}dark-gray-color-40: $dark-gray-color-40; - #{"--"}dark-gray-color-45: $dark-gray-color-45; - #{"--"}dark-gray-color-5: $dark-gray-color-5; - #{"--"}dark-gray-color-60: $dark-gray-color-60; - #{"--"}dark-gray-color-75: $dark-gray-color-75; - #{"--"}dark-gray-color-80: $dark-gray-color-80; - #{"--"}dark-green: $dark-green; - #{"--"}dark-green-20: $dark-green-20; - #{"--"}dark-green-40: $dark-green-40; - #{"--"}dark-green-60: $dark-green-60; - #{"--"}dark-green-80: $dark-green-80; - #{"--"}dark-violet: $dark-violet; - #{"--"}dark-violet-20: $dark-violet-20; - #{"--"}dark-violet-40: $dark-violet-40; - #{"--"}dark-violet-60: $dark-violet-60; - #{"--"}dark-violet-80: $dark-violet-80; - #{"--"}green: $green; - #{"--"}green-20: $green-20; - #{"--"}green-40: $green-40; - #{"--"}green-60: $green-60; - #{"--"}green-80: $green-80; - #{"--"}light-gray-color: $light-gray-color; - #{"--"}light-gray-color-20: $light-gray-color-20; - #{"--"}light-gray-color-40: $light-gray-color-40; - #{"--"}light-gray-color-60: $light-gray-color-60; - #{"--"}light-gray-color-80: $light-gray-color-80; - #{"--"}orange: $orange; - #{"--"}orange-20: $orange-20; - #{"--"}orange-40: $orange-40; - #{"--"}orange-60: $orange-60; - #{"--"}orange-80: $orange-80; - #{"--"}origin-base-color: $origin-base-color; - #{"--"}petrol: $petrol; - #{"--"}petrol-20: $petrol-20; - #{"--"}petrol-40: $petrol-40; - #{"--"}petrol-60: $petrol-60; - #{"--"}petrol-80: $petrol-80; - #{"--"}public-course-bgcolor: $public-course-bgcolor; - #{"--"}red: $red; - #{"--"}red-20: $red-20; - #{"--"}red-40: $red-40; - #{"--"}red-60: $red-60; - #{"--"}red-80: $red-80; - #{"--"}table-footer-color: $color--table-header; - #{"--"}table-header-color: $color--table-header; - #{"--"}violet: $violet; - #{"--"}violet-20: $violet-20; - #{"--"}violet-40: $violet-40; - #{"--"}violet-60: $violet-60; - #{"--"}violet-80: $violet-80; - #{"--"}white: $white; - #{"--"}yellow: $yellow; - #{"--"}yellow-20: $yellow-20; - #{"--"}yellow-40: $yellow-40; - #{"--"}yellow-60: $yellow-60; - #{"--"}yellow-80: $yellow-80; - - #{"--"}group-color-0: $dark-violet; - #{"--"}group-color-1: $violet; - #{"--"}group-color-2: $red; - #{"--"}group-color-3: $orange; - #{"--"}group-color-4: $yellow; - #{"--"}group-color-5: $green; - #{"--"}group-color-6: $dark-green; - #{"--"}group-color-7: $petrol; - #{"--"}group-color-8: $brown; - - #{"--"}avatar-small: $avatar-small; - #{"--"}avatar-medium: $avatar-medium; - #{"--"}avatar-normal: $avatar-normal; - - #{"--"}transition-duration: $transition-duration; - #{"--"}transition-duration-slow: $transition-duration-slow; - #{"--"}transition-duration-superslow: $transition-duration-superslow; - - #{"--"}color--blue-1: $color--blue-1; - #{"--"}color--gray-1: $color--gray-1; - #{"--"}color--gray-2: $color--gray-2; - #{"--"}color--gray-3: $color--gray-3; - #{"--"}color--gray-4: $color--gray-4; - #{"--"}color--gray-5: $color--gray-5; - #{"--"}color--gray-6: $color--gray-6; - #{"--"}color--gray-7: $color--gray-7; - #{"--"}color--green-1: $color--green-1; - #{"--"}color--red-1: $color--red-1; - #{"--"}color--white: $color--white; - #{"--"}color--yellow-1: $color--yellow-1; - - #{"--"}color--global-background: $color--global-background; - - #{"--"}color--brand-primary: $color--brand-primary; - #{"--"}color--brand-secondary: $color--brand-secondary; - - #{"--"}color--font-primary: $color--font-primary; - #{"--"}color--font-secondary: $color--font-secondary; - #{"--"}color--font-inactive: $color--font-inactive; - #{"--"}color--font-inverted: $color--font-inverted; - - #{"--"}color--main-navigation-background: $color--main-navigation-background; - #{"--"}color--main-navigation-border: $color--main-navigation-border; - - #{"--"}color--sidebar-marker-active: $color--sidebar-marker-active; - #{"--"}color--sidebar-marker-focus: $color--sidebar-marker-focus; - #{"--"}color--sidebar-marker-hover: $color--sidebar-marker-hover; - #{"--"}color--sidebar-active:$color--sidebar-active; - #{"--"}color--sidebar-focus: $color--sidebar-focus; - #{"--"}color--sidebar-hover: $color--sidebar-hover; - #{"--"}color--sidebar-divider: $color--sidebar-divider; - - #{"--"}color--dialog-overlay: $color--dialog-overlay; - - #{"--"}color--tile-border-focus: $color--tile-border-focus; - #{"--"}color--tile-border-hover: $color--tile-border-hover; - #{"--"}color--tile-border: $color--tile-border; - #{"--"}color--tile-background: $color--tile-background; - #{"--"}color--tile-background-focus: $color--tile-background-focus; - #{"--"}color--tile-background-hover: $color--tile-background-hover; - - #{"--"}color--content-box-border: $color--content-box-border; - #{"--"}color--content-box-header: $color--content-box-header; - #{"--"}color--content-box-background: $color--content-box-background; - - #{"--"}color--table-header: $color--table-header; - #{"--"}color--table-border: $color--table-border; - #{"--"}color--table-focus: $color--table-focus; - #{"--"}color--table-hover: $color--table-hover; - - #{"--"}color--fieldset-border: $color--fieldset-border; - #{"--"}color--fieldset-header: $color--fieldset-header; - - #{"--"}color--button-background: $color--button-background; - #{"--"}color--button-border: $color--button-border; - #{"--"}color--button-focus: $color--button-focus; - #{"--"}color--button-hover: $color--button-hover; - #{"--"}color--button-inactive-background: $color--button-inactive-background; - #{"--"}color--button-inactive-border: $color--button-inactive-border; - - #{"--"}color--input-field-border: $color--input-field-border; - #{"--"}color--input-field-background: $color--input-field-background; - - #{"--"}color--divider: $color--divider; - #{"--"}color--line: $color--line; - - #{"--"}color--shadow: $color--shadow; - #{"--"}color--focus: $color--focus; - - #{"--"}color--warning: $color--warning; - #{"--"}color--attention: $color--attention; - #{"--"}color--good: $color--good; + --text-color: #{$text-color}; + --active-color: #{$active-color}; + --activity-color: #{$activity-color}; + --activity-color-20: #{$activity-color-20}; + --activity-color-40: #{$activity-color-40}; + --activity-color-60: #{$activity-color-60}; + --activity-color-80: #{$activity-color-80}; + --base-color: #{$base-color}; + --base-color-20: #{$base-color-20}; + --base-color-40: #{$base-color-40}; + --base-color-60: #{$base-color-60}; + --base-color-80: #{$base-color-80}; + --base-gray: #{$base-gray}; + --black: #{$black}; + --brand-color-dark: #{$brand-color-dark}; + --brand-color-darker: #{$brand-color-darker}; + --brand-color-light: #{$brand-color-light}; + --brand-color-lighter: #{$brand-color-lighter}; + --brown: #{$brown}; + --brown-20: #{$brown-20}; + --brown-40: #{$brown-40}; + --brown-60: #{$brown-60}; + --brown-80: #{$brown-80}; + --content-color: #{$content-color}; + --content-color-10: #{$content-color-10}; + --content-color-20: #{$content-color-20}; + --content-color-40: #{$content-color-40}; + --content-color-60: #{$content-color-60}; + --content-color-80: #{$content-color-80}; + --contrast-content-gray: #{$contrast-content-gray}; + --contrast-content-hovergray: #{$contrast-content-hovergray}; + --contrast-content-white: #{$contrast-content-white}; + --dark-gray-color: #{$dark-gray-color}; + --dark-gray-color-10: #{$dark-gray-color-10}; + --dark-gray-color-15: #{$dark-gray-color-15}; + --dark-gray-color-20: #{$dark-gray-color-20}; + --dark-gray-color-30: #{$dark-gray-color-30}; + --dark-gray-color-40: #{$dark-gray-color-40}; + --dark-gray-color-45: #{$dark-gray-color-45}; + --dark-gray-color-5: #{$dark-gray-color-5}; + --dark-gray-color-60: #{$dark-gray-color-60}; + --dark-gray-color-75: #{$dark-gray-color-75}; + --dark-gray-color-80: #{$dark-gray-color-80}; + --dark-green: #{$dark-green}; + --dark-green-20: #{$dark-green-20}; + --dark-green-40: #{$dark-green-40}; + --dark-green-60: #{$dark-green-60}; + --dark-green-80: #{$dark-green-80}; + --dark-violet: #{$dark-violet}; + --dark-violet-20: #{$dark-violet-20}; + --dark-violet-40: #{$dark-violet-40}; + --dark-violet-60: #{$dark-violet-60}; + --dark-violet-80: #{$dark-violet-80}; + --green: #{$green}; + --green-20: #{$green-20}; + --green-40: #{$green-40}; + --green-60: #{$green-60}; + --green-80: #{$green-80}; + --light-gray-color: #{$light-gray-color}; + --light-gray-color-20: #{$light-gray-color-20}; + --light-gray-color-40: #{$light-gray-color-40}; + --light-gray-color-60: #{$light-gray-color-60}; + --light-gray-color-80: #{$light-gray-color-80}; + --orange: #{$orange}; + --orange-20: #{$orange-20}; + --orange-40: #{$orange-40}; + --orange-60: #{$orange-60}; + --orange-80: #{$orange-80}; + --origin-base-color: #{$origin-base-color}; + --petrol: #{$petrol}; + --petrol-20: #{$petrol-20}; + --petrol-40: #{$petrol-40}; + --petrol-60: #{$petrol-60}; + --petrol-80: #{$petrol-80}; + --public-course-bgcolor: #{$public-course-bgcolor}; + --red: #{$red}; + --red-20: #{$red-20}; + --red-40: #{$red-40}; + --red-60: #{$red-60}; + --red-80: #{$red-80}; + --table-footer-color: #{$color--table-header}; + --table-header-color: #{$color--table-header}; + --violet: #{$violet}; + --violet-20: #{$violet-20}; + --violet-40: #{$violet-40}; + --violet-60: #{$violet-60}; + --violet-80: #{$violet-80}; + --white: #{$white}; + --yellow: #{$yellow}; + --yellow-20: #{$yellow-20}; + --yellow-40: #{$yellow-40}; + --yellow-60: #{$yellow-60}; + --yellow-80: #{$yellow-80}; + + --group-color-0: #{$dark-violet}; + --group-color-1: #{$violet}; + --group-color-2: #{$red}; + --group-color-3: #{$orange}; + --group-color-4: #{$yellow}; + --group-color-5: #{$green}; + --group-color-6: #{$dark-green}; + --group-color-7: #{$petrol}; + --group-color-8: #{$brown}; + + --avatar-small: #{$avatar-small}; + --avatar-medium: #{$avatar-medium}; + --avatar-normal: #{$avatar-normal}; + + --icon-size-default: #{$icon-size-default}; + --icon-size-button: #{$icon-size-button}; + --icon-size-inline: #{$icon-size-inline}; + #{"--"}icon-size-action-menu: var(--icon-size-default); + + --transition-duration: #{$transition-duration}; + --transition-duration-slow: #{$transition-duration-slow}; + --transition-duration-superslow: #{$transition-duration-superslow}; + + --color--blue-1: #{$color--blue-1}; + --color--gray-1: #{$color--gray-1}; + --color--gray-2: #{$color--gray-2}; + --color--gray-3: #{$color--gray-3}; + --color--gray-4: #{$color--gray-4}; + --color--gray-5: #{$color--gray-5}; + --color--gray-6: #{$color--gray-6}; + --color--gray-7: #{$color--gray-7}; + --color--green-1: #{$color--green-1}; + --color--red-1: #{$color--red-1}; + --color--white: #{$color--white}; + --color--yellow-1: #{$color--yellow-1}; + + --color--global-background: #{$color--global-background}; + + --color--brand-primary: #{$color--brand-primary}; + --color--brand-secondary: #{$color--brand-secondary}; + + --color--font-primary: #{$color--font-primary}; + --color--font-secondary: #{$color--font-secondary}; + --color--font-inactive: #{$color--font-inactive}; + --color--font-inverted: #{$color--font-inverted}; + + --color--main-navigation-background: #{$color--main-navigation-background}; + --color--main-navigation-border: #{$color--main-navigation-border}; + + --color--sidebar-marker-active: #{$color--sidebar-marker-active}; + --color--sidebar-marker-focus: #{$color--sidebar-marker-focus}; + --color--sidebar-marker-hover: #{$color--sidebar-marker-hover}; + --color--sidebar-active: #{$color--sidebar-active}; + --color--sidebar-focus: #{$color--sidebar-focus}; + --color--sidebar-hover: #{$color--sidebar-hover}; + --color--sidebar-divider: #{$color--sidebar-divider}; + + --color--dialog-overlay: #{$color--dialog-overlay}; + + --color--tile-border-focus: #{$color--tile-border-focus}; + --color--tile-border-hover: #{$color--tile-border-hover}; + --color--tile-border: #{$color--tile-border}; + --color--tile-background: #{$color--tile-background}; + --color--tile-background-focus: #{$color--tile-background-focus}; + --color--tile-background-hover: #{$color--tile-background-hover}; + + --color--content-box-border: #{$color--content-box-border}; + --color--content-box-header: #{$color--content-box-header}; + --color--content-box-background: #{$color--content-box-background}; + + --color--table-header: #{$color--table-header}; + --color--table-border: #{$color--table-border}; + --color--table-focus: #{$color--table-focus}; + --color--table-hover: #{$color--table-hover}; + + --color--fieldset-border: #{$color--fieldset-border}; + --color--fieldset-header: #{$color--fieldset-header}; + + --color--button-background: #{$color--button-background}; + --color--button-border: #{$color--button-border}; + --color--button-focus: #{$color--button-focus}; + --color--button-hover: #{$color--button-hover}; + --color--button-inactive-background: #{$color--button-inactive-background}; + --color--button-inactive-border: #{$color--button-inactive-border}; + + --color--input-field-border: #{$color--input-field-border}; + --color--input-field-background: #{$color--input-field-background}; + + --color--divider: #{$color--divider}; + --color--line: #{$color--line}; + + --color--shadow: #{$color--shadow}; + --color--focus: #{$color--focus}; + + --color--warning: #{$color--warning}; + --color--attention: #{$color--attention}; + --color--good: #{$color--good}; @media (prefers-reduced-motion) { #{"--"}transition-duration: 0s; diff --git a/resources/assets/stylesheets/scss/wiki.scss b/resources/assets/stylesheets/scss/wiki.scss index 323fbb5e8a4f3be788971a7fb959045c205cfa73..5f9f441ec58f5fe303f591cd3a3564e586b17bd0 100644 --- a/resources/assets/stylesheets/scss/wiki.scss +++ b/resources/assets/stylesheets/scss/wiki.scss @@ -156,13 +156,13 @@ a.wiki-restricted { .wiki_added { background-color: var(--content-color-20); border: 1px solid var(--content-color-40); - @include background-icon('add', 'inactive', 20); + @include background-icon(add, inactive); } .wiki_erased { background-color: var(--white); border: 1px solid var(--light-gray-color-40); - @include background-icon('remove', 'inactive', 20); + @include background-icon(remove, inactive); } .wiki_added + div, .wiki_erased + div { diff --git a/resources/assets/stylesheets/scss/wizard.scss b/resources/assets/stylesheets/scss/wizard.scss index 5c73dc9dd8876be99366a2c1c71bdd4152dd809b..6fc54b331efdbcb881ed59740ec1f2a9d77adbcf 100644 --- a/resources/assets/stylesheets/scss/wizard.scss +++ b/resources/assets/stylesheets/scss/wizard.scss @@ -180,7 +180,6 @@ form.default fieldset.radiobutton-set { justify-content: space-between; align-items: center; padding: 6px; - padding-bottom: 2px; margin-bottom: 0; border-top: none; diff --git a/resources/assets/stylesheets/studip-jquery-ui.scss b/resources/assets/stylesheets/studip-jquery-ui.scss index f6ed9bb7eadd5378ac17add93aa86b66604a3ee2..d95af13b56deae0ad44f5f392d21d0aa262f8145 100644 --- a/resources/assets/stylesheets/studip-jquery-ui.scss +++ b/resources/assets/stylesheets/studip-jquery-ui.scss @@ -13,7 +13,7 @@ $z-index: 1001; $avatar-size: 32px; $avatar-border: 2px; $element-padding: 2px; - $icon-size: 16px; + $icon-size: 20px; background: none; width: 100%; diff --git a/resources/assets/stylesheets/studip.scss b/resources/assets/stylesheets/studip.scss index b166e069e841e39d814e62d12e0db0926f5665ef..681ade370f9cab8befe989afeefd9b5147e2f581 100644 --- a/resources/assets/stylesheets/studip.scss +++ b/resources/assets/stylesheets/studip.scss @@ -590,7 +590,7 @@ a.new-member { */ details.studip { summary { - @include icon(before, arr_1right, clickable); + @include icon(before, arr_1right); cursor: pointer; &::before { @@ -606,7 +606,7 @@ details.studip { &[open] { summary { - @include icon(before, arr_1down, clickable); + @include icon(before, arr_1down); } } @@ -615,3 +615,13 @@ details.studip { mark { background-color: var(--activity-color-60); } + +.studip-icon { + width: var(--icon-size-default); + height: var(--icon-size-default); +} + +.studip-icon-inline { + width: var(--icon-size-inline); + height: var(--icon-size-inline); +} diff --git a/resources/vue/components/AdminCourses.vue b/resources/vue/components/AdminCourses.vue index 7979d677e480cc6df5a4bd586e8e91e97d718f16..c0e116051e0762988dd785670602c3fd88cc0e85 100644 --- a/resources/vue/components/AdminCourses.vue +++ b/resources/vue/components/AdminCourses.vue @@ -325,38 +325,3 @@ export default { }, }; </script> -<style lang="scss"> -@import '../../assets/stylesheets/mixins.scss'; - -.course-admin { - .course-completion { - @include hide-text(); - @include square(16px); - background-repeat: no-repeat; - display: block; - } - - th .course-completion { - @include background-icon(radiobutton-checked, clickable); - } - - td .course-completion { - @include background-icon(span-empty, status-red); - - &[data-course-completion="1"] { - @include background-icon(span-2quarter, status-yellow); - } - &[data-course-completion="2"] { - @include background-icon(span-full, status-green); - } - - &.ajaxing { - background-image: url("#{$image-path}/loading-indicator.svg"); - } - } - > tbody.loading > tr > td { - opacity: 0.5; - } -} - -</style> diff --git a/resources/vue/components/EditableList.vue b/resources/vue/components/EditableList.vue index 39c32ace231cadd2721c8b64f2053d7f2912385c..e7aa83865be61ec82a43e8b34a48777da38e3f62 100644 --- a/resources/vue/components/EditableList.vue +++ b/resources/vue/components/EditableList.vue @@ -9,11 +9,11 @@ <div class="formpart"> <ul class="clean editablelist"> <li v-for="item in sortedItems" :key="item.id" :data-type="item.type"> - <studip-icon v-if="item.icon" :shape="item.icon" role="info" :size="20" class="text-bottom" alt=""></studip-icon> + <studip-icon v-if="item.icon" :shape="item.icon" role="info" class="text-bottom" alt=""></studip-icon> <input v-if="name" type="hidden" :name="name + '[]'" :value="item.value"> <span>{{item.name}}</span> <button v-if="item.deletable" @click.prevent="deleteItem(item)" :title="$gettextInterpolate($gettext('%{ name } löschen'), {name: item.name}, true)" class="undecorated"> - <studip-icon shape="trash" role="clickable" :size="20" class="text-bottom"></studip-icon> + <studip-icon shape="trash" class="text-bottom"></studip-icon> </button> </li> </ul> diff --git a/resources/vue/components/MemcachedCacheConfig.vue b/resources/vue/components/MemcachedCacheConfig.vue index e684f0da6e6c3f2d5cfd4ae052eb0b9905759b30..ba06c7c0625633fc6f153bf304957238a703ecb1 100644 --- a/resources/vue/components/MemcachedCacheConfig.vue +++ b/resources/vue/components/MemcachedCacheConfig.vue @@ -29,7 +29,7 @@ </section> </article> <label class="add-server" @click="addServer()"> - <studip-icon shape="add" :size="20"></studip-icon> + <studip-icon shape="add"></studip-icon> {{ $gettext('Server hinzufügen') }} </label> </div> diff --git a/resources/vue/components/MyCoursesTables.vue b/resources/vue/components/MyCoursesTables.vue index 82d48becf5478d192af0bca9c63f38697f9b08ad..b8b0ceb0e9af044db7d0b769942a1aec37549aff 100644 --- a/resources/vue/components/MyCoursesTables.vue +++ b/resources/vue/components/MyCoursesTables.vue @@ -90,6 +90,11 @@ <script> import MyCoursesMixin from '../mixins/MyCoursesMixin.js'; +const defaultIconSize = parseInt( + getComputedStyle(document.body).getPropertyValue('--icon-size-default'), + 10 +); + export default { name: 'MyCoursesTables', mixins: [MyCoursesMixin], @@ -97,7 +102,7 @@ export default { iconSize: { type: Number, required: false, - default: 16 + default: defaultIconSize } }, data () { diff --git a/resources/vue/components/SearchWidget.vue b/resources/vue/components/SearchWidget.vue index b2afcf23c603c5be9e074a7acea0632249377581..15772168ba2c1fb601c774631f910393af6cd66f 100644 --- a/resources/vue/components/SearchWidget.vue +++ b/resources/vue/components/SearchWidget.vue @@ -9,13 +9,12 @@ :placeholder="$gettext('Veranstaltung suchen')" :aria-label="$gettext('Veranstaltung suchen')"> <a v-if="isActive" @click.prevent="cancelSearch" class="reset-search"> - <studip-icon shape="decline" :size="20"></studip-icon> + <studip-icon shape="decline"></studip-icon> </a> <button type="submit" class="submit-search" :title="$gettext('Suchen')" @click.prevent="doSearch"> <studip-icon shape="search" :role="maySearch ? 'clickable' : 'inactive'" - :size="20" ></studip-icon> </button> </div> diff --git a/resources/vue/components/SearchWithFilter.vue b/resources/vue/components/SearchWithFilter.vue index 1336e96a2f51efe3339cb263cdcb9550c1cbab7e..45ca4377fe2aa7f4bf014625ea20a36110818a97 100644 --- a/resources/vue/components/SearchWithFilter.vue +++ b/resources/vue/components/SearchWithFilter.vue @@ -18,7 +18,7 @@ :title="$gettext('Suchformular zurücksetzen')" @click="onReset" > - <StudipIcon shape="decline" :size="20" /> + <StudipIcon shape="decline" /> </button> <button @@ -30,7 +30,7 @@ :aria-controls="`search-bar-filter-panel-${searchId}`" :aria-expanded="showFilterPanel ? 'true' : 'false'" > - <StudipIcon shape="filter" :role="showFilterPanel ? 'info_alt' : 'clickable'" :size="20" alt="" /> + <StudipIcon shape="filter" :role="showFilterPanel ? 'info_alt' : 'clickable'" alt="" /> </button> <button @@ -40,7 +40,7 @@ class="submit-search" :title="$gettext('Suche starten')" > - <StudipIcon shape="search" :size="20" role="presentation" alt="" /> + <StudipIcon shape="search" role="presentation" alt="" /> </button> </form> <div :id="`search-bar-filter-panel-${searchId}`" class="filterpanel" ref="filterPanel" v-if="showFilterPanel"> diff --git a/resources/vue/components/StudipIcon.vue b/resources/vue/components/StudipIcon.vue index 5e273722de7232da11b352d940af5b1a6bf3aa65..b20aba01833d6a5c94ccab26ebd4d88b787e39b2 100644 --- a/resources/vue/components/StudipIcon.vue +++ b/resources/vue/components/StudipIcon.vue @@ -4,18 +4,18 @@ type="image" :name="name" :src="url" - :width="size" - :height="size" + :style="{ width: realSize + 'px', height: realSize + 'px' }" :role="ariaRole" + :class="cssClass" v-bind="$attrs" v-on="$listeners" :alt="$attrs.alt ?? ''" /> <img v-else :src="url" - :width="size" - :height="size" + :style="{ width: realSize + 'px', height: realSize + 'px' }" :role="ariaRole" + :class="cssClass" v-bind="$attrs" v-on="$listeners" :alt="$attrs.alt ?? ''" @@ -25,6 +25,14 @@ <script lang="ts"> import Vue from 'vue'; +function getCSSVariableValue(property: string): Number { + const value = getComputedStyle(document.body).getPropertyValue(property); + return parseInt(value, 10); +} + +const defaultIconSize: Number = getCSSVariableValue('--icon-size-default'); +const inlineIconSize: Number = getCSSVariableValue('--icon-size-inline'); + export default Vue.extend({ name: 'studip-icon', props: { @@ -45,10 +53,20 @@ export default Vue.extend({ size: { type: Number, required: false, - default: 16, + default: defaultIconSize, }, + inline: { + type: Boolean, + default: false + } }, computed: { + realSize(): Number | undefined { + if (this.inline) { + return inlineIconSize; + } + return Number(this.size) !== defaultIconSize ? this.size : undefined; + }, url(): string { if (this.shape.indexOf('http') === 0) { return this.shape; @@ -86,6 +104,14 @@ export default Vue.extend({ return 'blue'; } }, + cssClass(): Array<string> { + return [ + 'studip-icon', + this.inline ? 'studip-icon-inline' : '', + `icon-role-${this.role}`, + `icon-shape-${this.shape}`, + ]; + } }, }); </script> diff --git a/resources/vue/components/StudipSquareButton.vue b/resources/vue/components/StudipSquareButton.vue index 04d7813921d38610a5e983c5e8db33dbe5aa7217..fe89e8d6315d850d70134d6d515eea468321351b 100644 --- a/resources/vue/components/StudipSquareButton.vue +++ b/resources/vue/components/StudipSquareButton.vue @@ -40,9 +40,8 @@ $size: 130px; cursor: pointer; img { - width: 100%; height: 50px; - margin-bottom: 8px; + margin: 0 auto 8px auto; } span { color: var(--base-color); diff --git a/resources/vue/components/blubber/SearchWidget.vue b/resources/vue/components/blubber/SearchWidget.vue index 1f1b09d37fc48c4c777fa4eb82001084a7c9a7f6..016f5036c91e0e8a86b49e5cb49af756f1edc764 100644 --- a/resources/vue/components/blubber/SearchWidget.vue +++ b/resources/vue/components/blubber/SearchWidget.vue @@ -22,11 +22,11 @@ role="button" :title="$gettext('Suche zurücksetzen')" > - <studip-icon shape="decline" :size="20" alt="" /> + <studip-icon shape="decline" alt="" /> </a> <button type="submit" class="submit-search" :title="$gettext('Suche ausführen')"> - <studip-icon shape="search" :size="20" alt="" /> + <studip-icon shape="search" alt="" /> </button> </div> </li> diff --git a/resources/vue/components/blubber/ThreadSubscriber.vue b/resources/vue/components/blubber/ThreadSubscriber.vue index 1bfb8bd0f6f7745ecbb405d73ab570fc3cb75325..c259a7ad5393de26b62d46ab594469a59cbcebe6 100644 --- a/resources/vue/components/blubber/ThreadSubscriber.vue +++ b/resources/vue/components/blubber/ThreadSubscriber.vue @@ -7,8 +7,8 @@ :class="{ unfollowed: !followed }" :title="$gettext('Benachrichtigungen für diese Konversation abstellen.')" > - <StudipIcon v-if="!followed" shape="decline" :size="20" class="text-bottom"></StudipIcon> - <StudipIcon v-else shape="notification2" :size="20" class="text-bottom"></StudipIcon> + <StudipIcon v-if="!followed" shape="decline" class="text-bottom"></StudipIcon> + <StudipIcon v-else shape="notification2" class="text-bottom"></StudipIcon> {{ $gettext('Benachrichtigungen aktiviert') }} </a> </div> diff --git a/resources/vue/components/courseware/toolbar/CoursewareBlockadderItem.vue b/resources/vue/components/courseware/toolbar/CoursewareBlockadderItem.vue index feb00ecd4ee65cd42a4e53f0ab4bfb96aecc34b1..dc9d9293e36ebf23ecbcf4c5a524d86cfdaa1395 100644 --- a/resources/vue/components/courseware/toolbar/CoursewareBlockadderItem.vue +++ b/resources/vue/components/courseware/toolbar/CoursewareBlockadderItem.vue @@ -14,7 +14,7 @@ :title="favButtonTitle" @click="toggleFavItem()" > - <studip-icon :shape="blockTypeIsFav ? 'star' : 'star-empty'" :size="20" /> + <studip-icon :shape="blockTypeIsFav ? 'star' : 'star-empty'" /> </button> </div> </template> diff --git a/resources/vue/components/courseware/widgets/CoursewareSearchWidget.vue b/resources/vue/components/courseware/widgets/CoursewareSearchWidget.vue index aed84b578f045ad11670a23cd2be92883f625f88..7ddb4187c82ddb6178cf07ecaa536f8582f7f1b1 100644 --- a/resources/vue/components/courseware/widgets/CoursewareSearchWidget.vue +++ b/resources/vue/components/courseware/widgets/CoursewareSearchWidget.vue @@ -12,7 +12,7 @@ /> <a v-if="showSearchResults" @click.prevent="setShowSearchResults(false)" class="reset-search"> - <studip-icon shape="decline" :size="20"></studip-icon> + <studip-icon shape="decline"></studip-icon> </a> <button type="submit" @@ -21,7 +21,7 @@ class="submit-search" @click="loadResults" > - <studip-icon shape="search" :size="20"></studip-icon> + <studip-icon shape="search"></studip-icon> </button> </div> </li> diff --git a/resources/vue/components/courseware/widgets/CoursewareTasksActionWidget.vue b/resources/vue/components/courseware/widgets/CoursewareTasksActionWidget.vue index cf37c6f6861f4dfbea61328c6c827564681c4d72..c0e7d92f5553fd79feb33852c52437470fd072ec 100644 --- a/resources/vue/components/courseware/widgets/CoursewareTasksActionWidget.vue +++ b/resources/vue/components/courseware/widgets/CoursewareTasksActionWidget.vue @@ -59,14 +59,14 @@ export default { <style scoped> .cw-action-widget-task-groups-add-solvers { background-image: url('../images/icons/blue/add.svg'); - background-size: 16px; + background-size: 20px; } .cw-action-widget-task-groups-deadline { background-image: url('../images/icons/blue/date.svg'); - background-size: 16px; + background-size: 20px; } .cw-action-widget-task-groups-delete { background-image: url('../images/icons/blue/trash.svg'); - background-size: 16px; + background-size: 20px; } </style> diff --git a/resources/vue/components/questionnaires/InputArray.vue b/resources/vue/components/questionnaires/InputArray.vue index 896418f425d2e9261fe6d4b20da00117487f6d5e..b26237ca392f5db4abca9d3cae79cf5423fb3861 100644 --- a/resources/vue/components/questionnaires/InputArray.vue +++ b/resources/vue/components/questionnaires/InputArray.vue @@ -39,7 +39,6 @@ <td class="actions"> <StudipIcon name="delete" shape="trash" - :size="20" @click.prevent="deleteOption(index)" :title="$gettextInterpolate($gettext('%{label} löschen'), {label}, true)" /> @@ -52,7 +51,7 @@ <button class="as-link" :title="$gettextInterpolate($gettext('%{label} hinzufügen'), {label}, true)" @click.prevent="addOption()"> - <StudipIcon shape="add" :size="20" alt="" /> + <StudipIcon shape="add" alt="" /> </button> </td> </tr> diff --git a/resources/vue/components/responsive/NavigationItem.vue b/resources/vue/components/responsive/NavigationItem.vue index 5fb1452b22fd728befd60c494adacf71a3f32977..50ab5a8cac00cc74969c872076108c8da691cb3b 100644 --- a/resources/vue/components/responsive/NavigationItem.vue +++ b/resources/vue/components/responsive/NavigationItem.vue @@ -25,7 +25,7 @@ @keydown.prevent.enter="moveTo(item.path)" @keydown.prevent.space="moveTo(item.path)" > - <studip-icon shape="arr_1right" role="info_alt" :size="20" alt=""></studip-icon> + <studip-icon shape="arr_1right" role="info_alt" alt=""></studip-icon> </button> </template> <div v-else class="navigation-title"> diff --git a/resources/vue/components/stock-images/SearchWidget.vue b/resources/vue/components/stock-images/SearchWidget.vue index 75ba7847680b7866a16a9de29507f15fcf10a802..53e0aa715a34144b62cab9a158ff52be35a19b13 100644 --- a/resources/vue/components/stock-images/SearchWidget.vue +++ b/resources/vue/components/stock-images/SearchWidget.vue @@ -17,7 +17,7 @@ class="reset-search as-link" :title="$gettext('Suchformular zurücksetzen')" > - <studip-icon shape="decline" :size="20" role="presentation" alt="" /> + <studip-icon shape="decline" role="presentation" alt="" /> </button> <button type="submit" @@ -26,7 +26,7 @@ class="submit-search" :title="$gettext('Suche starten')" > - <studip-icon shape="search" :size="20" role="presentation" alt="" /> + <studip-icon shape="search" role="presentation" alt="" /> </button> </div> </li> diff --git a/resources/vue/components/tree/StudipTreeList.vue b/resources/vue/components/tree/StudipTreeList.vue index 155503bd947c383a769b9d0ad4ae5ddf7d54e9d3..1524d6f04e2585bffa72cc355194c6c67728efc0 100644 --- a/resources/vue/components/tree/StudipTreeList.vue +++ b/resources/vue/components/tree/StudipTreeList.vue @@ -15,10 +15,10 @@ <a v-if="editable && currentNode.attributes.id !== 'root'" :href="editUrl + '/' + currentNode.attributes.id" @click.prevent="editNode(editUrl, currentNode.id)" data-dialog="size=medium" - :title="$gettextInterpolate($gettext('%{name} bearbeiten'), {name: currentNode.attributes.name}, true)"> - <studip-icon shape="edit" :size="20"></studip-icon> + :title="$gettextInterpolate($gettext('%{name} bearbeiten'), {name: currentNode.attributes.name}, true)" + > + <studip-icon shape="edit"></studip-icon> </a> - </h1> <p v-if="currentNode.attributes.description?.trim() !== ''" class="studip-tree-node-info" v-html="currentNode.attributes['description-formatted']"> diff --git a/resources/vue/components/tree/StudipTreeNode.vue b/resources/vue/components/tree/StudipTreeNode.vue index dbe3effc544ce043e86d53bec911258b268160e3..8eb13fa0f0c1b9e17fdd2752fb55b96e06b886ff 100644 --- a/resources/vue/components/tree/StudipTreeNode.vue +++ b/resources/vue/components/tree/StudipTreeNode.vue @@ -3,7 +3,7 @@ <span :class="{ 'studip-tree-node-content': true, 'studip-tree-node-active': node?.id === activeNode?.id }"> <a @click.prevent="toggleNode(true)"> <div v-if="node.attributes['has-children']" class="studip-tree-node-toggle"> - <studip-icon :shape="openState ? 'arr_1down': 'arr_1right'" :size="20"/> + <studip-icon :shape="openState ? 'arr_1down': 'arr_1right'"/> </div> </a> <button v-if="isAssignable && node.attributes.id !== 'root'" class="studip-tree-node-assignment-state" diff --git a/resources/vue/components/tree/TreeBreadcrumb.vue b/resources/vue/components/tree/TreeBreadcrumb.vue index a8c3dd5e36a0e985f9ec698e59ee7c4aacde4a56..4ba4664d07eb8a13998d78fe59cfd8d27981e66c 100644 --- a/resources/vue/components/tree/TreeBreadcrumb.vue +++ b/resources/vue/components/tree/TreeBreadcrumb.vue @@ -40,7 +40,7 @@ </div> <button v-if="assignable" type="submit" class="assign-button" :title="$gettext('Diesen Eintrag zuweisen')"> - <studip-icon shape="arr_2right" :size="20"></studip-icon> + <studip-icon shape="arr_2right"></studip-icon> </button> <studip-action-menu v-if="editable" :items="actionMenuItems()" @add-tree-node="addNode" @edit-tree-node="editNode" @delete-tree-node="deleteNode"/> diff --git a/resources/vue/components/tree/TreeExportWidget.vue b/resources/vue/components/tree/TreeExportWidget.vue index 62b73b0378cde62eb48dcb80d5f4c2ee9db336b0..61500f53cb88f06e635f9b84991679a506286297 100644 --- a/resources/vue/components/tree/TreeExportWidget.vue +++ b/resources/vue/components/tree/TreeExportWidget.vue @@ -2,7 +2,7 @@ <sidebar-widget v-if="exportData.length > 0" id="export-widget" class="sidebar-export" :title="$gettext('Export')"> <template #content> <form class="sidebar-export"> - <studip-icon shape="export" :size="16"></studip-icon> + <studip-icon shape="export"></studip-icon> <a :href="url" :title="title" @click.prevent="createExport()">{{ title }}</a> </form> </template> diff --git a/resources/vue/components/tree/TreeSearchResult.vue b/resources/vue/components/tree/TreeSearchResult.vue index 9799dae1f4c38ce2c0a6ecb427a6805e724ee6ce..20a73ca392e5ec52f9ad3941f08f26e0bd44aa99 100644 --- a/resources/vue/components/tree/TreeSearchResult.vue +++ b/resources/vue/components/tree/TreeSearchResult.vue @@ -7,7 +7,7 @@ <article v-else class="studip-tree-table"> <table v-if="courses.length > 0" class="default studip-tree-table"> <caption> - <studip-icon shape="search" :size="20"></studip-icon> + <studip-icon shape="search"></studip-icon> {{ $gettextInterpolate($ngettext('Ein Eintrag für den Begriff "%{searchterm}" gefunden', '%{count} Einträge für den Begriff "%{searchterm}" gefunden', courses.length), { count: courses.length, searchterm: searchConfig.searchterm}) }} diff --git a/templates/_standard_loginform.php b/templates/_standard_loginform.php index 4ae9f27d195c2a001b2a18e2e66400f4c08b81fc..5335d19fae2d56def88fea4be74fab9b3512d732 100644 --- a/templates/_standard_loginform.php +++ b/templates/_standard_loginform.php @@ -47,11 +47,11 @@ $password_tooltip_text = (string)Config::get()->PASSWORD_TOOLTIP_TEXT; > <i id="password-toggle" tabindex="0" role="button" class="enter-accessible"> - <?= Icon::create('visibility-checked')->asImg(20, [ + <?= Icon::create('visibility-checked')->asImg([ 'id ' => 'visible-password', 'title' => _('Passwort anzeigen'), ]) ?> - <?= Icon::create('visibility-invisible')->asImg(20, [ + <?= Icon::create('visibility-invisible')->asImg([ 'id' => 'invisible-password', 'style' => 'display: none', 'title' => _('Passwort verstecken'), diff --git a/templates/admin/topLinks.php b/templates/admin/topLinks.php index b63befcf61ae41eba10d9299eff8900f33d043a9..1fc7970f0136a792c30d1e381ca92a760da0e593 100644 --- a/templates/admin/topLinks.php +++ b/templates/admin/topLinks.php @@ -18,7 +18,7 @@ <? if (isset($last_one)) : ?> <div style="float: left;"> <a href="<?= URLHelper::getLink("?#admin_top_links", ['cid' => $adminList[$last_one]['Seminar_id']]) ?>" title="<?= htmlReady($adminList[$last_one]['Name']) ?>"> - <?= Icon::create('arr_1left', 'clickable')->asImg(['class' => "text-bottom"]) ?> + <?= Icon::create('arr_1left')->asImg(['class' => 'text-bottom']) ?> <?= _("zurück") ?> </a> </div> @@ -27,15 +27,15 @@ <div style="float: right;"> <a href="<?= URLHelper::getLink("?#admin_top_links", ['cid' => $adminList[$next_one]['Seminar_id']]) ?>" title="<?= htmlReady($adminList[$next_one]['Name']) ?>"> <?= _("vor") ?> - <?= Icon::create('arr_1right', 'clickable')->asImg(['class' => "text-bottom"]) ?> + <?= Icon::create('arr_1right')->asImg(['class' => 'text-bottom']) ?> </a> </div> <? endif ?> <div> <a href="<?= URLHelper::getLink("adminarea_start.php", ['list' => "TRUE"]) ?>"> - <?= Icon::create('arr_1up', 'clickable')->asImg(['class' => "text-bottom"]) ?> + <?= Icon::create('arr_1up')->asImg(['class' => 'text-bottom']) ?> <?= _("Liste") ?> </a> </div> </div> -<? endif ?> \ No newline at end of file +<? endif ?> diff --git a/templates/blubber/course_context.php b/templates/blubber/course_context.php index e6119920e7ec740c5e221f236edcce29f4891abf..d13752eb5ab704675cccf9217fab8f27c227f7e1 100644 --- a/templates/blubber/course_context.php +++ b/templates/blubber/course_context.php @@ -9,7 +9,7 @@ <? foreach ($icons as $icon) : ?> <li class="my-courses-navigation-item <? if ($icon->getImage()->signalsAttention()) echo 'my-courses-navigation-important'; ?>"> <a href="<?= URLHelper::getLink("seminar_main.php", ['auswahl' => $course->getId(), 'redirect_to' => $icon->getURL()]) ?>"<?= $icon->getTitle() ? ' title="'.htmlReady($icon->getTitle()).'"' : "" ?>> - <?= $icon->getImage()->asImg(20) ?> + <?= $icon->getImage() ?> </a> </li> <? endforeach ?> @@ -21,7 +21,7 @@ <div> <h4><?= _('Nächster Termin') ?></h4> <a href="<?= URLHelper::getLink("dispatch.php/course/dates/details/".$nextdate->getId(), ['cid' => $course->id]) ?>" data-dialog="size=auto"> - <?= Icon::create('date')->asImg(['class' => "text-bottom"]) ?> + <?= Icon::create('date')->asImg(Icon::SIZE_INLINE, ['class' => 'text-bottom']) ?> <?= htmlReady($nextdate->getFullName()) ?> </a> </div> diff --git a/templates/blubber/disable-notifications.php b/templates/blubber/disable-notifications.php index a3a63c400947f321f152ec56e9c921535fde87d5..d80fa7a430660a2d60acf4192af3740f8c94ec06 100644 --- a/templates/blubber/disable-notifications.php +++ b/templates/blubber/disable-notifications.php @@ -5,8 +5,8 @@ class="followunfollow<?= $unfollowed ? " unfollowed" : "" ?>" title="<?= _("Benachrichtigungen für diese Konversation abstellen.") ?>" data-thread_id="<?= htmlReady($thread->id) ?>"> - <?= Icon::create("decline")->asImg(20, ['class' => "follow text-bottom"]) ?> - <?= Icon::create("notification2")->asImg(20, ['class' => "unfollow text-bottom"]) ?> + <?= Icon::create('decline')->asImg(['class' => 'follow text-bottom']) ?> + <?= Icon::create('notification2')->asImg(['class' => 'unfollow text-bottom']) ?> <?= _("Benachrichtigungen aktiviert") ?> </a> </div> diff --git a/templates/blubber/global_context.php b/templates/blubber/global_context.php index 4a524076ed32e84871b7de7f6a08e29f1708ec8b..0045592c6ff8dd7fb689f4fab6954c66d8248518 100644 --- a/templates/blubber/global_context.php +++ b/templates/blubber/global_context.php @@ -10,8 +10,8 @@ aria-pressed="<?= $unfollowed ? 'false' : 'true' ?>" role="button" data-thread_id="global"> - <?= Icon::create("decline")->asImg(20, ['class' => "follow text-bottom"]) ?> - <?= Icon::create("notification2")->asImg(20, ['class' => "unfollow text-bottom"]) ?> + <?= Icon::create('decline')->asImg(['class' => 'follow text-bottom']) ?> + <?= Icon::create('notification2')->asImg(['class' => 'unfollow text-bottom']) ?> <?= _("Benachrichtigungen aktiviert") ?> </a> </div> diff --git a/templates/blubber/private_context.php b/templates/blubber/private_context.php index b9a5ba9532d42fc694c66c9f4e146eb243e88cd8..164a20ac0cf0cd40f9d6d87140107bf3914ff845 100644 --- a/templates/blubber/private_context.php +++ b/templates/blubber/private_context.php @@ -13,8 +13,8 @@ <? $user = User::find($mention['user_id']) ?> <? if ($user) : ?> <? if ($user->getId() !== $GLOBALS['user']->id && count($mentions) > 2) : ?> - <a class="float_right" href="<?= URLHelper::getLink("dispatch.php/blubber/write_to/". $user->getId()) ?>" data-dialog title="<?= _("Anblubbern") ?>"> - <?= Icon::create("blubber", "clickable")->asImg(20, ['class' => "text-bottom"]) ?> + <a class="float_right" href="<?= URLHelper::getLink("dispatch.php/blubber/write_to/" . $user->getId()) ?>" data-dialog title="<?= _("Anblubbern") ?>"> + <?= Icon::create('blubber')->asImg(['class' => 'text-bottom']) ?> </a> <? endif ?> <? if ($user->getId() === $GLOBALS['user']->id) : ?> diff --git a/templates/blubber/public_context.php b/templates/blubber/public_context.php index b7643be5e0e28649b607f667a841d047b1e969ee..7d77c25ff972a95b9d8ede52247f46361d2ff3a2 100644 --- a/templates/blubber/public_context.php +++ b/templates/blubber/public_context.php @@ -1,18 +1,18 @@ <div class="blubber_public_info indented lowprio_info"> <?= _("Dies ist ein öffentlicher Blubber und kann von allen gelesen werden.") ?> - <? if (($thread['user_id'] === $GLOBALS['user']->id) || $GLOBALS['perm']->have_perm("root")) : ?> + <? if ($thread['user_id'] === $GLOBALS['user']->id || $GLOBALS['perm']->have_perm("root")) : ?> <div class="center blubber-edit-icons"> <a href="<?= URLHelper::getLink("dispatch.php/blubber/compose/".$thread->getId()) ?>" data-dialog title="<?= _('Blubber bearbeiten') ?>"> - <?= Icon::create("edit", "clickable")->asImg(30) ?> + <?= Icon::create('edit')->asImg(30) ?> </a> <form action="<?= URLHelper::getLink("dispatch.php/blubber/delete/".$thread->getId()) ?>" method="post" data-confirm="<?= _('Wirklich löschen?') ?>"> <?= CSRFProtection::tokenTag() ?> - <?= Icon::create("trash", "clickable")->asInput(30, ['title' => _('Diesen Blubber löschen.')]) ?> + <?= Icon::create('trash')->asInput(30, ['title' => _('Diesen Blubber löschen.')]) ?> </form> </div> <? endif ?> diff --git a/templates/contact/header-groups.php b/templates/contact/header-groups.php index 3a6be9bcd523969253e466a14eac0a59937f8ddd..ae7d2624c8cf980034c67018ec7dd274e93b39f8 100644 --- a/templates/contact/header-groups.php +++ b/templates/contact/header-groups.php @@ -32,7 +32,7 @@ </a> <? if ($filter == $group_id): ?> <a href="<?= URLHelper::getLink('dispatch.php/messages/write?', compact('group_id')) ?>"> - <?= Icon::create('mail', 'clickable', ['title' => _('Nachricht an alle Personen dieser Gruppe schicken')])->asImg() ?> + <?= Icon::create('mail')->asImg(['title' => _('Nachricht an alle Personen dieser Gruppe schicken')]) ?> </a> <? endif; ?> </td> diff --git a/templates/contact/index.php b/templates/contact/index.php index 358d8546fd74ae315b2d7f8586129a70140424d8..7d6d08d5c7f91ccea4d247c78b0c9ee4125b623d 100644 --- a/templates/contact/index.php +++ b/templates/contact/index.php @@ -6,11 +6,11 @@ <? if ($size_of_book): ?> <? if ($open === 'all'): ?> <a href="<?= URLHelper::getLink('', compact('view', 'filter') + ['close' => 'all']) ?>"> - <?= Icon::create('arr_1up', 'clickable')->asImg() ?> + <?= Icon::create('arr_1up') ?> <?= _('Alle zuklappen') ?> <? else: ?> <a href="<?= URLHelper::getLink('', compact('view', 'filter') + ['open' => 'all']) ?>"> - <?= Icon::create('arr_1down', 'clickable')->asImg() ?> + <?= Icon::create('arr_1down') ?> <?= _('Alle aufklappen') ?> <? endif; ?> <?= sprintf( diff --git a/templates/contact/legend.php b/templates/contact/legend.php index 18004c6471ddff34d04da40e413ea54b18d4e05e..6637a160ae8dcbbf7c46b915a6153f6436417c20 100644 --- a/templates/contact/legend.php +++ b/templates/contact/legend.php @@ -2,34 +2,34 @@ <?= _('Bedienung:') ?> <ul> <li> - <?= Icon::create('mail', 'clickable')->asImg() ?> + <?= Icon::create('mail') ?> <?= _('Nachricht an Kontakt') ?> </li> <? if ($open): ?> <li> - <?= Icon::create('arr_1up', 'clickable')->asImg() ?> + <?= Icon::create('arr_1up') ?> <?= _('Kontakt zuklappen') ?> </li> <li> - <?= Icon::create('person', 'clickable')->asImg() ?> + <?= Icon::create('person') ?> <?= _('Buddystatus') ?> </li> <li> - <?= Icon::create('edit', 'clickable')->asImg() ?> + <?= Icon::create('edit') ?> <?= _('Eigene Rubriken') ?> </li> <li> - <?= Icon::create('trash', 'clickable')->asImg() ?> + <?= Icon::create('trash') ?> <?= _('Kontakt löschen') ?> </li> <? else: ?> <li> - <?= Icon::create('arr_1down', 'clickable')->asImg() ?> + <?= Icon::create('arr_1down') ?> <?= _('Kontakt aufklappen') ?> </li> <? endif; ?> - <? if ($open || $contact['view'] == 'gruppen'): ?> + <? if ($open || $contact['view'] === 'gruppen'): ?> <li> <?= Icon::create('export') ?> <?= _('als vCard exportieren') ?> diff --git a/templates/forms/form.php b/templates/forms/form.php index fe19404e67dea6eea527350e565f1b49a2fb3af9..b3679740825788342cf518366267130e12fdfa2d 100644 --- a/templates/forms/form.php +++ b/templates/forms/form.php @@ -46,7 +46,7 @@ $form_id = md5(uniqid()); v-if="STUDIPFORM_REQUIRED.length > 0 || STUDIPFORM_VALIDATIONNOTES.length > 0"> <header> <h1> - <?= Icon::create('info-circle', Icon::ROLE_INFO)->asImg(17, ['class' => "text-bottom validation_notes_icon"]) ?> + <?= Icon::create('info-circle', Icon::ROLE_INFO)->asImg(['class' => 'text-bottom validation_notes_icon']) ?> <?= _('Hinweise zum Ausfüllen des Formulars') ?> </h1> </header> diff --git a/templates/news/comment-box.php b/templates/news/comment-box.php index eb1981053850cccb47d07d9661d3874a04b188cf..d9d8bb7a806ce7a450f77b729dfdce3de5d5d7f5 100644 --- a/templates/news/comment-box.php +++ b/templates/news/comment-box.php @@ -17,7 +17,10 @@ </td> <td width="20"> <? if ($comments_admin): ?> - <?= Icon::create('trash', 'clickable', ['title' => _('Kommentar entfernen')])->asInput(['name'=>'news_delete_comment_'.$comment['comment_id']]) ?> + <?= Icon::create('trash')->asInput([ + 'name' => 'news_delete_comment_'.$comment['comment_id'], + 'title' => _('Kommentar entfernen'), + ]) ?> <? endif ?> </td> - </tr> \ No newline at end of file + </tr> diff --git a/templates/online/user.php b/templates/online/user.php index 931aaabf3aff0ec7c51388d5c48daf27f5739b69..9517447f0858981d78f2f0bbd2b79f4a1090dfbe 100644 --- a/templates/online/user.php +++ b/templates/online/user.php @@ -7,7 +7,11 @@ <? if (!$is_buddy) : ?> <a href="<?= URLHelper::getLink('online.php', ['cmd' => 'add_user', 'add_uname' => $tmp_online_uname]) ?>"> - <?= Icon::create('arr_2left', 'sort', ['title' => _("zu den Buddies hinzufügen")])->asImg(16, ["style" => 'padding-right: 0.33em;', "class" => 'middle']) ?> + <?= Icon::create('arr_2left', Icon::ROLE_SORT)->asImg([ + 'title' => _('zu den Buddies hinzufügen'), + 'style' => 'padding-right: 0.33em;', + 'class' => 'middle', + ]) ?> </a> <? else : ?> @@ -25,7 +29,7 @@ <?= htmlReady($fullname) ?> </a> <? foreach (StudipKing::is_king($tmp_user_id, TRUE) as $type => $text) : ?> - <?= Icon::create('crown', 'sort', ['title' => $text, 'title' => $text, 'class' => 'text-bottom'])->asImg() ?> + <?= Icon::create('crown', Icon::ROLE_SORT)->asImg(['title' => $text, 'class' => 'text-bottom']) ?> <? endforeach ?> </td> @@ -36,14 +40,14 @@ <td width="3%" align="center"> <? if (class_exists("Blubber")) : ?> <a href="<?= URLHelper::getLink('dispatch.php/course/streams/global', ['mention' => $tmp_online_uname]) ?>"> - <?= Icon::create('blubber', 'clickable', ['title' => _("Blubber diesen Nutzer an"), 'class' => 'text-bottom'])->asImg() ?> + <?= Icon::create('blubber')->asImg(['title' => _("Blubber diesen Nutzer an"), 'class' => 'text-bottom']) ?> </a> <? endif ?> </td> <td width="3%" align="center"> <a href="<?= URLHelper::getLink('dispatch.php/messages/write', ['rec_uname' => $tmp_online_uname]) ?>"> - <?= Icon::create('mail', 'clickable', ['title' => _("Nachricht an Benutzer verschicken"), 'class' => 'text-bottom'])->asImg() ?> + <?= Icon::create('mail')->asImg(['title' => _('Nachricht an Benutzer verschicken'), 'class' => 'text-bottom']) ?> </a> </td> @@ -52,7 +56,7 @@ <a href="<?= URLHelper::getLink("online.php", ["cmd" => "delete_user", "delete_uname" => $tmp_online_uname]) ?>"> - <?= Icon::create('trash', 'clickable', ['title' => _("aus der Buddy-Liste entfernen"), 'class' => 'text-bottom'])->asImg() ?> + <?= Icon::create('trash')->asImg(['title' => _('aus der Buddy-Liste entfernen'), 'class' => 'text-bottom']) ?> </a> <? else : ?> diff --git a/templates/quicksearch/selectbox.php b/templates/quicksearch/selectbox.php index 1ca5e5ba398994f53ce7b8963c6e557cbfc2ddd7..66eeb7db62391e0780162610ecade8acab80c93f 100644 --- a/templates/quicksearch/selectbox.php +++ b/templates/quicksearch/selectbox.php @@ -7,7 +7,7 @@ if ($withButton) : ?> <div class="quicksearch_frame" style="width: <?= $box_width ?>px;"> <? $withAttributes['style'] = "width: ".($box_width-23)."px;"; ?> <? if ($box_align === "left") : ?> - <?= Icon::create('refresh', 'clickable')->asInput(["class" => 'text-bottom']) ?> + <?= Icon::create('refresh')->asInput(['class' => 'text-bottom']) ?> <? endif ?> <? endif ?> <select<? foreach ($withAttributes as $attr_name => $attr_value) { @@ -27,7 +27,11 @@ if ($withButton) : ?> </select> <? if ($withButton) : ?> <? if ($box_align !== "left") : ?> - <?= Icon::create('refresh', 'clickable', ['title' => _('Suche zurücksetzen')])->asInput(['name'=>$reset_button_name?:'','class'=>'text-bottom',]) ?> + <?= Icon::create('refresh')->asInput([ + 'name'=> $reset_button_name ?? '', + 'class'=>'text-bottom', + 'title' => _('Suche zurücksetzen') + ]) ?> <? endif ?> </div> <? endif ?> diff --git a/templates/sidebar/clipboard-widget.php b/templates/sidebar/clipboard-widget.php index ccb44b23213b7722de092433a145027504d9ae2c..c1e38a21e68d468a72cabb9434d4d3339c3f6b96 100644 --- a/templates/sidebar/clipboard-widget.php +++ b/templates/sidebar/clipboard-widget.php @@ -35,13 +35,11 @@ <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' - ]) ?> + <?= Icon::create('add')->asInput([ + 'name' => 'save', + 'id' => 'add-clipboard-button', + 'class' => 'middle', + 'disabled' => 'disabled', + 'title' => _('Hinzufügen'), + ]) ?> </form> diff --git a/templates/sidebar/resource-tree-widget.php b/templates/sidebar/resource-tree-widget.php index 2346131c40a9d1d59fe62ce1eea1e3f352ac92c9..890971b92e894307e7efa9db017d4eed646c57da 100644 --- a/templates/sidebar/resource-tree-widget.php +++ b/templates/sidebar/resource-tree-widget.php @@ -21,37 +21,30 @@ <? if ($resource_path && !in_array($resource->id, $resource_path)): ?> <a href="<?= $link ?>"> <? endif; ?> - <?= Icon::create('arr_1right', Icon::ROLE_CLICKABLE, [ - 'class' => ( - in_array($resource->id, $resource_path) || (!$resource_path && $resource->level < $max_open_depth) - ? 'rotated' - : '' - ), - 'style' => - (in_array($resource->id, $resource_path) || (!$resource_path && $resource->level < $max_open_depth) + <?= Icon::create('arr_1right')->asImg([ + 'class' => in_array($resource->id, $resource_path) || (!$resource_path && $resource->level < $max_open_depth) + ? 'rotated' + : '', + 'style' => in_array($resource->id, $resource_path) || (!$resource_path && $resource->level < $max_open_depth) ? 'transform: rotate(90deg)' - : '' - ), - 'onClick' => - (!$resource_path || in_array($resource->id, $resource_path) + : '', + 'onClick' => !$resource_path || in_array($resource->id, $resource_path) ? 'STUDIP.Resources.toggleTreeNode($(this).parent());' : '' - )]) ?> - + ]) ?> + <? if ($resource_path && !in_array($resource->id, $resource_path)): ?> </a> <? endif; ?> - + <? endif ?> <a href="<?= $link ?>" <?= !$resource_path ? 'data-dialog' : ''; ?> <?= $selected ? 'class="selected-resource"' : '' ?>> - <?= $resource->getIcon($selected ? Icon::ROLE_INFO_ALT : Icon::ROLE_CLICKABLE)->asImg( - [ - 'class' => 'text-bottom' - ] - ) ?> + <?= $resource->getIcon($selected ? Icon::ROLE_INFO_ALT : Icon::ROLE_CLICKABLE)->asImg([ + 'class' => 'text-bottom' + ]) ?> <?= htmlReady($resource->name) ?> </a> <? if ($resource->children): ?> diff --git a/templates/sidebar/resources_individual_booking_plan_sidebar.php b/templates/sidebar/resources_individual_booking_plan_sidebar.php index 77068fa718a9cd7db40017e96be86166b84d1fc6..8ba630dc4407216c439d326f7858e13fd2b30ea8 100644 --- a/templates/sidebar/resources_individual_booking_plan_sidebar.php +++ b/templates/sidebar/resources_individual_booking_plan_sidebar.php @@ -11,12 +11,9 @@ <input type="color" value="#000000" class="big-colour-input"> </div> <? endfor ?> - <?= Icon::create('print', 'clickable')->asImg( - '32px', - [ - 'class' => 'text-bottom print-action', - 'title' => _('Individuelle Druckansicht drucken'), - 'onclick' => 'javascript:window.print();' - ] - ) ?> + <?= Icon::create('print')->asImg(Icon::SIZE_LARGE, [ + 'class' => 'text-bottom print-action', + 'title' => _('Individuelle Druckansicht drucken'), + 'onclick' => 'javascript:window.print();' + ]) ?> </section> diff --git a/templates/sidebar/room-clipboard-item.php b/templates/sidebar/room-clipboard-item.php index 86c2950889159a041afe6e33cfcea9deb0c13183..45633a049a064ab4ae47ee1ce78b0ab1aba0c997 100644 --- a/templates/sidebar/room-clipboard-item.php +++ b/templates/sidebar/room-clipboard-item.php @@ -33,29 +33,20 @@ if (!$item) { <td class="item-name"><?= htmlReady($item['name'] ?? '') ?></td> <td class="actions"> <a href="<?= Room::getLinkForAction('show', (!empty($item) ? $item['range_id'] : 'RANGE_ID')) ?>" data-dialog> - <?= Icon::create( - 'info-circle', - Icon::ROLE_CLICKABLE, - [ - 'title' => _('Rauminformationen'), - 'class' => 'text-bottom' - ])?> + <?= Icon::create('info-circle')->asImg([ + 'title' => _('Rauminformationen'), + 'class' => 'text-bottom' + ])?> </a> <a href="<?= Room::getLinkForAction('semester_plan', (!empty($item) ? $item['range_id'] : 'RANGE_ID')) ?>" target="_blank"> - <?= Icon::create( - 'timetable', - Icon::ROLE_CLICKABLE, - [ - 'title' => _('Semesterbelegung'), - 'class' => 'text-bottom' - ] - )?> + <?= Icon::create('timetable')->asImg([ + 'title' => _('Semesterbelegung'), + 'class' => 'text-bottom' + ])?> </a> - <?= Icon::create('trash')->asInput( - [ - 'data-confirm-message' => _('Sind Sie sicher?'), - 'class' => 'text-bottom clipboard-item-remove-button' - ] - ) ?> + <?= 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 76678dfd554f80570b07c0b684c1cf59d2423b10..f55f73d44c91ab2e26a8758a8e3ed19c84a95a92 100644 --- a/templates/sidebar/room-clipboard-widget.php +++ b/templates/sidebar/room-clipboard-widget.php @@ -35,13 +35,13 @@ <?= 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' - ]) ?> + <?= Icon::create('add')->asInput([ + 'name' => 'save', + 'id' => 'add-clipboard-button', + 'class' => 'middle', + 'disabled' => 'disabled', + 'title' => _('Hinzufügen'), + ]) ?> </label> </form> diff --git a/templates/sidebar/search-widget.php b/templates/sidebar/search-widget.php index e475f00a87db7a2b78a6bd0b96eb6bd256d8fe8d..332579cbe29b4e3a0d6858ea4cd951fd7dcc55f5 100644 --- a/templates/sidebar/search-widget.php +++ b/templates/sidebar/search-widget.php @@ -24,9 +24,24 @@ <? if ($needle['placeholder']) printf('placeholder="%s"', htmlReady($needle['label'])); ?> <?= arrayToHtmlAttributes($needle['attributes']) ?>> <? endif; ?> + <? if ($reset_link): ?> + <? if ($onsubmit) : ?> + <?= Icon::create('decline')->asInput([ + 'title' => _('Suche zurücksetzen'), + 'class' => 'reset-search', + 'onclick' => "window.document.getElementById('needle-".$hash."').value = '';" + ]) ?> + <? else : ?> + <a class="reset-search" href="<?= $reset_link ?>" tabindex="0" role="button" + <?= $onsubmit ? 'onclick="'."window.document.getElementById('needle-".$hash."').value = ''; window.document.getElementById('".$id."').submit(); return false; ".'"' : '' ?> + title="<?= _('Suche zurücksetzen') ?>"> + <?= Icon::create('decline') ?> + </a> + <? endif ?> + <? endif; ?> <button type="submit" class="submit-search<?= $reset_link ? ' is-executed' : '' ?>" title="<?= _('Suche ausführen') ?>"> - <?= Icon::create('search')->asImg(20) ?> + <?= Icon::create('search') ?> </button> <? if ($reset_link): ?> <? if ($onsubmit) : ?> @@ -38,7 +53,7 @@ <? else : ?> <a class="reset-search" href="<?= $reset_link ?>" tabindex="0" role="button" title="<?= _('Suche zurücksetzen') ?>"> - <?= Icon::create('decline')->asImg(20) ?> + <?= Icon::create('decline') ?> </a> <? endif ?> <? endif; ?> diff --git a/templates/start/_jstemplates.php b/templates/start/_jstemplates.php index 740b05a3462d01d895cb59f4cb70884a376c5b86..16c26fc4d80d4cf526fce7be64f2f39a891ff13e 100644 --- a/templates/start/_jstemplates.php +++ b/templates/start/_jstemplates.php @@ -35,23 +35,23 @@ <% var treffer = activity.provider.match(/.*\\(.*)Provider/) %> <% var provider = treffer[1].toLowerCase(); %> <% if (provider === 'blubber') { %> - <?= Icon::create('blubber', 'info_alt')->asImg(32) ?> + <?= Icon::create('blubber', Icon::ROLE_INFO_ALT) ?> <% } else if(provider === 'documents') { %> - <?= Icon::create('files', 'info_alt')->asImg(32) ?> + <?= Icon::create('files', Icon::ROLE_INFO_ALT) ?> <% } else if(provider === 'forum') { %> - <?= Icon::create('forum', 'info_alt')->asImg(32) ?> + <?= Icon::create('forum', Icon::ROLE_INFO_ALT) ?> <% } else if(provider === 'message') { %> - <?= Icon::create('mail', 'info_alt')->asImg(32) ?> + <?= Icon::create('mail', Icon::ROLE_INFO_ALT) ?> <% } else if(provider === 'news') { %> - <?= Icon::create('news', 'info_alt')->asImg(32) ?> + <?= Icon::create('news', Icon::ROLE_INFO_ALT) ?> <% } else if(provider === 'participants') { %> - <?= Icon::create('persons', 'info_alt')->asImg(32) ?> + <?= Icon::create('persons', Icon::ROLE_INFO_ALT) ?> <% } else if(provider === 'schedule') { %> - <?= Icon::create('schedule', 'info_alt')->asImg(32) ?> + <?= Icon::create('schedule', Icon::ROLE_INFO_ALT) ?> <% } else if(provider === 'wiki') { %> - <?= Icon::create('wiki', 'info_alt')->asImg(32) ?> + <?= Icon::create('wiki', Icon::ROLE_INFO_ALT) ?> <% } else { %> - <?= Icon::create('activity', 'info_alt')->asImg(32) ?> + <?= Icon::create('activity', Icon::ROLE_INFO_ALT) ?> <% } %> </span> <div class="activity-heading"> diff --git a/tests/unit/lib/classes/IconClassTest.php b/tests/unit/lib/classes/IconClassTest.php index 0e79df928dd70e27c1c965351876de6ba66a1629..01a3a1beaa272517fe172381bd7b7084db61ad8c 100644 --- a/tests/unit/lib/classes/IconClassTest.php +++ b/tests/unit/lib/classes/IconClassTest.php @@ -12,93 +12,93 @@ class IconClassTest extends \Codeception\Test\Unit { private $memo_assets_url; - function setUp(): void + public function setUp(): void { $this->memo_assets_url = Assets::url(); Assets::set_assets_url(''); } - function tearDown(): void + public function tearDown(): void { Assets::set_assets_url($this->memo_assets_url); } - function testIconCreateAsImg() + public function testIconCreateAsImg() { $this->assertEquals( - '<img width="16" height="16" src="images/icons/blue/vote.svg" alt="" class="icon-role-clickable icon-shape-vote">', + '<img src="images/icons/blue/vote.svg" alt="" class="studip-icon icon-role-clickable icon-shape-vote">', Icon::create('vote')->asImg() ); } - function testIconCreateAsImgWithAddition() + public function testIconCreateAsImgWithAddition() { $this->assertEquals( - '<img width="16" height="16" src="images/icons/blue/vote.svg" alt="" class="icon-role-clickable icon-shape-vote">', + '<img src="images/icons/blue/vote.svg" alt="" class="studip-icon icon-role-clickable icon-shape-vote">', Icon::create('vote')->asImg() ); } - function testIconCreateAsImgWithSize() + public function testIconCreateAsImgWithSize() { $this->assertEquals( - '<img width="20" height="20" src="images/icons/blue/vote.svg" alt="" class="icon-role-clickable icon-shape-vote">', - Icon::create('vote')->asImg(20) + '<img style="width:100px;height:100px" src="images/icons/blue/vote.svg" alt="" class="studip-icon icon-role-clickable icon-shape-vote">', + Icon::create('vote')->asImg(100) ); } - function testIconCreateAsImgWithTitle() + public function testIconCreateAsImgWithTitle() { $this->assertEquals( - '<img title="Mit Anhang" width="20" height="20" src="images/icons/blue/vote.svg" class="icon-role-clickable icon-shape-vote">', - Icon::create('vote')->asImg(20, ['title' => _('Mit Anhang')]) + '<img title="Mit Anhang" style="width:24px;height:24px" src="images/icons/blue/vote.svg" class="studip-icon icon-role-clickable icon-shape-vote">', + Icon::create('vote')->asImg(24, ['title' => 'Mit Anhang']) ); } - function testIconCreateAsImgWithHspace() + public function testIconCreateAsImgWithHspace() { $this->assertEquals( - '<img hspace="3" width="16" height="16" src="images/icons/blue/arr_2left.svg" alt="" class="icon-role-clickable icon-shape-arr_2left">', + '<img hspace="3" src="images/icons/blue/arr_2left.svg" alt="" class="studip-icon icon-role-clickable icon-shape-arr_2left">', Icon::create('arr_2left')->asImg(['hspace' => 3]) ); } - function testIconCreateAsImgWithClass() + public function testIconCreateAsImgWithClass() { $this->assertEquals( - '<img class="text-bottom icon-role-info icon-shape-staple" width="20" height="20" src="images/icons/black/staple.svg" alt="">', - Icon::create('staple', Icon::ROLE_INFO)->asImg(20, ['class' => 'text-bottom']) + '<img class="text-bottom studip-icon icon-role-info icon-shape-staple" style="width:24px;height:24px" src="images/icons/black/staple.svg" alt="">', + Icon::create('staple', Icon::ROLE_INFO)->asImg(24, ['class' => 'text-bottom']) ); } - function testIconCreateAsImgWithClassAndTitle() + public function testIconCreateAsImgWithClassAndTitle() { $this->assertEquals( - '<img title="Datei hochladen" class="text-bottom icon-role-new icon-shape-upload" width="20" height="20" src="images/icons/red/upload.svg">', - Icon::create('upload', Icon::ROLE_NEW, ['title' => _("Datei hochladen")]) - ->asImg(20, ['class' => 'text-bottom']) + '<img class="text-bottom studip-icon icon-role-new icon-shape-upload" title="Datei hochladen" style="width:24px;height:24px" src="images/icons/red/upload.svg">', + Icon::create('upload', Icon::ROLE_NEW, ['title' => 'Datei hochladen']) + ->asImg(24, ['class' => 'text-bottom']) ); } - function testIconCreateAsInput() + public function testIconCreateAsInput() { $this->assertEquals( - '<input type="image" class="text-bottom icon-role-clickable icon-shape-upload" width="20" height="20" src="images/icons/blue/upload.svg" alt="">', - Icon::create('upload')->asInput(20, ['class' => 'text-bottom']) + '<input type="image" class="text-bottom studip-icon icon-role-clickable icon-shape-upload" style="width:24px;height:24px" src="images/icons/blue/upload.svg" alt="">', + Icon::create('upload')->asInput(24, ['class' => 'text-bottom']) ); } - function testIconIsImmutable() + public function testIconIsImmutable() { - $icon = Icon::create('upload', Icon::ROLE_CLICKABLE, ['title' => _('a title')]); + $icon = Icon::create('upload', attributes: ['title' => 'a title']); $copy = $icon->copyWithRole(Icon::ROLE_CLICKABLE); $this->assertNotSame($icon, $copy); } - function testIconCopyWithRole() + public function testIconCopyWithRole() { - $icon = Icon::create('upload', Icon::ROLE_CLICKABLE, ['title' => _('a title')]); + $icon = Icon::create('upload', attributes: ['title' => 'a title']); $copy = $icon->copyWithRole(Icon::ROLE_INFO); $this->assertEquals($icon->getShape(), $copy->getShape()); @@ -106,9 +106,9 @@ class IconClassTest extends \Codeception\Test\Unit $this->assertEquals($icon->getAttributes(), $copy->getAttributes()); } - function testIconCopyWithShape() + public function testIconCopyWithShape() { - $icon = Icon::create('upload', Icon::ROLE_CLICKABLE, ['title' => _('a title')]); + $icon = Icon::create('upload', attributes: ['title' => 'a title']); $copy = $icon->copyWithShape('staple'); $this->assertNotEquals($icon->getShape(), $copy->getShape()); @@ -116,23 +116,23 @@ class IconClassTest extends \Codeception\Test\Unit $this->assertEquals($icon->getAttributes(), $copy->getAttributes()); } - function testIconCopyWithAttributes() + public function testIconCopyWithAttributes() { - $icon = Icon::create('upload', Icon::ROLE_CLICKABLE, ['title' => _('a title')]); - $copy = $icon->copyWithAttributes(['title' => _('another title')]); + $icon = Icon::create('upload', Icon::ROLE_CLICKABLE, ['title' => 'a title']); + $copy = $icon->copyWithAttributes(['title' => 'another title']); $this->assertEquals($icon->getShape(), $copy->getShape()); $this->assertEquals($icon->getRole(), $copy->getRole()); $this->assertNotEquals($icon->getAttributes(), $copy->getAttributes()); } - function testStaticIcon() + public function testStaticIcon() { $icon = Icon::create('https://i.imgur.com/kpTtTh.gif'); $this->assertEquals($icon->asImagePath(), 'https://i.imgur.com/kpTtTh.gif'); } - function testIconCreateAsCSSWithSize() + public function testIconCreateAsCSSWithSize() { $this->assertEquals( 'background-image:url(images/icons/blue/vote.svg);background-size:17px 17px;', @@ -140,7 +140,7 @@ class IconClassTest extends \Codeception\Test\Unit ); } - function testIconCreateAsImagePath() + public function testIconCreateAsImagePath() { $this->assertEquals( 'images/icons/blue/vote.svg', @@ -148,30 +148,30 @@ class IconClassTest extends \Codeception\Test\Unit ); } - function testIconCreateAsImgWithoutSize() + public function testIconCreateAsImgWithoutSize() { $this->assertEquals( - '<img src="images/icons/blue/vote.svg" alt="" class="icon-role-clickable icon-shape-vote">', + '<img src="images/icons/blue/vote.svg" alt="" class="studip-icon icon-role-clickable icon-shape-vote">', Icon::create('vote')->asImg(false) ); } - function testIconCreateAsInputWithoutSize() + public function testIconCreateAsInputWithoutSize() { $this->assertEquals( - '<input type="image" src="images/icons/blue/upload.svg" alt="" class="icon-role-clickable icon-shape-upload">', + '<input type="image" src="images/icons/blue/upload.svg" alt="" class="studip-icon icon-role-clickable icon-shape-upload">', Icon::create('upload')->asInput(false) ); } - function testIconCreateRemovedExtras() + public function testIconCreateRemovedExtras() { $this->assertEquals( - '<img src="images/icons/blue/vote.svg" alt="" class="icon-role-clickable icon-shape-vote">', + '<img src="images/icons/blue/vote.svg" alt="" class="studip-icon icon-role-clickable icon-shape-vote">', Icon::create('add/vote')->asImg(false) ); $this->assertEquals( - '<img src="images/icons/blue/vote.svg" alt="" class="icon-role-clickable icon-shape-vote">', + '<img src="images/icons/blue/vote.svg" alt="" class="studip-icon icon-role-clickable icon-shape-vote">', Icon::create('vote+add')->asImg(false) ); }