/
index.haml
executable file
·42 lines (40 loc) · 1.67 KB
/
index.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
.container-fluid
.row-fluid
.span8
%h1 Welcome to Milieu
%img{:src => 'images/big_map.png'}
%p Milieu is an open source ruby based MongoDB backed location check in app. It was first demonstrated at OSCON 2012 as a sample application for a tutorial on MongoDB.
%p It uses Sinatra, Haml and MongoDB.
.span4
.well
-if logged_in?
-if @suser.admin
%h4 How are people using Milieu?
%p Avg checkins per user: #{Analytics.avg_checkins_per_user}
%p Avg checkins per venue: #{Analytics.avg_checkins_per_venue}
-else
You are logged in. Go checkin somewhere.
-else
%h3 Login
%form{ :action => "/login", :method => "post"}
%br
%p Email Address:
%input.form-input{ :name => "email", :type => "text", :size => "20", :value => ""}
%p Password:
%input.form-input{ :name => "password", :type => "password", :size => "20", :value => ""}
%br
%br
%input.btn-large.btn-primary{ :name => "submit", :type => "submit", :value => "Submit"}
-if !logged_in?
.well
%h3 Join Us
%form{ :action => "/register", :method => "post"}
%p Name:
%input.form-input{ :name => "name", :type => "text", :size => "30"}
%p Email:
%input.form-input{ :name => "email", :type => "text", :size => "30"}
%p Password:
%input.form-input{ :name => "password", :type => "password", :size => "30"}
%br
%br
%input.btn{ :name => "submit", :type => "submit", :value => "Submit"}