Project

General

Profile

« Previous | Next » 

Revision 7949aadb

Added by Marek Hulán almost 6 years ago

Fixes #23782 - restore login disabling

View differences:

app/registries/menu/loader.rb
def self.load
Manager.map :header_menu
Manager.map :side_menu do |menu|
menu.sub_menu :user_menu, :caption => N_('User'), :icon => 'fa fa-user' do
menu.item :my_account,
:caption => N_('My Account'),
:url_hash => {:controller => '/users', :action => 'edit', :id => Proc.new { User.current.id }}
menu.divider
menu.item :logout,
:caption => N_('Log Out'),
:html => {:method => :post},
:url_hash => {:controller => '/users', :action => 'logout'}
if SETTINGS[:login]
Manager.map :side_menu do |menu|
menu.sub_menu :user_menu, :caption => N_('User'), :icon => 'fa fa-user' do
menu.item :my_account,
:caption => N_('My Account'),
:url_hash => {:controller => '/users', :action => 'edit', :id => Proc.new { User.current.id }}
menu.divider
menu.item :logout,
:caption => N_('Log Out'),
:html => {:method => :post},
:url_hash => {:controller => '/users', :action => 'logout'}
end
end
end
Manager.map :admin_menu do |menu|
menu.sub_menu :administer_menu, :caption => N_('Administer'), :icon => 'fa fa-cog' do
menu.item :locations, :caption => N_('Locations') if SETTINGS[:locations_enabled]
app/views/settings/category/_email.html.erb
<%= link_to_function(_("Test email"), "tfm.users.testMail(this, '#{test_mail_user_url(User.current)}')",
:title => _("Send a test message to the current user's email address to confirm the configuration is working."), :id => "test_mail_button", :class =>"btn btn-success") + hidden_spinner('', :id => 'test_indicator').html_safe %>
<%= content_tag(:br) %>
<% if Setting[:login] %>
<%= link_to_function(_("Test email"), "tfm.users.testMail(this, '#{test_mail_user_url(User.current)}')",
:title => _("Send a test message to the current user's email address to confirm the configuration is working."), :id => "test_mail_button", :class =>"btn btn-success") + hidden_spinner('', :id => 'test_indicator').html_safe %>
<%= content_tag(:br) %>
<% end %>

Also available in: Unified diff