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> </ul>
</section> </section>
<!-- IF authentication.length --> <!-- IF plugins.length -->
<section class="menu-section"> <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"> <ul class="menu-section-list">
<!-- BEGIN authentication --> <!-- BEGIN plugins -->
<li> <li>
<a href="{relative_path}/admin{authentication.route}">{authentication.name}</a> <a href="{relative_path}/admin{plugins.route}">{plugins.name}</a>
</li> </li>
<!-- END authentication --> <!-- END plugins -->
</ul> </ul>
</section> </section>
<!-- ENDIF authentication.length --> <!-- ENDIF plugins.length -->
<!-- IF plugins.length --> <!-- IF authentication.length -->
<section class="menu-section"> <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"> <ul class="menu-section-list">
<!-- BEGIN plugins --> <!-- BEGIN authentication -->
<li> <li>
<a href="{relative_path}/admin{plugins.route}">{plugins.name}</a> <a href="{relative_path}/admin{authentication.route}">{authentication.name}</a>
</li> </li>
<!-- END plugins --> <!-- END authentication -->
</ul> </ul>
</section> </section>
<!-- ENDIF plugins.length --> <!-- ENDIF authentication.length -->
<section class="menu-section"> <section class="menu-section">
<h3 class="menu-section-title">[[admin/menu:section-advanced]]</h3> <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> <li><a href="{relative_path}/admin/extend/rewards">[[admin/menu:extend/rewards]]</a></li>
</ul> </ul>
</li> </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 --> <!-- IF plugins.length -->
<li class="dropdown menu-item"> <li class="dropdown menu-item">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">[[admin/menu:section-plugins]]</a> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">[[admin/menu:section-plugins]]</a>
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li class="dropdown-header">[[admin/menu:section-plugins]]</li>
<!-- BEGIN plugins --> <!-- BEGIN plugins -->
<li> <li>
<a href="{relative_path}/admin{plugins.route}">{plugins.name}</a> <a href="{relative_path}/admin{plugins.route}">{plugins.name}</a>
</li> </li>
<!-- END plugins --> <!-- 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 class="divider"></li>
<li data-link="1"> <li data-link="1">
<a href="{relative_path}/admin/extend/plugins">[[admin/menu:extend/plugins.install]]</a> <a href="{relative_path}/admin/extend/plugins">[[admin/menu:extend/plugins.install]]</a>

Loading…
Cancel
Save