feat: merge social authentication into plugins menu in ACP

* also reordered the menu in ACP so plugins come first
* added muted headers in desktop version to distinguish both lists
* fixes julianlam/nodebb-plugin-sso-google#21
* closes #8066
v1.18.x
Julian Lam 5 years ago
parent 68118e438b
commit f9a8ebfce9

@ -78,31 +78,31 @@
</ul>
</section>
<!-- IF authentication.length -->
<!-- IF plugins.length -->
<section class="menu-section">
<h3 class="menu-section-title">[[admin/menu:section-social-auth]]</h3>
<h3 class="menu-section-title">[[admin/menu:section-plugins]]</h3>
<ul class="menu-section-list">
<!-- BEGIN authentication -->
<!-- BEGIN plugins -->
<li>
<a href="{relative_path}/admin{authentication.route}">{authentication.name}</a>
<a href="{relative_path}/admin{plugins.route}">{plugins.name}</a>
</li>
<!-- END authentication -->
<!-- END plugins -->
</ul>
</section>
<!-- ENDIF authentication.length -->
<!-- ENDIF plugins.length -->
<!-- IF plugins.length -->
<!-- IF authentication.length -->
<section class="menu-section">
<h3 class="menu-section-title">[[admin/menu:section-plugins]]</h3>
<h3 class="menu-section-title">[[admin/menu:section-social-auth]]</h3>
<ul class="menu-section-list">
<!-- BEGIN plugins -->
<!-- BEGIN authentication -->
<li>
<a href="{relative_path}/admin{plugins.route}">{plugins.name}</a>
<a href="{relative_path}/admin{authentication.route}">{authentication.name}</a>
</li>
<!-- END plugins -->
<!-- END authentication -->
</ul>
</section>
<!-- ENDIF plugins.length -->
<!-- ENDIF authentication.length -->
<section class="menu-section">
<h3 class="menu-section-title">[[admin/menu:section-advanced]]</h3>
@ -236,27 +236,27 @@
<li><a href="{relative_path}/admin/extend/rewards">[[admin/menu:extend/rewards]]</a></li>
</ul>
</li>
<!-- IF authentication.length -->
<li class="dropdown menu-item">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">[[admin/menu:section-social-auth]]</a>
<ul class="dropdown-menu" role="menu">
<!-- BEGIN authentication -->
<li>
<a href="{relative_path}/admin{authentication.route}">{authentication.name}</a>
</li>
<!-- END authentication -->
</ul>
</li>
<!-- ENDIF authentication.length -->
<!-- IF plugins.length -->
<li class="dropdown menu-item">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">[[admin/menu:section-plugins]]</a>
<ul class="dropdown-menu" role="menu">
<li class="dropdown-header">[[admin/menu:section-plugins]]</li>
<!-- BEGIN plugins -->
<li>
<a href="{relative_path}/admin{plugins.route}">{plugins.name}</a>
</li>
<!-- END plugins -->
<!-- IF authentication.length -->
<li class="divider"></li>
{{{if authentication.length}}}
<li class="dropdown-header">[[admin/menu:section-social-auth]]</li>
{{{each authentication}}}
<li>
<a href="{relative_path}/admin{authentication.route}">{authentication.name}</a>
</li>
{{{end}}}
{{{end}}}
<li class="divider"></li>
<li data-link="1">
<a href="{relative_path}/admin/extend/plugins">[[admin/menu:extend/plugins.install]]</a>

Loading…
Cancel
Save