Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
158 additions
and
112 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
{% import "_includes/forms" as forms %} | ||
<div class="meta"> | ||
{% set selectedTypeIds = [] %} | ||
{% for type in types %} | ||
{% set selectedTypeIds = selectedTypeIds|merge([type.id]) %} | ||
{% endfor %} | ||
<div class="meta user-types-hud"> | ||
{% set selectedTypes = craft.organizations.userTypes.getQuery({ | ||
organization: organization, | ||
user: user, | ||
select: ['typeId'] | ||
}).column() %} | ||
|
||
{% namespace 'types' %} | ||
{% for userType in craft.organizations.userTypes.findAll() %} | ||
{% set selected = userType.id in selectedTypeIds %} | ||
{{ forms.lightswitchField({ | ||
label: userType.name|t('organizations'), | ||
id: userType.handle, | ||
name: userType.id, | ||
on: selected, | ||
}) }} | ||
{% for heading, types in typeOptions %} | ||
{% if heading %}<h6 class="group-heading">{{ heading }}</h6>{% endif %} | ||
{% for id, label in types %} | ||
{% set selected = id in selectedTypes %} | ||
{{ forms.lightswitchField({ | ||
label: label|t('organizations'), | ||
id: id, | ||
name: id, | ||
on: selected, | ||
}) }} | ||
{% endfor %} | ||
{% endfor %} | ||
{% endnamespace %} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1 @@ | ||
{% extends "_layouts/cp" %} | ||
{% block sidebar %} | ||
{% set baseCpPath = 'organizations/settings' %} | ||
{% set selected = selected is defined ? selected : craft.app.request.getSegment(3) %} | ||
{% set nav = { | ||
general : { | ||
label: 'General', | ||
uri: '' | ||
},organizationTypes : { | ||
label: 'Organization Types', | ||
uri: 'organization-types' | ||
},userTypes : { | ||
label: 'User Types', | ||
uri: 'user-types' | ||
} | ||
} %} | ||
<nav> | ||
<ul> | ||
<li class="heading"><span>Navigation</span></li> | ||
{% for navKey, navItem in nav %} | ||
<li><a tabindex="0"{% if selected == navItem.uri %} class="sel"{% endif %} | ||
href="{{ url(baseCpPath ~ (navItem.uri ? '/'~navItem.uri : '')) }}">{{ navItem.label }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
{% endblock %} | ||
{% extends "_layouts/cp" %} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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