Skip to content

Commit 069db8f

Browse files
authored
Merge branch 'develop' into issuelib/add-sample-entries
2 parents e5979fd + f103ed9 commit 069db8f

File tree

5 files changed

+101
-4
lines changed

5 files changed

+101
-4
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Rename addon upload/parent nodes and add icons
1111
- Update associated evidence, notes and child nodes' updated_at columns on node merge
1212
- Warn on node merge that methodology will not be copied
13+
- Show don't gate: Word/Excel templates
1314
- Sidebar: Add resize functionality
1415
- Textile:
1516
- Add support for paragraph alignment

app/views/export/index.html.erb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,18 @@
2121
<% else %>
2222

2323
<ul id="plugin-chooser" class="tabs-container nav nav-tabs">
24-
<%= render_view_hooks 'export/index-tabs', feature: :export %>
25-
2624
<% if !defined?(Dradis::Pro) %>
27-
<li class="nav-item"><a href="javascript:void(0)" class="js-try-pro nav-link" data-term="word-reports" data-url="https://dradis.com/pro/pages/reporting.html"><i class="fa-solid fa-file-word fa-fw"></i>Word</a></li>
28-
<li class="nav-item"><a href="javascript:void(0)" class="js-try-pro nav-link" data-term="excel-reports" data-url="https://dradis.com/pro/pages/excel.html"><i class="fa-solid fa-file-excel fa-fw"></i>Excel</a></li>
25+
<%= render 'static_pages/export_tabs'%>
2926
<% end %>
27+
28+
<%= render_view_hooks 'export/index-tabs', feature: :export %>
3029
</ul>
3130
<div class="content-container">
3231
<div class="tab-content">
32+
<% if !defined?(Dradis::Pro) %>
33+
<%= render 'static_pages/export_content'%>
34+
<% end %>
35+
3336
<%= render_view_hooks 'export/index-content', feature: :export %>
3437
</div>
3538
</div>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<div id="plugin-word" class="tab-pane fade" role="tabpanel">
2+
<h4 class="header-underline">Choose a template</h4>
3+
<p>
4+
Templates are 100% customizable, based on your existing report format.
5+
</p>
6+
7+
<p>
8+
Keep multiple templates for different clients, teams, methodologies, or deliverable styles.
9+
</p>
10+
11+
<%= render partial: 'static_pages/export_templates',
12+
locals: {
13+
labels: ['dradis_welcome_template', 'dradis_owasp_template', 'dradis_template-hipaa'],
14+
exporter: 'word',
15+
extension: 'docx',
16+
url: 'https://dradis.com/pro/pages/reporting.html'
17+
}
18+
%>
19+
</div>
20+
21+
<div id="plugin-excel" class="tab-pane fade" role="tabpanel">
22+
<h4 class="header-underline">Choose a template</h4>
23+
<p>
24+
Create your own, or send us a sample and have our team create them for you.
25+
</p>
26+
<p>
27+
You can load as many templates as you need.
28+
</p>
29+
30+
<%= render partial: 'static_pages/export_templates',
31+
locals: {
32+
labels: ['dradis_template-excel-owasp', 'dradis_template-welcome'],
33+
exporter: 'excel',
34+
extension: 'xlsx',
35+
url: 'https://dradis.com/pro/pages/excel.html'
36+
}
37+
%>
38+
</div>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<li class="nav-item">
2+
<a href="#plugin-word" class="nav-link" data-bs-toggle="tab">
3+
<i class="fa-solid fa-file-word fa-fw"></i>Word
4+
</a>
5+
</li>
6+
<li class="nav-item">
7+
<a href="#plugin-excel" class="nav-link" data-bs-toggle="tab">
8+
<i class="fa-solid fa-file-excel fa-fw"></i>Excel
9+
</a>
10+
</li>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<% labels.each_with_index do |label, index| %>
2+
<div class="form-check">
3+
<input type="radio" name="<%= exporter %>" id="<%= label %>" class="form-check-input" <%= 'checked' if index == 0 %>>
4+
<label class="form-check-label" for="<%= label %>"><%= label %> -
5+
<small><%= label %>.<%= extension %></small>
6+
</label>
7+
</div>
8+
<% end %>
9+
10+
<div class="mt-4">
11+
<div class="btn-group btn-states" data-behavior="btn-states">
12+
<a
13+
href="javascript:void(0)"
14+
id="export-button"
15+
class="btn btn-lg btn-primary js-try-pro"
16+
data-term="<%= exporter %>-reports"
17+
data-url=<%= url %>>
18+
Export
19+
<span data-behavior="state-button"><%= @default_button_state.humanize %></span>
20+
Records
21+
</a>
22+
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
23+
<span class="visually-hidden">Toggle Dropdown</span>
24+
</button>
25+
<div class="dropdown-menu">
26+
<%= collection_radio_buttons(nil, :scope, [['published', 'published'], ['all', 'all']], :first, :first) do |b| %>
27+
<span>
28+
<%= b.label class: 'state', for: "#{exporter}_scope_#{b.value}" do %>
29+
<%= b.radio_button id: "#{exporter}_scope_#{b.value}", class: 'd-none', name: "#{exporter}-scope", data: { behavior: 'state-radio' }, checked: b.value == @default_button_state %>
30+
<i class="fa-solid fa-check fa-fw"></i>
31+
<div class="state-label">
32+
<p data-behavior="state-label"><%= b.text.humanize %></p>
33+
<% case b.value %>
34+
<% when 'published' %>
35+
<span>Only records that have been reviewed and published.</span>
36+
<% when 'all' %>
37+
<span>All records, regardless if they are draft, ready for review, or published.</span>
38+
<% end %>
39+
</div>
40+
<% end %>
41+
</span>
42+
<% end %>
43+
</div>
44+
</div>
45+
</div>

0 commit comments

Comments
 (0)