Commit 6d178f39ba3a43b1703ad0ad89ebfabdc199ca50

Authored by AurelioAHeckert
1 parent 5c74595a

ActionItem152: melhorias na barra

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1189 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/helpers/application_helper.rb
... ... @@ -112,14 +112,21 @@ module ApplicationHelper
112 112 def shortcut_header_links
113 113 if logged_in?
114 114 [
115   - ( link_to_myprofile( content_tag('span', _('My profile')), {}, nil, { :id => 'link_go_home'} ) ),
  115 + ( link_to_homepage '<img src="' +
  116 + ( (current_user.person.image)? current_user.person.image.public_filename(:icon) : "/images/icons-bar/photo.png" ) +
  117 + '" alt="Photo" title="" height="20" border="0"/>'+ current_user.login,
  118 + current_user.login, :id=>"link_go_home" ),
  119 + ( link_to_myprofile( content_tag('span', _('edit profile')), {}, nil, { :id => 'link_edit_profile'} ) ),
116 120 # O ID icon_accessibility tambem tem que aparcer e testei o link nao ta funcionado.
117 121 ( link_to content_tag('span', _('Admin')), { :controller => 'admin_panel' }, :id => 'link_admin_panel' if current_user.person.is_admin?),
118 122 ( link_to content_tag('span', _('Logout')), { :controller => 'account', :action => 'logout'}, :id => 'link_logout'),
  123 + '<a href="javascript:alert(\'to do...\')" id="open_search"><span>Search</span></a>'
119 124 ]
120 125 else
121   - [
  126 + [
  127 + ( link_to _("%s's home") % @environment.name, { :controller=>"home" }, :id=>"link_to_envhome" ),
122 128 ( link_to content_tag('span', _('Login')), { :controller => 'account', :action => 'login' }, :id => 'link_login' ),
  129 + '<a href="javascript:alert(\'to do...\')" id="open_search"><span>Search</span></a>'
123 130 ]
124 131 end.join(" ")
125 132 end
... ...
app/views/layouts/application.rhtml
... ... @@ -24,6 +24,9 @@
24 24 </head>
25 25  
26 26 <body class='category<%= category_color %>'>
  27 + <script type="text/javascript">
  28 + if ( navigator.appName.indexOf("Microsoft") > -1 ) document.body.className += " msie";
  29 + </script>
27 30  
28 31 <% unless flash[:notice].nil? %>
29 32 <div id='notice' onclick="Element.hide('notice');">
... ... @@ -54,14 +57,8 @@
54 57 prepareMenu('navigation_bar', { timeout: 5 });
55 58 </script>
56 59  
57   - <!-- div id='search_box'>
58   - We will not need it...
59   - <%= search_box %>
60   - </div>< !-- id='search_box' -->
61   -
62 60 <div id='user_box'>
63 61 <%= shortcut_header_links %>
64   - <a href="javascript:alert('to do...')" id="open_search"><span>Search</span></a>
65 62 </div><!-- id='user_box' -->
66 63  
67 64 </div><!-- id="noosfero_bar" -->
... ...
app/views/shared/categories_menu.rhtml
1 1 <ul id='cat_menu'>
2   - <a href='/' id='link_to_home'><span><%= _("Go Home") %></span></a>
  2 + <%= link_to( "<span>"+ _("Go Home") +"</span>", {:controller=>"home"}, :id=>"menu_link_to_envhome", :title=>@environment.name) %>
3 3 <% @environment.display_categories.each do |item| %>
4 4 <li id='category<%= item.display_color %>'<%= ' class="active"' if (@category && (@category.top_ancestor == item)) %>>
5 5 <%= item.name %>
... ...
public/images/icons-bar/ico-edit.gif 0 → 100644

155 Bytes

public/images/icons-bar/ico-exit.gif 0 → 100644

126 Bytes

public/images/icons-bar/ico-fbes-fundo-azul.gif 0 → 100644

1.34 KB

public/images/icons-bar/ico-fbes-fundo-laranja.gif 0 → 100644

1.31 KB

public/images/icons-bar/ico-fbes-fundo-lilas.gif 0 → 100644

1.35 KB

public/images/icons-bar/ico-fbes-fundo-verde.gif 0 → 100644

1.32 KB

public/images/icons-bar/ico-fbes-fundo-vermelho.gif 0 → 100644

1.34 KB

public/images/icons-bar/photo.png 0 → 100644

781 Bytes

public/img-source/ico-fbes.xcf 0 → 100644
No preview for this file type
public/img-source/photo.svg 0 → 100644
... ... @@ -0,0 +1,157 @@
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<!-- Created with Inkscape (http://www.inkscape.org/) -->
  3 +<svg
  4 + xmlns:dc="http://purl.org/dc/elements/1.1/"
  5 + xmlns:cc="http://creativecommons.org/ns#"
  6 + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  7 + xmlns:svg="http://www.w3.org/2000/svg"
  8 + xmlns="http://www.w3.org/2000/svg"
  9 + xmlns:xlink="http://www.w3.org/1999/xlink"
  10 + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  11 + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  12 + width="20"
  13 + height="20"
  14 + id="svg2"
  15 + sodipodi:version="0.32"
  16 + inkscape:version="0.45+devel"
  17 + version="1.0"
  18 + sodipodi:docname="photo.svg"
  19 + inkscape:output_extension="org.inkscape.output.svg.inkscape"
  20 + inkscape:export-filename="/home/aurium/noosfero/public/img-source/photo.png"
  21 + inkscape:export-xdpi="90"
  22 + inkscape:export-ydpi="90">
  23 + <defs
  24 + id="defs4">
  25 + <linearGradient
  26 + inkscape:collect="always"
  27 + id="linearGradient2966">
  28 + <stop
  29 + style="stop-color:#729fcf;stop-opacity:1"
  30 + offset="0"
  31 + id="stop2968" />
  32 + <stop
  33 + style="stop-color:#3465a4;stop-opacity:1"
  34 + offset="1"
  35 + id="stop2970" />
  36 + </linearGradient>
  37 + <inkscape:perspective
  38 + sodipodi:type="inkscape:persp3d"
  39 + id="perspective10"
  40 + inkscape:vp_x="-50 : 600 : 1"
  41 + inkscape:vp_y="0 : 1000 : 0"
  42 + inkscape:vp_z="700 : 600 : 1"
  43 + inkscape:persp3d-origin="300 : 400 : 1" />
  44 + <inkscape:perspective
  45 + inkscape:persp3d-origin="300 : 400 : 1"
  46 + inkscape:vp_z="700 : 600 : 1"
  47 + inkscape:vp_y="0 : 1000 : 0"
  48 + inkscape:vp_x="-50 : 600 : 1"
  49 + id="perspective2372"
  50 + sodipodi:type="inkscape:persp3d" />
  51 + <linearGradient
  52 + inkscape:collect="always"
  53 + xlink:href="#linearGradient2966"
  54 + id="linearGradient2972"
  55 + x1="9.5"
  56 + y1="2.5"
  57 + x2="12.5"
  58 + y2="18"
  59 + gradientUnits="userSpaceOnUse" />
  60 + </defs>
  61 + <sodipodi:namedview
  62 + id="base"
  63 + pagecolor="#ffffff"
  64 + bordercolor="#666666"
  65 + borderopacity="1.0"
  66 + inkscape:pageopacity="0.0"
  67 + inkscape:pageshadow="2"
  68 + inkscape:zoom="23.1"
  69 + inkscape:cx="10"
  70 + inkscape:cy="10"
  71 + inkscape:document-units="px"
  72 + inkscape:current-layer="layer1"
  73 + showgrid="true"
  74 + objecttolerance="1"
  75 + gridtolerance="4"
  76 + guidetolerance="5"
  77 + inkscape:window-width="736"
  78 + inkscape:window-height="698"
  79 + inkscape:window-x="0"
  80 + inkscape:window-y="0">
  81 + <inkscape:grid
  82 + type="xygrid"
  83 + id="grid2363"
  84 + visible="true"
  85 + originx="0.5px"
  86 + originy="0.5px" />
  87 + <inkscape:grid
  88 + type="xygrid"
  89 + id="grid2976"
  90 + color="#ff0000"
  91 + opacity="0.1254902"
  92 + empcolor="#ff0000"
  93 + empopacity="0.25098039" />
  94 + </sodipodi:namedview>
  95 + <metadata
  96 + id="metadata7">
  97 + <rdf:RDF>
  98 + <cc:Work
  99 + rdf:about="">
  100 + <dc:format>image/svg+xml</dc:format>
  101 + <dc:type
  102 + rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  103 + <dc:title></dc:title>
  104 + <dc:date></dc:date>
  105 + <dc:creator>
  106 + <cc:Agent>
  107 + <dc:title></dc:title>
  108 + </cc:Agent>
  109 + </dc:creator>
  110 + <dc:rights>
  111 + <cc:Agent>
  112 + <dc:title></dc:title>
  113 + </cc:Agent>
  114 + </dc:rights>
  115 + <dc:publisher>
  116 + <cc:Agent>
  117 + <dc:title></dc:title>
  118 + </cc:Agent>
  119 + </dc:publisher>
  120 + <dc:identifier></dc:identifier>
  121 + <dc:source></dc:source>
  122 + <dc:relation></dc:relation>
  123 + <dc:language></dc:language>
  124 + <dc:subject>
  125 + <rdf:Bag />
  126 + </dc:subject>
  127 + <dc:coverage></dc:coverage>
  128 + <dc:description></dc:description>
  129 + <dc:contributor>
  130 + <cc:Agent>
  131 + <dc:title></dc:title>
  132 + </cc:Agent>
  133 + </dc:contributor>
  134 + <cc:license
  135 + rdf:resource="" />
  136 + </cc:Work>
  137 + </rdf:RDF>
  138 + </metadata>
  139 + <g
  140 + inkscape:label="Camada 1"
  141 + inkscape:groupmode="layer"
  142 + id="layer1">
  143 + <path
  144 + style="fill:url(#linearGradient2972);fill-opacity:1;fill-rule:evenodd;stroke:#204a87;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
  145 + d="M 10 0.5 C 7.5159999 0.5 5.5 2.5159999 5.5 5 C 5.5 6.4251669 6.1838689 7.6752988 7.21875 8.5 L 5.5 8.5 C 3.7530453 8.5 2.5 9.7530455 2.5 11.5 L 2.5 19.5 L 17.5 19.5 L 17.5 11.5 C 17.5 9.7530455 16.246955 8.5 14.5 8.5 L 12.78125 8.5 C 13.816131 7.6752988 14.5 6.4251669 14.5 5 C 14.5 2.5159999 12.484 0.49999999 10 0.5 z "
  146 + id="rect2378" />
  147 + <path
  148 + id="path2974"
  149 + d="M 10,1.5 C 8,1.5 6.5,3 6.5,5 C 6.5,6 7,7 8,8 C 8.5,8.5 8,9.5 7.5,9.5 L 5.5,9.5 C 4.5,9.5 3.5,10 3.5,11.5 L 3.5,18.5 L 16.5,18.5 L 16.5,11.5 C 16.5,10 15.5,9.5 14.5,9.5 L 12.5,9.5 C 12,9.5 11.5,8.5 12,8 C 13,7 13.5,6 13.5,5 C 13.5,3 12,1.5 10,1.5 z"
  150 + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.35294119;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
  151 + sodipodi:nodetypes="cssccccccccssc" />
  152 + <path
  153 + id="path2998"
  154 + d="M 10,0.5 C 7.516,0.5 5.5,2.5159999 5.5,5 C 5.5,6.4251669 6.183869,7.6752988 7.21875,8.5 L 5.5,8.5 C 3.753045,8.5 2.5,9.7530455 2.5,11.5 L 2.5,19.5 L 17.5,19.5 L 17.5,11.5 C 17.5,9.7530455 16.246955,8.5 14.5,8.5 L 12.78125,8.5 C 13.816131,7.6752988 14.5,6.4251669 14.5,5 C 14.5,2.5159999 12.484,0.49999999 10,0.5 z"
  155 + style="opacity:0.2;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
  156 + </g>
  157 +</svg>
... ...
public/stylesheets/menu.css
1 1 #accessibility_menu {
2 2 position: absolute;
  3 + top: -10px;
3 4 font-size: 1px;
  5 + text-decoration: none;
4 6 }
5 7  
6 8 #path_category {
... ... @@ -19,17 +21,26 @@
19 21 background-color: #3465A4;
20 22 }
21 23  
22   -#link_to_home {
  24 +#menu_link_to_envhome {
23 25 position: absolute;
24 26 top: 0px;
25 27 left: 0px;
26 28 display: block;
27   - width: 30px;
  29 + width: 35px;
28 30 height: 100%;
29   - background: url(/images/noosfero.png) 0px 50% no-repeat;
  31 + background: url(/images/icons-bar/ico-fbes-fundo-azul.gif) 0px 50% no-repeat;
30 32 text-align: center;
31 33 color: transparent;
32 34 font-size: 0px;
  35 + text-decoration: none;
  36 +}
  37 +body.category1 #menu_link_to_envhome { background-image: url(/images/icons-bar/ico-fbes-fundo-laranja.gif) }
  38 +body.category2 #menu_link_to_envhome { background-image: url(/images/icons-bar/ico-fbes-fundo-verde.gif) }
  39 +body.category3 #menu_link_to_envhome { background-image: url(/images/icons-bar/ico-fbes-fundo-lilas.gif) }
  40 +body.category4 #menu_link_to_envhome { background-image: url(/images/icons-bar/ico-fbes-fundo-vermelho.gif) }
  41 +#menu_link_to_envhome span {
  42 + position: relative;
  43 + left: -100px;
33 44 }
34 45  
35 46 body.category #noosfero_bar { background-color: #2A5896 }
... ... @@ -69,16 +80,49 @@ body.category4 #noosfero_bar { background-color: #B80000 }
69 80 font-size: 11px;
70 81 font-weight: bold;
71 82 text-decoration: none;
72   - line-height: 22px;
  83 + line-height: 20px;
73 84 color: #FFF;
74 85 margin-right: 10px;
75 86 opacity: 0.7;
  87 + display: block;
  88 + float: left;
  89 + height: 20px;
76 90 }
77 91 #user_box a:hover,
78 92 #user_box a:active {
79 93 opacity: 1;
80 94 }
81 95  
  96 +#user_box a#link_to_envhome {
  97 + margin-right: 50px;
  98 +}
  99 +
  100 +#link_go_home,
  101 +#link_go_home:hover {
  102 + position: relative;
  103 + padding: 0px;
  104 + margin: 0px;
  105 +}
  106 +#link_go_home img {
  107 + position: absolute;
  108 + top: -1px;
  109 + left: -23px;
  110 + border: none;
  111 +}
  112 +.msie #link_go_home img {
  113 + top: -1px;
  114 +}
  115 +
  116 +#link_edit_profile {
  117 + padding-left: 20px;
  118 + background: url(/images/icons-bar/ico-edit.gif) 0px 0% no-repeat;
  119 +}
  120 +
  121 +#link_logout {
  122 + padding-left: 20px;
  123 + background: url(/images/icons-bar/ico-exit.gif) 0px 0% no-repeat;
  124 +}
  125 +
82 126 #cat_menu {
83 127 padding: 0px;
84 128 margin: 0px;
... ... @@ -125,14 +169,6 @@ body.category4 #noosfero_bar { background-color: #B80000 }
125 169 margin: 0px;
126 170 }
127 171  
128   -/*
129   -#cat_menu ul li {
130   - padding: 0px;
131   - margin: 0px;
132   -}
133   -*/
134   -
135   -
136 172 #cat_menu ul a {
137 173 background: url(/images/bolota.gif) 0% 50% no-repeat;
138 174 padding-left: 15px;
... ...