-
Notifications
You must be signed in to change notification settings - Fork 9
/
new.html.erb
68 lines (61 loc) · 3.17 KB
/
new.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
57
58
59
60
61
62
63
64
65
66
67
68
<%= content_for :page_title, "Anonymous Feedback" %>
<%= content_for :header, "Feedback" %>
<% breadcrumb :feedex %>
<div class="row">
<p class="lead col-md-8">
At the bottom of every page on GOV.UK we ask, “is there anything wrong with this page?”. Users can leave comments on what they were doing and what went wrong. Feedback is anonymous and we’ve not removed spam.
</p>
</div>
<div class="row">
<div class="col-md-8">
<h2 class="add-bottom-margin">By URL</h2>
<%= semantic_form_for @explore_by_url, url: { action: "create" }, html: {class: 'well'} do |f| %>
<%= f.input :url, label: "URL", required: true, input_html: { class: "input-md-7", :"aria-required" => true, type: "url"} %>
<p class="help-block add-bottom-margin">eg <code>/vat-rates</code> or <code>https://www.gov.uk/bank-holidays</code></p>
<%= f.action :submit, label: "Explore by URL", button_html: { class: "btn btn-success" } %>
<% end %>
</div>
<div class="col-md-8">
<h2>By organisation</h2>
<%= semantic_form_for @explore_by_organisation, url: { action: "create" }, html: {class: 'well'} do |f| %>
<%= f.input :organisation, label: "Organisation", required: true, collection: @organisations_list, :as => :select, :input_html => { :multiple => false, class: "input-md-7 select2", :"aria-required" => true, type: "organisation"} %>
<%= f.action :submit, label: "Explore by organisation", button_html: { class: "btn btn-success" } %>
<% end %>
</div>
<% if can? :request, :global_export_request %>
<div class="col-md-8 global-export-request">
<h2>Total quantity by day</h2>
<%= form_tag anonymous_feedback_global_export_requests_path, class: 'well formtastic' do %>
<div class="string input required form-group">
<span class="form-label">
<label for="from-date" class="control-label">Start date</label>
</span>
<span class="form-wrapper">
<input type="text" name="from_date" id="from-date" class="input-sm form-control add-right-margin" data-module="calendar" data-max-date="0" value="<%= params[:from_date]%>"/>
</span>
</div>
<div class="string input required form-group">
<span class="form-label">
<label for="to-date" class="control-label">End date</label>
</span>
<span class="form-wrapper">
<input type="text" name="to_date" id="to-date" class="form-control input-sm" data-module="calendar" data-max-date="0" value="<%= params[:to_date]%>"/>
</span>
</div>
<div class="form-group">
<%= check_box_tag 'exclude_spam', 1, true %>
<%= label_tag 'exclude_spam', 'Exclude requests marked as spam' %>
</div>
<input type="submit" value="Export as CSV" class="btn btn-success" />
<% end %>
</div>
<% end %>
<% if can? :request, :review_feedback %>
<div class="col-md-8">
<h2>Review Anonymous Feedback for Spam</h2>
<%= form_tag anonymous_feedback_problem_reports_path, method: :get, class: 'well formtastic' do %>
<input type="submit" value="Review Anonymous Feedback" class="btn btn-success" />
<% end %>
</div>
<% end %>
</div>