Skip to content

Commit

Permalink
[WIP][TASK] Fix context awareness for action icons
Browse files Browse the repository at this point in the history
TODO:
  * fluid core:icon viewhelper can not be made
    context aware (to current color), as the SVG
    is rendered as <img> tag.
  * <typo3-backend-icon> does not set a `fill`
    for `.icon-color`
  • Loading branch information
bnf committed Oct 16, 2024
1 parent 8074be2 commit cd6a38f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions Resources/Private/Templates/Backend/Comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@ <h1><f:translate key="backend.headline.comments" /></h1>
<f:switch expression="{comment.status}">
<f:case value="0">
<f:comment>Status: pending</f:comment>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.approve')}" action="updateCommentStatus" arguments="{comment: comment, status: 'approve', filter: activeFilter, blogSetup: activeBlogSetup}"><core:icon identifier="actions-approve" /></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.decline')}" action="updateCommentStatus" arguments="{comment: comment, status: 'decline', filter: activeFilter, blogSetup: activeBlogSetup}"><core:icon identifier="actions-decline" /></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.approve')}" action="updateCommentStatus" arguments="{comment: comment, status: 'approve', filter: activeFilter, blogSetup: activeBlogSetup}"><typo3-backend-icon identifier="actions-approve" size="small"></typo3-backend-icon></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.decline')}" action="updateCommentStatus" arguments="{comment: comment, status: 'decline', filter: activeFilter, blogSetup: activeBlogSetup}"><typo3-backend-icon identifier="actions-decline" size="small"></typo3-backend-icon></f:link.action>
</f:case>
<f:case value="10">
<f:comment>Status: approved</f:comment>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.decline')}" action="updateCommentStatus" arguments="{comment: comment, status: 'decline', filter: activeFilter, blogSetup: activeBlogSetup}"><core:icon identifier="actions-decline" /></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.delete')}" action="updateCommentStatus" arguments="{comment: comment, status: 'delete', filter: activeFilter, blogSetup: activeBlogSetup}"><core:icon identifier="actions-delete" /></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.decline')}" action="updateCommentStatus" arguments="{comment: comment, status: 'decline', filter: activeFilter, blogSetup: activeBlogSetup}"><typo3-backend-icon identifier="actions-decline" size="small"></typo3-backend-icon></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.delete')}" action="updateCommentStatus" arguments="{comment: comment, status: 'delete', filter: activeFilter, blogSetup: activeBlogSetup}"><typo3-backend-icon identifier="actions-delete" size="small"></typo3-backend-icon></f:link.action>
</f:case>
<f:case value="50">
<f:comment>Status: declined</f:comment>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.approve')}" action="updateCommentStatus" arguments="{comment: comment, status: 'approve', filter: activeFilter, blogSetup: activeBlogSetup}"><core:icon identifier="actions-approve" /></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.delete')}" action="updateCommentStatus" arguments="{comment: comment, status: 'delete', filter: activeFilter, blogSetup: activeBlogSetup}"><core:icon identifier="actions-delete" /></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.approve')}" action="updateCommentStatus" arguments="{comment: comment, status: 'approve', filter: activeFilter, blogSetup: activeBlogSetup}"><typo3-backend-icon identifier="actions-approve" size="small"></typo3-backend-icon></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.delete')}" action="updateCommentStatus" arguments="{comment: comment, status: 'delete', filter: activeFilter, blogSetup: activeBlogSetup}"><typo3-backend-icon identifier="actions-delete" size="small"></typo3-backend-icon></f:link.action>
</f:case>
<f:case value="90">
<f:comment>Status: deleted</f:comment>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.approve')}" action="updateCommentStatus" arguments="{comment: comment, status: 'approve', filter: activeFilter, blogSetup: activeBlogSetup}"><core:icon identifier="actions-approve" /></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.decline')}" action="updateCommentStatus" arguments="{comment: comment, status: 'decline', filter: activeFilter, blogSetup: activeBlogSetup}"><core:icon identifier="actions-decline" /></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.approve')}" action="updateCommentStatus" arguments="{comment: comment, status: 'approve', filter: activeFilter, blogSetup: activeBlogSetup}"><typo3-backend-icon identifier="actions-approve" size="small"></typo3-backend-icon></f:link.action>
<f:link.action class="btn btn-default" data="{toggle: 'tooltip', container: 'body'}" title="{f:translate(key: 'action.decline')}" action="updateCommentStatus" arguments="{comment: comment, status: 'decline', filter: activeFilter, blogSetup: activeBlogSetup}"><typo3-backend-icon identifier="actions-decline" size="small"></typo3-backend-icon></f:link.action>
</f:case>
</f:switch>
<blogvh:link.be.comment class="btn btn-default" title="{f:translate(key: 'action.editComment')}" comment="{comment}"><core:icon identifier="actions-open" /></blogvh:link.be.comment>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/Css/backend.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Resources/Public/Icons/actions-approve.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Resources/Public/Icons/actions-decline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cd6a38f

Please sign in to comment.