Commit 817df70a8d37040a6374561acf9832d935200acb
1 parent
3aa7898c
Exists in
master
and in
28 other branches
Correct `#user .logged-in` ids and icons
* The env admin link and the user pannel had the same controlpanel id. * The user icon is now recovered. * The #manage-enterprises icons was croped. Closes ActionItem2817
Showing
5 changed files
with
23 additions
and
7 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -930,7 +930,7 @@ module ApplicationHelper |
930 | 930 | (@category ? " - #{@category.full_name}" : '') |
931 | 931 | end |
932 | 932 | |
933 | - # DEPRECATED. Do not use this· | |
933 | + # DEPRECATED. Do not use this. | |
934 | 934 | def import_controller_stylesheets(options = {}) |
935 | 935 | stylesheet_import( "controller_"+ @controller.controller_name(), options ) |
936 | 936 | end |
... | ... | @@ -1129,11 +1129,11 @@ module ApplicationHelper |
1129 | 1129 | pending_tasks_count = link_to(count.to_s, @environment.top_url + '/myprofile/{login}/tasks', :id => 'pending-tasks-count', :title => _("Manage your pending tasks")) |
1130 | 1130 | end |
1131 | 1131 | |
1132 | - (_("<span class='welcome'>Welcome,</span> %s") % link_to('<i></i><strong>{login}</strong>', @environment.top_url + '/{login}', :id => "homepage-link", :title => _('Go to your homepage'))) + | |
1132 | + (_("<span class='welcome'>Welcome,</span> %s") % link_to('<i style="background-image:url({avatar})"></i><strong>{login}</strong>', @environment.top_url + '/{login}', :id => "homepage-link", :title => _('Go to your homepage'))) + | |
1133 | 1133 | render_environment_features(:usermenu) + |
1134 | - link_to('<i class="icon-menu-admin"></i><strong>' + _('Administration') + '</strong>', @environment.top_url + '/admin', :id => "controlpanel", :title => _("Configure the environment"), :class => 'admin-link', :style => 'display: none') + | |
1134 | + link_to('<i class="icon-menu-admin"></i><strong>' + _('Administration') + '</strong>', @environment.top_url + '/admin', :title => _("Configure the environment"), :class => 'admin-link', :style => 'display: none') + | |
1135 | 1135 | manage_enterprises.to_s + |
1136 | - link_to('<i class="icon-menu-ctrl-panel"></i><strong>' + _('Control panel') + '</strong>', @environment.top_url + '/myprofile/{login}', :id => "controlpanel", :title => _("Configure your personal account and content")) + | |
1136 | + link_to('<i class="icon-menu-ctrl-panel"></i><strong>' + _('Control panel') + '</strong>', @environment.top_url + '/myprofile/{login}', :class => 'ctrl-panel', :title => _("Configure your personal account and content")) + | |
1137 | 1137 | pending_tasks_count + |
1138 | 1138 | link_to('<i class="icon-menu-logout"></i><strong>' + _('Logout') + '</strong>', { :controller => 'account', :action => 'logout'} , :id => "logout", :title => _("Leave the system")) |
1139 | 1139 | end | ... | ... |
app/models/user.rb
... | ... | @@ -288,6 +288,7 @@ class User < ActiveRecord::Base |
288 | 288 | end |
289 | 289 | { |
290 | 290 | 'login' => self.login, |
291 | + 'avatar' => person.profile_custom_icon, | |
291 | 292 | 'is_admin' => self.person.is_admin?, |
292 | 293 | 'since_month' => self.person.created_at.month, |
293 | 294 | 'since_year' => self.person.created_at.year, | ... | ... |
public/designs/themes/base/style.css
... | ... | @@ -89,7 +89,7 @@ body, th, td, input { |
89 | 89 | color: #555753; |
90 | 90 | } |
91 | 91 | |
92 | -#controlpanel, #logout, #openchat, #manage-enterprises { | |
92 | +#user .logged-in > * { | |
93 | 93 | margin-left: 25px; |
94 | 94 | } |
95 | 95 | |
... | ... | @@ -105,6 +105,14 @@ body, th, td, input { |
105 | 105 | top: 3px; |
106 | 106 | } |
107 | 107 | |
108 | +#user #homepage-link i { | |
109 | + width: 18px; | |
110 | + height: 18px; | |
111 | + left: -20px; | |
112 | + top: -2px; | |
113 | + background-position: 50% 50%; | |
114 | +} | |
115 | + | |
108 | 116 | #user form { |
109 | 117 | position: relative; |
110 | 118 | display: inline; | ... | ... |
public/javascripts/application.js
... | ... | @@ -539,7 +539,11 @@ jQuery(function($) { |
539 | 539 | } |
540 | 540 | $(this).attr('href', new_href); |
541 | 541 | }); |
542 | - var html = $(this).html().replace(/{login}/g, data.login).replace('{month}', data.since_month).replace('{year}', data.since_year); | |
542 | + var html = $(this).html() | |
543 | + .replace(/{login}/g, data.login) | |
544 | + .replace('{avatar}', data.avatar) | |
545 | + .replace('{month}', data.since_month) | |
546 | + .replace('{year}', data.since_year); | |
543 | 547 | $(this).html(html).fadeIn(); |
544 | 548 | if (data.is_admin) { |
545 | 549 | $('#user .admin-link').show(); | ... | ... |
public/stylesheets/application.css
... | ... | @@ -868,7 +868,10 @@ code input { |
868 | 868 | } |
869 | 869 | #manage-enterprises .simplemenu-item a { |
870 | 870 | background-repeat: no-repeat; |
871 | - padding-left: 20px; | |
871 | + background-position: 5px 50%; | |
872 | + padding: 1px 0px 0px 26px; | |
873 | + line-height: 15px; | |
874 | + display: block; | |
872 | 875 | } |
873 | 876 | #manage-enterprises .simplemenu-item a span { |
874 | 877 | display: none; | ... | ... |