Skip to content

Commit

Permalink
icones :)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowBelmolve committed Apr 13, 2009
1 parent c4a552d commit 25e797a
Show file tree
Hide file tree
Showing 17 changed files with 242 additions and 152 deletions.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def sidebar(&block)
end

def link(name, path, *args)
return link_to "<li>#{name}</li>", path, *(args)
return "<li>" + link_to(name, path, *(args)) + "</li>"
end

end
6 changes: 3 additions & 3 deletions app/views/admin/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
.inner
%p{:class => :first}
= "Olá, #{current_user.name}."
= link_to pluralize(@messages, "mensagem", "mensagens"), "/inbox", :class => "icon mail"
= link_to pluralize(@messages, "mensagem", "mensagens"), "/inbox", :class => "icon imail"
#fragment-2
%h2 SIOOO
.inner
%p{:class => :first}
= "Olá, #{current_user.name}."
= link_to pluralize(@messages, "mensagem", "mensagens"), "/inbox", :class => "icon mail"
= link_to pluralize(@messages, "mensagem", "mensagens"), "/inbox", :class => "icon imail"
#fragment-3
%h2 STATS
.inner
Expand All @@ -40,6 +40,6 @@
.inner
%p{:class => :first}
= "Olá, #{current_user.name}."
= link_to pluralize(@messages, "mensagem", "mensagens"), "/inbox", :class => "icon mail"
= link_to pluralize(@messages, "mensagem", "mensagens"), "/inbox", :class => "icon imail"


7 changes: 2 additions & 5 deletions app/views/areas/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@
= will_paginate @areas


- content_for :sidebar do
.block
%h3 Menu
%ul.navigation
%li= link_to image_tag('../images/icons/add.png', :class=>'img')+' Novo Registro', new_area_path
- sidebar do
= link "Novo Registro", new_area_path, :class => 'icon iadd'
5 changes: 3 additions & 2 deletions app/views/articles/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
= will_paginate @articles
.clear

- content_for :sidebar do
= side_menu_for [{"#{image_tag('icons/add.png')} Novo Artigo" => new_article_path}, {"Anteriores" => "/"}]
- sidebar do
= link "Novo Artigo", new_article_path, :class => 'icon iadd'
= link "Anteriores", "/"
5 changes: 3 additions & 2 deletions app/views/families/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
= simple_table_for @families, :name, :people_count
= will_paginate @families

- content_for :sidebar do
= side_menu_for [{"#{image_tag('icons/add.png')} Novo Registro" => new_family_path}, {"Relatorio" => "/"}]
- sidebar do
= link "Novo Registro", new_family_path, :class => 'icon iadd'
= link "Relatorio", "/"
5 changes: 3 additions & 2 deletions app/views/groups/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
= simple_table_for @groups, :name, :official_name, :kind_text
= will_paginate @groups

- content_for :sidebar do
= side_menu_for [{"#{image_tag('icons/add.png')} Novo Registro" => new_group_path}, {"Relatorio" => "/"}]
- sidebar do
= link "Novo Registro", new_group_path, :class => 'icon iadd'
= link "Relatorio", "/"
4 changes: 2 additions & 2 deletions app/views/home/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
.inner
%p{:class => :first}
= "Olá, #{current_user.name}."
= link_to pluralize(@messages, "mensagem", "mensagens"), "/inbox", :class => "icon mail"
= link_to pluralize(@messages, "mensagem", "mensagens"), "/inbox", :class => "icon imail"
#fragment-2
%h2 SIOOO
.inner
%p{:class => :first}
= "Olá, #{current_user.name}."
= link_to pluralize(@messages, "mensagem", "mensagens"), "/inbox", :class => "icon mail"
= link_to pluralize(@messages, "mensagem", "mensagens"), "/inbox", :class => "icon imail"
2 changes: 1 addition & 1 deletion app/views/laws/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
= will_paginate @laws

- sidebar do
= link "#{image_tag('icons/add.png')} Nova Lei", new_law_path
= link "Nova Lei", new_law_path, :class => 'icon iadd'
= link "Anteriores", "/"
86 changes: 42 additions & 44 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<title>SIG@ { <%= controller.controller_name %> }</title>
<% #bundle :name => :base do %>
<%= stylesheet_link_tag 'application', "themes/#{cookies[:theme] || SIGA_THEME}/style", "themes/#{cookies[:theme] || SIGA_THEME}/ui.theme" %>
<%= stylesheet_link_tag 'application', "icons", "themes/#{cookies[:theme] || SIGA_THEME}/style", "themes/#{cookies[:theme] || SIGA_THEME}/ui.theme" %>
<%= javascript_include_tag 'jquery', 'xhr', 'cookie', 'application' %>
<% #end %>
<%= yield :head %>
</head>
<body>
Expand All @@ -32,70 +30,70 @@
<div id="user-drop-navigation">
<input id="search" name="search[query]" size="18" type="text" />
<%#= image_tag "icons/magnifier.png" %>
<%= submit_tag "Procura", :class => :searchbutton %>
<%= submit_tag "Buscar", :class => :searchbutton %>
</div>
<div id="main-navigation">
<ul>
<li class="first active" ><a href="/">Home</a>
<li class="first active" ><a href="/" class="ihome">Home</a>
<ul class='submenu2'>
<li>
<ul>
<li><strong>Opções do usuário:</strong></li>
<li><a href="#">Minha Conta</a></li>
<li><a href="#">Opcoes</a></li>
<li><a href="#">Mensagens</a></li>
<li><a href="#" class="ireport">Minha Conta</a></li>
<li><a href="#" class="iwrench">Opções</a></li>
<li><a href="#" class="imail">Mensagens</a></li>
<li><strong>Opções de administrador:</strong></li>
<li><a href="#">Novo usuário</a></li>
<li><a href="#">Remover usuário</a></li>
<li><a href="#">Bloquear usuário</a></li>
<li><a href="#" class="icard__plus">Novo usuário</a></li>
<li><a href="#" class="icard__minus">Remover usuário</a></li>
<li><a href="#" class="icard__exclamation">Bloquear usuário</a></li>
</ul>
</li>
<li>
<ul>
<li><strong>Atualizações:</strong></li>
<li><a href="#">Leis</a></li>
<li><a href="#">Famílias</a></li>
<li><a href="#">Propriedades</a></li>
<li><a href="#">Areas</a></li>
<li><a href="#">Zonas</a></li>
<li><a href="#" class="iaddress">Leis</a></li>
<li><a href="#" class="icard_address">Famílias</a></li>
<li><a href="#" class="icard_address">Propriedades</a></li>
<li><a href="#" class="icard_address">Areas</a></li>
<li><a href="#" class="icard_address">Zonas</a></li>
<li><strong>Relatórios:</strong></li>
<li><a href="#">Fiscal</a></li>
<li><a href="#">Sei la</a></li>
<li><a href="#" class="icard_address">Fiscal</a></li>
<li><a href="#" class="icard_address">Sei la</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="/publications">Publicacoes</a>
<li><a href="/publications" class="icard_address">Publicações</a>
<ul class='submenu'>
<li><a href="/articles">Artigos</a></li>
<li><a href="/procurements">Licitacoes</a></li>
<li><a href="/laws">Leis</a></li>
<li><a href="/publications">Editais</a></li>
<li><a href="/publications">Decretos</a></li>
<li><a href="/publications">Portarias</a></li>
<li><a href="/articles" class="icard_address">Artigos</a></li>
<li><a href="/procurements" class="icard_address">Licitações</a></li>
<li><a href="/laws" class="iaddress">Leis</a></li>
<li><a href="/publications" class="icard_address">Editais</a></li>
<li><a href="/publications" class="icard_address">Decretos</a></li>
<li><a href="/publications" class="icard_address">Portarias</a></li>
</ul>
</li>
<% if current_user %>
<li><a href="/people">Social</a>
<li><a href="/people" class="icard_address">Social</a>
<ul class='submenu'>
<li><a href="/people">Municipes</a></li>
<li><a href="/families">Familias</a></li>
<li><a href="/groups">Empresas</a></li>
<li><a href="/people" class="icard_address">Cidadãos</a></li>
<li><a href="/families" class="icard_address">Famílias</a></li>
<li><a href="/groups" class="icard_address">Empresas</a></li>
</ul>
</li>
<li><a href="/areas">Areas</a>
<li><a href="/areas" class="icard_address">Áreas</a>
<ul class='submenu'>
<li><a href="/areas">Areas</a></li>
<li><a href="/zones">Zonas</a></li>
<li><a href="/properties">Propriedades</a></li>
<li><a href="/areas" class="icard_address">Áreas</a></li>
<li><a href="/zones" class="icard_address">Zonas</a></li>
<li><a href="/properties" class="icard_address">Propriedades</a></li>
</ul>
</li>
<li><a href="/heritages">Patrimonio</a>
<li><a href="/heritages" class="icard_address">Patrimônio</a>
<ul class='submenu'>
<li><a href="/storages">Almoxarifado</a></li>
<li><a href="/areas">Areas</a></li>
<li><a href="/zones">Zonas</a></li>
<li><a href="/properties">Propriedades</a></li>
<li><a href="/storages" class="icard_address">Almoxarifado</a></li>
<li><a href="/areas" class="icard_address">Áreas</a></li>
<li><a href="/zones" class="icard_address">Zonas</a></li>
<li><a href="/properties" class="icard_address">Propriedades</a></li>
</ul>
</li>
<% end %>
Expand All @@ -114,12 +112,12 @@
<div class="block">
<h3>Menu Principal</h3>
<ul class="navigation">
<li><a href="#"> Editais </a></li>
<li><a href="#"> Cadastro Unico </a></li>
<li><a href="#"> Relatorio </a></li>
<li><a href="#"> Documentos </a></li>
<li><a href="#"> Contas </a></li>
<li><a href="#"> Saude </a></li>
<li><a href="#" class="icon iclipboard"> Editais </a></li>
<li><a href="#" class="icon icard_address"> Cadastro Unico </a></li>
<li><a href="#" class="icon ifolder_open_document"> Relatório </a></li>
<li><a href="#" class="icon idocuments"> Documentos </a></li>
<li><a href="#" class="icon icards"> Contas </a></li>
<li><a href="#" class="icon iheart"> Saúde </a></li>
</ul>
</div>
<% end %>
Expand Down
5 changes: 3 additions & 2 deletions app/views/people/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
= simple_table_for @people, :name, :sex_text, :marital_text, :profession_state_text
= will_paginate @people

- content_for :sidebar do
= side_menu_for [{"#{image_tag('icons/add.png')} Novo Registro" => new_person_path}, {"Relatorio" => "/"}]
- sidebar do
= link "Novo Registro", new_person_path, :class => 'icon iadd'
= link "Relatorio", "/"
7 changes: 2 additions & 5 deletions app/views/procurements/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
= will_paginate @procurements
.clear

- content_for :sidebar do
.block
%h3 Menu
%ul.navigation
%li= link_to image_tag('../images/icons/add.png', :class=>'img')+' Novo Registro', new_procurement_path
- sidebar do
= link "Novo Registro", new_procurement_path, :class => 'icon iadd'

7 changes: 2 additions & 5 deletions app/views/properties/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
= simple_table_for @properties, :name
= will_paginate @properties

- content_for :sidebar do
.block
%h3 Menu
%ul.navigation
%li= link_to image_tag('icons/add.png', :class=>'img')+' Novo Registro', new_property_path
- sidebar do
= link "Novo Registro", new_property_path, :class => 'icon iadd'

8 changes: 2 additions & 6 deletions app/views/publications/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,5 @@
= will_paginate @publications


- content_for :sidebar do
- if current_user
.block
%h3 Menu
%ul.navigation
%li= link_to image_tag('../images/icons/add.png', :class=>'img')+' Criar Edital', new_publication_path
- sidebar do
= link "Criar Edital", new_publication_path, :class => 'icon iadd'
6 changes: 3 additions & 3 deletions app/views/storages/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
= simple_table_for @storages, :amount, :unit, :value
= will_paginate @storages

- content_for :sidebar do
= side_menu_for [{"#{image_tag('icons/add.png')} Novo Registro" => new_storage_path}, {"Relatorio" => "/"}]

- sidebar do
= link "Novo Registro", new_storage_path, :class => 'icon iadd'
= link "Relatorio", "/"
76 changes: 29 additions & 47 deletions public/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ body { font-size: 12px; font-family: sans-serif;}

#sidebar ul.navigation li a:link, #sidebar ul.navigation li a:visited {
display: block;
padding: 10px 15px;
padding: 10px 15px 10px 20px;
background-position: 2px center;
background-repeat: no-repeat;
}

#wrapper { padding-top: 20px;}
Expand Down Expand Up @@ -256,51 +258,6 @@ form.formtastic li p.inline-errors {
form.formtastic li.error { background-color: #fdd; border: 1px solid #fbb; display:list-item; }


/*
* Icons
*
*
*/
div#container a.icon {
padding-left: 20px;
}
a.home { background: transparent url(../images/icons/home.png) no-repeat scroll left 3px; }
a.login { background: transparent url(../images/icons/key.png) no-repeat scroll left 3px;}
a.contact { background: transparent url(../images/icons/telephone.png) no-repeat scroll left 3px;}
a.add { background: transparent url(../images/icons/add.png) no-repeat scroll left 3px;}
a.accept { background: transparent url(../images/icons/accept.png) no-repeat scroll left 3px;}
a.delete { background: transparent url(../images/icons/delete.png) no-repeat scroll left 3px;}
a.edit { background: transparent url(../images/icons/edit.png) no-repeat scroll left 3px;}
a.back { background: transparent url(../images/icons/arrow/arrow_left.png) no-repeat scroll left 3px;}
a.show { background: transparent url(../images/icons/application_view_columns.png) no-repeat scroll left 3px;}
a.activate { background: transparent url(../images/icons/lock_unlock.png) no-repeat scroll left 3px;}
a.deactivate { background: transparent url(../images/icons/lock.png) no-repeat scroll left 3px;}
a.warn { background: transparent url(../images/icons/error.png) no-repeat scroll left 3px;}
a.table { background: transparent url(../images/icons/table.png) no-repeat scroll left 3px;}
a.maps { background: transparent url(../images/icons/maps.png) no-repeat scroll left 3px;}
a.feed { background: transparent url(../images/icons/feed.png) no-repeat scroll left 3px;}
a.address { background: transparent url(../images/icons/address.png) no-repeat scroll left 3px;}
a.help { background: transparent url(../images/icons/lifebuoy.png) no-repeat scroll left 3px;}
a.print { background: transparent url(../images/icons/doc/printer.png) no-repeat scroll left 3px;}
a.pdf { background: transparent url(../images/icons/doc/pdf.png) no-repeat scroll left 3px;}
a.xls { background: transparent url(../images/icons/doc/xls.png) no-repeat scroll left 3px;}
a.xml { background: transparent url(../images/icons/doc/xml.png) no-repeat scroll left 3px;}
a.csv { background: transparent url(../images/icons/doc/csv.png) no-repeat scroll left 3px;}
a.report { background: transparent url(../images/icons/doc/report.png) no-repeat scroll left 3px;}
a.info { background: transparent url(../images/icons/information.png) no-repeat scroll left 3px;}
a.asterisk { background: transparent url(../images/icons/asterisk.png) no-repeat scroll left 3px;}
a.pin { background: transparent url(../images/icons/map/pin.png) no-repeat scroll left 3px;}
a.funnel { background: transparent url(../images/icons/funnel.png) no-repeat scroll left 3px;}
a.arrow { background: transparent url(../images/icons/arrow/arrow.png) no-repeat scroll right 3px;}
a.macros { background: transparent url(../images/icons/letter.png) no-repeat scroll left 3px;}
a.mail { background: transparent url(../images/icons/letter.png) no-repeat scroll left 1px;}
a.mail_read { background: transparent url(../images/icons/letter_read.png) no-repeat scroll left 3px;}
a.lorry { background: transparent url(../images/icons/truck/lorry.png) no-repeat scroll left 1px;}
a.note { background: transparent url(../images/icons/note.png) no-repeat scroll left 3px;}
a.safe { background: transparent url(../images/icons/safe.png) no-repeat scroll left 3px;}
a.bank { background: transparent url(../images/icons/bank.png) no-repeat scroll left 3px;}
a.bell { background: transparent url(../images/icons/bell.png) no-repeat scroll left 4px;}

.ac_results {
padding: 0px;
border: 1px solid black;
Expand Down Expand Up @@ -348,4 +305,29 @@ a.bell { background: transparent url(../images/icons/bell.png) no-repeat
.ac_over {
background-color: #0A246A;
color: white;
}
}

#main-navigation ul li a {
padding: 7px 12px 7px 27px;
background-repeat: no-repeat;
background-position: 7px center;
}

/* Submenu */
ul.submenu, ul.submenu2 {
visibility : hidden;
position: absolute;
background-color: #e2e2e2 ;
padding: 10px 0;
border-right: 1px solid #d2d2d2;
border-left: 1px solid #b2b2b2;
border-bottom: 1px solid #a2a2a2;
z-index: 9999
}
div#main-navigation ul li ul.submenu li , ul.submenu2 li ul li { float: none }
ul.submenu li a, ul.submneu2 li ul li a { display: block; padding: 10px 10px 10px 20px; font-size: 12px}
ul.submenu li { width: 150px }
ul.submenu2 li { width: 164px }
ul.submenu2 li strong { display: block; padding: 15px 0 0 5px}
#main-navigation ul li.active ul li a { font-weight: normal }

Loading

0 comments on commit 25e797a

Please sign in to comment.