Skip to content

Commit 559826b

Browse files
committed
Merge pull request OpenUserJS#928 from Martii/Issue-432splitNoticesUI
Split out notices in views Auto-merge
2 parents fc56f77 + cb7faae commit 559826b

File tree

2 files changed

+19
-34
lines changed

2 files changed

+19
-34
lines changed

views/includes/scriptPageHeader.html

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,7 @@ <h2 class="page-heading">
1515
<a href="{{{script.scriptInstallPageXUrl}}}.min.user.js" class="btn btn-{{#script.showMinficationNotices}}warning{{/script.showMinficationNotices}}{{^script.showMinficationNotices}}primary{{/script.showMinficationNotices}}" title="EXPERIMENTAL INSTALLATION FORKING"><i class="fa fa-fw fa-download"></i> Install {{#script.hasAlternateDownloadURL}}once {{/script.hasAlternateDownloadURL}} with minification</a>
1616
</div>
1717
{{#script.showMinficationNotices}}
18-
<div class="alert alert-warning" role="alert">
19-
{{#script.hasInvalidDownloadURL}}
20-
<p>
21-
<i class="fa fa-fw fa-exclamation"></i> Invalid download target
22-
</p>
23-
{{/script.hasInvalidDownloadURL}}
24-
{{#script.hasUnstableMinify}}
25-
<p>
26-
<i class="fa fa-fw fa-exclamation-triangle"></i> The script author suggests that minification of this script may be unstable.
27-
<p>
28-
{{/script.hasUnstableMinify}}
29-
{{#script.hasAlternateDownloadURL}}
30-
<p>
31-
<i class="fa fa-fw fa-exclamation-triangle"></i> Alternate download target.
32-
</p>
33-
{{/script.hasAlternateDownloadURL}}
34-
</div>
18+
{{> includes/scriptPageHeaderMinificationNotices.html }}
3519
{{/script.showMinficationNotices}}
3620
</li>
3721
<li role="separator" class="divider"></li>
@@ -55,23 +39,7 @@ <h2 class="page-heading">
5539
<a href="{{{script.scriptRawPageXUrl}}}" class="btn btn-{{#script.showMinficationNotices}}warning{{/script.showMinficationNotices}}{{^script.showMinficationNotices}}primary{{/script.showMinficationNotices}}" title="EXPERIMENTAL"><i class="fa fa-file-{{#script.isLib}}excel{{/script.isLib}}{{^script.isLib}}code{{/script.isLib}}-o"></i> Minified Source</a>
5640
</div>
5741
{{#script.showMinficationNotices}}
58-
<div class="alert alert-warning" role="alert">
59-
{{#script.hasInvalidDownloadURL}}
60-
<p>
61-
<i class="fa fa-fw fa-exclamation"></i> Invalid download target
62-
</p>
63-
{{/script.hasInvalidDownloadURL}}
64-
{{#script.hasUnstableMinify}}
65-
<p>
66-
<i class="fa fa-fw fa-exclamation-triangle"></i> The script author suggests that minification of this script may be unstable.
67-
<p>
68-
{{/script.hasUnstableMinify}}
69-
{{#script.hasAlternateDownloadURL}}
70-
<p>
71-
<i class="fa fa-fw fa-exclamation-triangle"></i> Alternate download target.
72-
</p>
73-
{{/script.hasAlternateDownloadURL}}
74-
</div>
42+
{{> includes/scriptPageHeaderMinificationNotices.html }}
7543
{{/script.showMinficationNotices}}
7644
</li>
7745
</ul>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div class="alert alert-warning" role="alert">
2+
{{#script.hasInvalidDownloadURL}}
3+
<p>
4+
<i class="fa fa-fw fa-exclamation"></i> Invalid download target
5+
</p>
6+
{{/script.hasInvalidDownloadURL}}
7+
{{#script.hasUnstableMinify}}
8+
<p{{^isScriptViewSourcePage}} title="{{script.meta.OpenUserJS.unstableMinify.0.value}}"{{/isScriptViewSourcePage}}>
9+
<i class="fa fa-fw fa-exclamation-triangle"></i> The script author suggests that minification of this script may be unstable.
10+
<p>
11+
{{/script.hasUnstableMinify}}
12+
{{#script.hasAlternateDownloadURL}}
13+
<p{{^isScriptViewSourcePage}} title="{{script.meta.UserScript.downloadURL.0.value}}"{{/isScriptViewSourcePage}}>
14+
<i class="fa fa-fw fa-exclamation-triangle"></i> Alternate download target.
15+
</p>
16+
{{/script.hasAlternateDownloadURL}}
17+
</div>

0 commit comments

Comments
 (0)