Skip to content

Commit

Permalink
pkp#9626 Use svg icons in smarty templates that use Icon component
Browse files Browse the repository at this point in the history
  • Loading branch information
blesildaramirez committed Nov 8, 2024
1 parent bf64b62 commit e2efad6
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 15 deletions.
3 changes: 3 additions & 0 deletions js/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import Badge from '@/components/Badge/Badge.vue';
import Dropdown from '@/components/Dropdown/Dropdown.vue';
import DropdownActions from '@/components/DropdownActions/DropdownActions.vue';
import Icon from '@/components/Icon/Icon.vue';
import InitialsAvatar from '@/components/InitialsAvatar/InitialsAvatar.vue';
import SideNav from '@/components/SideNav/SideNav.vue';
import Notification from '@/components/Notification/Notification.vue';
import Panel from '@/components/Panel/Panel.vue';
Expand Down Expand Up @@ -120,6 +121,8 @@ VueRegistry.registerComponent('PkpDropdown', Dropdown);
VueRegistry.registerComponent('DropdownActions', DropdownActions);
VueRegistry.registerComponent('Icon', Icon);
VueRegistry.registerComponent('PkpIcon', Icon);
VueRegistry.registerComponent('InitialsAvatar', InitialsAvatar);
VueRegistry.registerComponent('PkpInitialsAvatar', InitialsAvatar);
VueRegistry.registerComponent('PkpSideNav', SideNav);
VueRegistry.registerComponent('Notification', Notification);
VueRegistry.registerComponent('PkpNotification', Notification);
Expand Down
10 changes: 5 additions & 5 deletions templates/layouts/backend.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{if $availableContexts}
<dropdown class="app__headerAction app__contexts">
<template #button>
<icon icon="sitemap"></icon>
<icon icon="Sitemap" class="h-7 w-7"></icon>
<span class="-screenReader">{translate key="context.contexts"}</span>
</template>
<ul>
Expand Down Expand Up @@ -77,16 +77,16 @@
{call_hook name="Template::Layout::Backend::HeaderActions"}
<div class="app__headerAction app__tasks">
<button ref="tasksButton" @click="openTasks">
<icon icon="bell-o"></icon>
<icon icon="Notifications" class="h-7 w-7"></icon>
<span class="-screenReader">{translate key="common.tasks"}</span>
<span v-if="unreadTasksCount" class="app__tasksCount">{{ unreadTasksCount }}</span>
</button>
</div>
<dropdown class="app__headerAction app__userNav">
<template #button>
<icon icon="user-circle-o"></icon>
<initials-avatar :is-secondary="true"></initials-avatar>
{if $isUserLoggedInAs}
<icon icon="user-circle" class="app__userNav__isLoggedInAsWarning"></icon>
<icon icon="User" class="absolute right-2 top-2 text-on-dark bg-negative rounded-full h-5 w-5"></icon>
{/if}
<span class="-screenReader">{$currentUser->getData('userName')}</span>
</template>
Expand All @@ -99,7 +99,7 @@
<li>
<a href="{url router=PKP\core\PKPApplication::ROUTE_PAGE page="user" op="setLocale" path=$localeKey}" class="pkpDropdown__action">
{if $localeKey == $currentLocale}
<icon icon="check" :inline="true"></icon>
<icon icon="Complete" class="h-5 w-5" :inline="true"></icon>
{/if}
{$locale|escape}
</a>
Expand Down
2 changes: 1 addition & 1 deletion templates/management/access.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<tab id="notify" label="{translate key="manager.setup.notifyUsers"}">
<div v-if="totalBulkJobs" role="alert">
<p>
<icon icon="check" :inline="true"></icon>
<icon icon="Complete" :inline="true" class="h-5 w-5"></icon>
{translate key="manager.setup.notifyUsers.queued"}
<button class="-linkButton" @click="reload">
{translate key="manager.setup.notifyUsers.sendAnother"}
Expand Down
2 changes: 1 addition & 1 deletion templates/management/manageEmails.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<template #sidebar>
<pkp-header>
<h2>
<icon icon="filter" :inline="true"></icon>
<icon icon="Filter" class="h-4 w-4" :inline="true"></icon>
{translate key="common.filter"}
</h2>
</pkp-header>
Expand Down
2 changes: 1 addition & 1 deletion templates/stats/editorial.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
:is-active="isSidebarVisible"
@click="toggleSidebar"
>
<icon icon="filter" :inline="true"></icon>
<icon icon="Filter" class="h-4 w-4" :inline="true"></icon>
{translate key="common.filter"}
</pkp-button>
</template>
Expand Down
4 changes: 2 additions & 2 deletions templates/stats/publications.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
:is-active="isSidebarVisible"
@click="toggleSidebar"
>
<icon icon="filter" :inline="true"></icon>
<icon icon="Filter" class="h-4 w-4" :inline="true"></icon>
{translate key="common.filter"}
</pkp-button>
</template>
Expand All @@ -64,7 +64,7 @@
:tabindex="isSidebarVisible ? 0 : -1"
>
<h2>
<icon icon="filter" :inline="true"></icon>
<icon icon="Filter" class="h-4 w-4" :inline="true"></icon>
{translate key="common.filter"}
</h2>
</pkp-header>
Expand Down
4 changes: 2 additions & 2 deletions templates/submission/review-contributors.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"
>
<notification v-if="!publication.authors.length" type="warning" class="submissionWizard__reviewEmptyWarning">
<icon icon="exclamation-triangle" :inline="true"></icon>
<icon icon="Error" class="h-5 w-5" :inline="true"></icon>
{translate key="submission.wizard.noContributors"}
</notification>
<ul
Expand All @@ -40,7 +40,7 @@
:key="i"
>
<notification type="warning">
<icon icon="exclamation-triangle" :inline="true"></icon>
<icon icon="Error" class="h-5 w-5" :inline="true"></icon>
{{ error }}
</notification>
</li>
Expand Down
2 changes: 1 addition & 1 deletion templates/submission/review-details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
:key="i"
type="warning"
>
<icon icon="exclamation-triangle"></icon>
<icon icon="Error" class="h-5 w-5"></icon>
{{ error }}
</notification>
</template>
Expand Down
2 changes: 1 addition & 1 deletion templates/submission/review-files.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
type="warning"
class="submissionWizard__reviewEmptyWarning"
>
<icon icon="exclamation-triangle" :inline="true"></icon>
<icon icon="Error" class="h-5 w-5" :inline="true"></icon>
{{ error }}
</notification>
<ul class="submissionWizard__reviewPanel__list">
Expand Down
2 changes: 1 addition & 1 deletion templates/submission/review-publication-field.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:key="i"
type="warning"
>
<icon icon="exclamation-triangle"></icon>
<icon icon="Error" class="h-5 w-5"></icon>
{{ error }}
</notification>
</template>
Expand Down

0 comments on commit e2efad6

Please sign in to comment.