-
Notifications
You must be signed in to change notification settings - Fork 30
/
application.html.haml
104 lines (97 loc) · 4.04 KB
/
application.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
!!! Strict
%html{ "xml:lang" => "en", :lang => "en", :xmlns => "http://www.w3.org/1999/xhtml" }
%head
%meta{ :content => "text/html; charset=utf-8", "http-equiv" => "content-type" }/
%title
= 'mostfit' + (catch_content(:title) ? '' : ": #{catch_content(:title)}")
%link{ :rel => "icon", :type => "image/ico", :href => "/favicon.ico" }/
= css_include_tag :screen, :media => "screen, projection"
= css_include_tag :print, :media => "print"
~ "<!--[if IE]>\n <link rel='Stylesheet' href='/stylesheets/ie.css' type='text/css' media='screen, projection'>\n<![endif]-->"
= css_include_tag :style, :media => "screen, projection"
= js_include_tag :swfobject
%body
.spacer/
.container
#header
#subheader
#title
mostfit
#right-nav
- if session.authenticated?
== logged in as <b>#{session.user.login}</b> (#{link_to 'log out', url(:logout)})
- else
existing users can
%b= link_to 'login', url(:login)
to proceed
- if session.authenticated?
#navigation
- if session.user.id == 1
%b= link_to 'manage users', url(:users)
(admin only) |
%b= link_to 'reports', url(:reports)
|
%b= link_to 'browse loans', url(:branches)
|
%b= link_to 'browse funds', url(:funders)
|
%b= link_to 'staff members', url(:staff_members)
|
%b= link_to 'search', '#', :onclick => "javascript:document.getElementById('search_div').style.display='block';"
|
%b= link_to 'data entry', url(:data_entry)
#search_div{:style => 'margin: 2px; background:lightyellow;padding: 4px;'}
%form{:action => '/search'}
Search for
%select{:name => 'model'}
- ['Branch','Client','Center','Loan'].each do |model|
%option{:value => model}
= model
with
%select{:name => 'by'}
- ['Id','Name','Reference'].each do |by|
%option{:value => by}
= by
%input{:name => 'value'}
%a{:href => '#', :onclick => "document.getElementById('search_div').style.display='none';"}
Hide search
%br
%input{:type => 'submit', :value=>'search'}
#content
#breadcrums= breadcrums
- if message
#flash-messages.span-14.prefix-5.suffix-5.last
- message.each do |key, value|
.flash{ :class => key.to_s }
%p= value
= catch_content :for_layout
%p
%br/
%br/
#footer
== © 2009 Intellecap — This software is released under the #{link_to 'GNU Affero General Public License', 'http://www.gnu.org/licenses/agpl.html'}.
- if Merb::Config[:environment] == 'development'
%p
%a{ :name => "debug" }/
%a{:onclick => "document.getElementsByClassName('debug-info')[0].style.display = '';", :href => '#debug'}
debug info
.debug-info{:style => 'display: none'}
%code
- debug_info.each do |i|
%p
%a{:onclick => "document.getElementsByClassName('debug_#{i[:name]}')[0].style.display = '';", :href => "#debug_#{i[:name]}"}
= i[:code] + ' =>'
%br/
%span{:class => "debug_#{i[:name]}", :style => 'display: none'}
- if i[:obj].class == Hash
- i[:obj].each do |key, value|
= "#{key.inspect.to_s} => #{value.inspect.to_s}"
%br/
- elsif i[:obj].class == Array
- i[:obj].each do |n|
= n.inspect.to_s
%br/
- else
= i[:obj].inspect.to_s
%br/
%a{ :name => "debug_#{i[:name]}" }/