Skip to content

Commit

Permalink
Update UF5 Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Nov 12, 2023
1 parent d707b5b commit 30c97c3
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 36 deletions.
11 changes: 4 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[submodule "sites/develop"]
path = sites/develop
url = https://github.com/userfrosting/learn.git
branch = develop

[submodule "sites/4.0"]
path = sites/4.0
url = https://github.com/userfrosting/learn.git
Expand Down Expand Up @@ -30,7 +27,7 @@
path = sites/4.6
url = https://github.com/userfrosting/learn.git
branch = 4.6
[submodule "sites/5.0-beta"]
path = sites/5.0-beta
[submodule "sites/5.0"]
path = sites/5.0
url = https://github.com/userfrosting/learn.git
branch = 5.0-beta
branch = 5.0
54 changes: 32 additions & 22 deletions config/versions.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
branches:
'latest':
path: ''
label: 'Latest'
'4.0':
path: '/4.0'
label: '4.0'
'4.1':
path: '/4.1'
label: '4.1'
'4.2':
path: '/4.2'
label: '4.2'
'4.3':
path: '/4.3'
label: '4.3'
'4.4':
path: '/4.4'
label: '4.4'
'4.5':
path: '/4.5'
label: '4.5'
label: '5.0'
visible: true
'5.0':
path: '/5.0'
label: '5.0'
visible: false
'4.6':
path: '/4.6'
label: '4.6'
'5.0-beta':
path: '/5.0-beta'
label: '5.0 Beta'
visible: true
'4.5':
path: '/4.5'
label: '4.5'
visible: true
'4.4':
path: '/4.4'
label: '4.4'
visible: true
'4.3':
path: '/4.3'
label: '4.3'
visible: true
'4.2':
path: '/4.2'
label: '4.2'
visible: true
'4.1':
path: '/4.1'
label: '4.1'
visible: true
'4.0':
path: '/4.0'
label: '4.0'
visible: true

1 change: 1 addition & 0 deletions sites/5.0
Submodule 5.0 added at a3e77d
1 change: 0 additions & 1 deletion sites/5.0-beta
Submodule 5.0-beta deleted from 11fe4c
1 change: 0 additions & 1 deletion sites/develop
Submodule develop deleted from efaa0c
2 changes: 1 addition & 1 deletion sites/latest
4 changes: 3 additions & 1 deletion themes/sitetheme/templates/partials/navigation.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
</a>
<ul id="dropdown2" class="dropdown-content">
{% for version in config.versions.branches %}
<li><a href="{{ uri.rootUrl }}{{ version.path }}{{ uri.path }}">{{ version.label }}</a></li>
{% if version.visible %}
<li><a href="{{ uri.rootUrl }}{{ version.path }}{{ uri.path }}">{{ version.label }}</a></li>
{% endif %}
{% endfor %}
</ul>
</li>
Expand Down
8 changes: 5 additions & 3 deletions themes/sitetheme/templates/partials/versionSelect.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
<label>Version: </label>
<select>
{% for label, version in config.versions.branches %}
<option {% if config.environment == label %}selected="selected" {% endif %}value="{{ uri.rootUrl }}{{ version.path }}{{ uri.path }}">
{{ version.label }}
</option>
{% if version.visible %}
<option {% if config.environment == label %}selected="selected" {% endif %}value="{{ uri.rootUrl }}{{ version.path }}{{ uri.path }}">
{{ version.label }}
</option>
{% endif %}
{% endfor %}
</select>
</div>

0 comments on commit 30c97c3

Please sign in to comment.