|
1 |
| -<% if current_user %> |
2 |
| - <% content_for :title do %> |
3 |
| - <title>Points (ToS;DR Phoenix)</title> |
4 |
| - <% end %> |
| 1 | +<% content_for :title do %> |
| 2 | + <title>Points</title> |
| 3 | +<% end %> |
5 | 4 |
|
6 |
| - <div class="card-inline"> |
7 |
| - <div class="card-inline-item card-inline-service"> |
8 |
| - <div class="row"> |
9 |
| - <div class="col-lg-6"> |
10 |
| - <h1>Points</h1> |
11 |
| - </div> |
| 5 | +<% if current_user %> |
| 6 | + <div class="container"> |
| 7 | + <div class="panel panel-default"> |
| 8 | + <div class="panel-heading"> |
| 9 | + <small><mark>Points</mark> are <mark>easy-to-understand</mark> mini-conclusions, annotated via the text of a service's <mark>documents</mark>.</small> |
12 | 10 | </div>
|
13 |
| - <br> |
14 |
| - <br> |
15 |
| - <div class="row"> |
16 |
| - <div class="col-lg-4 text-left"> |
17 |
| - <div class=""> |
| 11 | + <div class="panel-body"> |
| 12 | + <span class="lighter"> |
| 13 | + <h3>Points |
| 14 | + <% if current_user&.admin || current_user&.curator %> |
| 15 | + <small> |
| 16 | + Can't find what you're looking for? |
| 17 | + <%= link_to 'Annotate', services_path %> |
| 18 | + a service |
| 19 | + </small> |
| 20 | + <% end %> |
| 21 | + </h3> |
| 22 | + </span> |
| 23 | + </div> |
| 24 | + </div> |
| 25 | + <div class="panel panel-default"> |
| 26 | + <div class="panel-body"> |
| 27 | + <br> |
| 28 | + <div class="row"> |
| 29 | + <form class="navbar-form navbar-left" role="search"> |
18 | 30 | <%= search_form_for @q do |f| %>
|
19 |
| - <%= f.label :service_name_cont %> |
20 |
| - <%= f.search_field :service_name_cont %> |
21 |
| - |
22 |
| - <%= f.submit %> |
| 31 | + <div> |
| 32 | + <%= f.label :service_name_cont, class: "small lighter" %> |
| 33 | + </div> |
| 34 | + <div class="form-group"> |
| 35 | + <%= f.search_field :service_name_cont, class: "form-control" %> |
| 36 | + </div> |
| 37 | + <%= f.submit class: "btn btn-default small" %> |
23 | 38 | <% end %>
|
24 |
| - </div> |
| 39 | + </form> |
25 | 40 | </div>
|
| 41 | + <% if @points.empty? %> |
| 42 | + <p>No points to display at this time</p> |
| 43 | + <% else %> |
| 44 | + <%= render "table_points", points: @points %> |
| 45 | + <% end %> |
| 46 | + <%= paginate @points %> |
26 | 47 | </div>
|
27 |
| - <br> |
28 |
| - <% if @points.empty? %> |
29 |
| - <p>There are no points to display at this time!</p> |
30 |
| - <% else %> |
31 |
| - <div class=""> |
32 |
| - <div class="table-responsive"> |
33 |
| - <table class="table table-striped"> |
34 |
| - <thead> |
35 |
| - <tr> |
36 |
| - <th scope="col">Service</th> |
37 |
| - <th scope="col">Title</th> |
38 |
| - <th scope="col">Rating</th> |
39 |
| - <th scope="col">Status</th> |
40 |
| - <th scope="col">Author</th> |
41 |
| - </tr> |
42 |
| - </thead> |
43 |
| - <tbody id="myTableBody"> |
44 |
| - <% @points.each do |point| %> |
45 |
| - <% if point.case&.classification == 'good' %> |
46 |
| - <% pointbox = "point-good" %> |
47 |
| - <% elsif point.case&.classification == 'neutral' %> |
48 |
| - <% pointbox = "point-neutral" %> |
49 |
| - <% elsif point.case&.classification == 'bad' %> |
50 |
| - <% pointbox = "point-bad" %> |
51 |
| - <% elsif point.case&.classification == 'blocker' %> |
52 |
| - <% pointbox = "point-blocker" %> |
53 |
| - <% end %> |
54 |
| - <tr class="toSort"> |
55 |
| - <td><%= point.service.name %></td> |
56 |
| - <td><%= link_to point.quote_text ? "\"" + point.quote_text + "\"" : point.title, point_path(point), title: "View more details" %></td> |
57 |
| - <td class="<%= pointbox %>"></td> |
58 |
| - <td> <%= status_badge point.status %> </td> |
59 |
| - <td><%= username point.user %> <%= rank_badge point.user %></td> |
60 |
| - </tr> |
61 |
| - <% end %> |
62 |
| - </tbody> |
63 |
| - </table> |
64 |
| - </div> |
65 |
| - </div> |
66 |
| - <% end %> |
67 | 48 | </div>
|
68 | 49 | </div>
|
69 |
| - <%= paginate @points %> |
70 | 50 | <% end %>
|
0 commit comments