-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added grouping capabilities to tags on ideas(plannen) on create plannen page * Added tagid to checbox and label instead of non working option * specify if theme labels should be shown * Made it so tags can be grouped by use of extraData.theme * Changed default of showing labels to false for and made name consistent * Changed implementation to use type * Put back cache * Renamed theme fields to tagType * Added cache key for if an empty list was fetched * Added cachekey for empty list
- Loading branch information
1 parent
b88c97f
commit 8846a68
Showing
7 changed files
with
146 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 48 additions & 13 deletions
61
packages/cms/lib/modules/resource-form-widgets/views/includes/fields/tags.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,52 @@ | ||
<div class="checkbox-container"> | ||
{% for tag in data.openstadTags %} | ||
<div class="checkbox"> | ||
<input | ||
type="checkbox" | ||
name="tags[]" | ||
value="{{tag.id}}" | ||
id="checkbox-{{loop.index}}-{{option.value}}" | ||
{% if field.fieldRequired %}required{% endif %} | ||
{% if field.idea.tags %}checked{% endif %} | ||
/> | ||
<label for="checkbox-{{loop.index}}-{{option.value}}" class="checkbox-label"> | ||
{{tag.name}} | ||
</label> | ||
{% if field.tagType | ||
and data.groupedOpenstadTags[field.tagType] | ||
and data.groupedOpenstadTags[field.tagType].length %} | ||
|
||
{% for tag in data.groupedOpenstadTags[field.tagType] %} | ||
<div class="checkbox"> | ||
<input | ||
type="checkbox" | ||
name="tags[]" | ||
value="{{tag.id}}" | ||
id="checkbox-{{loop.index}}-{{tag.id}}" | ||
{% if field.fieldRequired %}required{% endif %} | ||
{% if field.idea.tags %}checked{% endif %} | ||
/> | ||
<label for="checkbox-{{loop.index}}-{{tag.id}}" class="checkbox-label">{{tag.name}}</label> | ||
</div> | ||
{% endfor %} | ||
{% endif %} | ||
</div> | ||
|
||
|
||
{% if field.tagType === '' or field.tagType === undefined %} | ||
{% for key, tagList in data.groupedOpenstadTags %} | ||
{% set outer_loop = loop %} | ||
|
||
{% if field.showTagTypeLabels %} | ||
{% if outer_loop.length > 1 and key !== 'undefined' %} | ||
<p>{{key}}</p> | ||
{% endif %} | ||
|
||
{% if outer_loop.length > 1 and key == 'undefined' %} | ||
<p>Overig</p> | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% for tag in tagList %} | ||
<div class="checkbox"> | ||
<input | ||
type="checkbox" | ||
name="tags[]" | ||
value="{{tag.id}}" | ||
id="checkbox-{{outer_loop.index}}-{{loop.index}}-{{tag.id}}" | ||
{% if field.fieldRequired %}required{% endif %} | ||
{% if field.idea.tags %}checked{% endif %} | ||
/> | ||
<label for="checkbox-{{outer_loop.index}}-{{loop.index}}-{{tag.id}}" class="checkbox-label">{{tag.name}}</label> | ||
</div> | ||
{% endfor %} | ||
{% endfor %} | ||
{% endif %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8846a68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Published new image:
openstad/frontend:development-8846a68