-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathindex.html.erb
56 lines (46 loc) · 2.79 KB
/
index.html.erb
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
<%= render :partial => "sidebar/user" %>
<div class="col-md-9">
<% if params[:action] == 'answered' %>
<h2>Recently Answered <small class="hidden-sm">Recently answered questions</small></h2>
<% elsif params[:action] == 'popular' %>
<h2>Popular Questions <small class="hidden-sm">Most viewed questions</small></h2>
<% elsif params[:action] == 'unanswered' %>
<h2>Unanswered Questions <small class="hidden-sm">Unanswered questions</small></h2>
<% elsif params[:action] == 'liked' %>
<h2>Liked Questions <small class="hidden-sm">Most liked questions</small></h2>
<% else %>
<h2>Questions and Answers <small class="hidden-sm">Public Lab's growing knowledge base</small>
</h2>
<h4><small><%= t('questions.index.explanation') %></small></h4>
<% end %>
<p>New to Public Lab? <a href="/wiki/public-lab-q-and-a">Learn how this works »</a></p>
<hr />
<form id="questions_searchform" class="form-horizontal" role="search" autocomplete="off" action="/post">
<div class="form-group">
<div class="col-sm-10">
<input tabindex="1" id="questions_searchform_input" type="text" name="title" class="form-control search-query typeahead" qryType="questions" placeholder="Search or Ask a question">
</div>
<input type="hidden" name="tags" value="question:general">
<input type="hidden" name="template" value="question">
<input type="hidden" name="redirect" value="question">
<div class="col-sm-2 hidden-xs">
<button type="submit" rel="tooltip" title="Ask a question with the entered title" class="btn btn-primary btn-block btn-md">Ask</button>
</div>
</div>
</form>
<hr />
<%= render :partial => "notes/format_toggle" %>
<ul class="nav nav-tabs">
<li<% if params[:action] == "index" %> class="active"<% end %>><a href="/questions/"><i class="fa fa-refresh"></i><span class="hidden-sm"> Recently Asked</span></a></li>
<li<% if params[:action] == "answered" %> class="active"<% end %>><a href="/questions/answered/"><i class="fa fa-check"></i><span class="hidden-sm"> Recently Answered</span></a></li>
<li<% if params[:action] == "popular" %> class="active"<% end %>><a href="/questions/popular/"><i class="fa fa-bolt"></i><span class="hidden-sm"> Popular</span></a></li>
<li<% if params[:action] == "unanswered" %> class="active"<% end %>><a href="/questions/unanswered/"><i class="fa fa-question-circle"></i><span class="hidden-sm"> Unanswered</span></a></li>
<li<% if params[:action] == "liked" %> class="active"<% end %>>
<a href="/questions/liked/"><i class="fa fa-star-o"></i><span class="hidden-sm"> Liked</span></a>
</li>
</ul>
<%= render :partial => "questions/questions" %>
</div>
<%= stylesheet_link_tag "dashboard" %>
<%= javascript_include_tag "dashboard" %>
<%= javascript_include_tag "questions_search" %>