Skip to content

Commit

Permalink
fixed Icons are not listed in admin if using revAssetUrls #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ammannbe committed Nov 24, 2022
1 parent 6c81330 commit 4150ccb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres
to [Semantic Versioning](http://semver.org/).

## 1.0.2 - 2022-11-24

- Fixed: Icons are not listed in admin if using revAssetUrls [#2](https://github.com/HOMMinteractive/hommicons/issues/2)

## 1.0.1 - 2022-07-22

- Revert: add removed attribute...
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "homm/hommicons",
"description": "Craft CMS Icon Picker",
"type": "craft-plugin",
"version": "1.0.1",
"version": "1.0.2",
"keywords": [
"craft",
"cms",
Expand Down
13 changes: 2 additions & 11 deletions src/templates/_components/fields/HOMMIconsField_input.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
<span class="iconpicker-preview">
{% for icon in icons %}
{% if icon.getFilename(false) == value %}
{% set iconSvg = icon.getUrl()|slice(1) %}
{{ svg(iconSvg) }}
{{ svg(icon.getVolume().path ~ '/' ~ icon.getPath()) }}
{% endif %}
{% endfor %}
</span>
Expand All @@ -39,13 +38,11 @@
<div class="homm-iconpicker">
{% for icon in icons %}
{% if icon.folder == 'icons' %}

{% set iconSvg = icon.getUrl()|slice(1) %}
<span data-val="{{ icon.getFilename(false) }}"
class="{{ value == icon.getFilename(false) ? 'iconpicker--selected' }}"
title="{{ icon.getFilename(false) }}"
>
{{ svg(iconSvg) }}
{{ svg(icon.getVolume().path ~ '/' ~ icon.getPath()) }}
<label><small>{{ icon.getFilename(false) }}</small></label>
</span>
{% endif %}
Expand All @@ -64,9 +61,3 @@
</div>
<div class="resizehandle"></div>
</div>






0 comments on commit 4150ccb

Please sign in to comment.