/
index.haml
118 lines (110 loc) · 3.98 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
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
104
105
106
107
108
109
110
111
112
113
114
.row
.hero-unit
%h1 Trabaja Friends
%p
%br
%a.btn.btn-primary.btn-large{:href=>"http://www.dol.gov/summerjobs/Employers.htm"} Learn More
%p
%br
%span=@description
.row
.span6
-if @user
.user
.avatar
%img{:src => "http://graph.facebook.com/#{@user["id"]}/picture"}
.desc
%p.name=@user["name"]
%p.location=@user["location"]["name"]
%p.job=@user['job']
.clear
-if @friends and @friends.count > 0
%table.table.table-striped.table-bordered
%thead
%tr
%td{:colspan => 3}
%h3 For My Friends < 30
-@friends.each do |friend|
- job = friend['job'] || 'awesome job'
- url = "javascript:search_with_city('#{job}', '#{friend['current_location'] ? friend['current_location']['city'] :''}', '#{friend['current_location'] ? friend['current_location']['state'] : ''}');"
%tr
%td
%a.user{:href => url}
.avatar
%img{:src => friend["pic_square"]}
%td
.desc
%a.user{:href => url}
%p.name=friend['name']
%p.location=friend["location"]
%p.job=friend['job']
%td
%button.btn{:alt => "Recommend", :class=> "Recommend", :uid=>friend['uid']}
%i.icon-star-empty
-if @older_friends and @older_friends.count > 0
%table.table.table-striped.table-bordered
%thead
%tr
%td{:colspan => 3}
%h3 For My Friends > 30
-@older_friends.each do |friend|
- job = friend['job'] || 'awesome job'
- url = "javascript:search_with_city('#{job}', '#{friend['current_location'] ? friend['current_location']['city'] :''}', '#{friend['current_location'] ? friend['current_location']['state'] : ''}');"
%tr
%td
%a.user{:href => url}
.avatar
%img{:src => friend["pic_square"]}
%td
.desc
%a.user{:href => url}
%p.name=friend['name']
%p.location=friend["location"]
%p.job=friend['job']
%td
%button.btn{:alt => "Recommend", :class=> "Recommend", :uid=>friend['uid']}
%i.icon-star-empty
.span6.jobs
%form.well.form-horizontal{:action => "/search", :target => "jobs"}
%h3 Job Search
%fieldset
%label.control-label Keyword
.controls
%input.input-xlarge{:id=> "q_field", :name =>"q", :type => "text", :value => params['q']}
%fieldset
%label.control-label City
.controls
%input.input-xlarge{:id=> "city_field", :name=>"city", :type => "text", :value => params['city']}
%fieldset
%label.control-label State
.controls
%input.input-xlarge{:id => "state_field", :name=>"state", :type => "text", :value => params['state']}
%fieldset
%button.btn{:type=>"submit"}Find Summer Jobs
%iframe#jobs_frame{:src => @default_search, :name => "jobs"}
.row.employers
.span8.push4
%h3 For Employers
%ul
%li
%a{:href => "http://webapps.dol.gov/DOLEvents/Event/Register/17/Summer-Jobs-Commitment-Registration", :target => "_new"} Register
%li
%a{:href => "http://www.dol.gov/summerjobs/addingopportunities.htm"} Add Jobs
%li
%a{:href => "http://www.dol.gov/summerjobs/employerfaqs.htm"} Answers
%li
%a{:href => "http://www.dol.gov/summerjobs/partners.htm"} Who Else ?
%li
%a{:href => "http://www.dol.gov/summerjobs/pdf/Toolkit.pdf"} Learn...
:javascript
var app_id = '#{app_id}';
function search() {
$("#search_form").submit();
}
function search_with_city(term, city, state) {
$("#q_field").val(term);
$("#city_field").val(city);
$("#state_field").val(state);
$("#search_form").submit();
}
%script{:src=>"/js/my.js"}