mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 23:46:21 +08:00
Merge pull request #230 from ZmagoD/zd_SCI_586
Adds new team button to team switch dropdown [fixes SCI-586]
This commit is contained in:
commit
f615b3da41
|
@ -83,7 +83,7 @@
|
||||||
function initGlobalSwitchForm() {
|
function initGlobalSwitchForm() {
|
||||||
var teamSwitch = $('#team-switch');
|
var teamSwitch = $('#team-switch');
|
||||||
teamSwitch
|
teamSwitch
|
||||||
.find('.dropdown-menu a')
|
.find('.dropdown-menu .change-team')
|
||||||
.on('click', function(){
|
.on('click', function(){
|
||||||
$('#user_current_organization_id')
|
$('#user_current_organization_id')
|
||||||
.val($(this).attr('data-id'));
|
.val($(this).attr('data-id'));
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- Global team switch -->
|
<!-- Global team switch -->
|
||||||
<% if current_user.organizations.length > 1 %>
|
<% if current_user.organizations.length > 0 %>
|
||||||
<li class="dropdown" id="team-switch">
|
<li class="dropdown" id="team-switch">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||||
<%= fa_icon 'users' %>
|
<%= fa_icon 'users' %>
|
||||||
|
@ -118,12 +118,20 @@
|
||||||
<% current_user.organizations.each do |org| %>
|
<% current_user.organizations.each do |org| %>
|
||||||
<% next unless org != current_organization %>
|
<% next unless org != current_organization %>
|
||||||
<li>
|
<li>
|
||||||
<a href="#" data-id="<%= org.id %>" class="text-center">
|
<a href="#"
|
||||||
|
data-id="<%= org.id %>"
|
||||||
|
class="text-center change-team">
|
||||||
<%= org.name %>
|
<%= org.name %>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<li>
|
||||||
|
<%= link_to new_organization_path do %>
|
||||||
|
<span class="glyphicon glyphicon-plus"></span>
|
||||||
|
<%= t('users.settings.organizations.index.new_organization') %>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in a new issue