This repository has been archived by the owner on Jan 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
title-summary-body.html
executable file
·210 lines (195 loc) · 10 KB
/
title-summary-body.html
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
{% extends "layout.html" %}
{% block page_title %}New news article{% endblock %}
{% block content %}
{% if referrer() == 'document-type' %}
{% set editing = false %}
{% else %}
{% set editing = true %}
{% endif %}
{% if data['format'] == 'Medical safety alert' %}
{% set prefix = 'drug-device-alerts' %}
{% elseif data['format'] == 'Drug safety update' %}
{% set prefix = 'drug-safety-update' %}
{% endif %}
{% set attachment_count = data['attachment-count'] | int %}
<a href="{% if editing %}/document-tasks{% else %}/document-type{% endif %}" class="govuk-c-back-link">Back</a>
<main role="main" class="govuk-o-main-wrapper">
<form action="/document-tasks" method="post" class="form" data-module="slug-from-title" data-prefix= "{{ prefix }}">
<div class="govuk-o-grid">
<div class="govuk-o-grid__item govuk-o-grid__item--two-thirds">
<h1 class="form-title govuk-heading-xl">
{% if editing and data['title'] %}
<span class="govuk-caption-xl">{{ data['format'] }}</span>
{{ data['title'] }}
{% else %}
{% if data['document-type'] %}
<span class="govuk-caption-xl">{{ data['format'] }}</span>
Create {{ data['document-type'] | lower }}
{% else %}
Create {{ data['format'] | lower }}
{% endif %}
{% endif %}
</h1>
{% if data['document-type'] == 'News story' %}
<h2 class="govuk-heading-m">Guidance for writing a {{ data['document-type'] | lower }}</h2>
<p class="govuk-body">
News written exclusively for GOV.UK which users need, can act on, and can’t get from other sources. News stories should be self-contained and can be removed from the site without affecting other content.
</p>
<details class="govuk-c-details">
<summary class="govuk-c-details__summary"><span class="govuk-c-details__summary-text">Keep reading</span></summary>
<div class="govuk-c-border govuk-c-border--left-narrow">
<ul class="recommendations">
<li>Don’t duplicate news published by another department - collaborate if needed.</li>
<li>Don’t publish guidance in new stories - it can go out of date and won’t be found by users.</li>
<li>Don’t publish news just to announce other GOV.UK content - it confuses users and search results.</li>
</ul>
<p class="govuk-body">Read the <a href="https://www.gov.uk/guidance/content-design/content-types#news-story">news story guidance</a> in full.</p>
</div>
</details>
{% endif %}
</div>
</div>
<div class="govuk-o-grid" data-module="live-content-check">
<div class="govuk-o-grid__item govuk-o-grid__item--two-thirds">
<div class="govuk-!-mb-r6 is-input">
<label class="govuk-c-label" for="title">
Title
</label>
<input required type="text" name="title" autocomplete="off" class="js-check-content govuk-c-input" id="title" data-target="title-checks" value="{% if editing %}{{data['title']}}{% endif %}">
<span class="govuk-c-label__hint govuk-body" style="margin-top: -25px">65 characters or fewer</span>
</div>
</div>
<div class="govuk-o-grid__item govuk-o-grid__item--one-third">
<div class="js-contextual-guidance contextual-guidance" style="display: none">
<div id="title-checks"></div>
<h3 class="govuk-heading-s govuk-!-mb-r1">Writing guidance</h3>
<ul class="govuk-list">
<li><a class="govuk-link" href="https://www.gov.uk/guidance/content-design/writing-for-gov-uk#plain-english">Using plain English</a></li>
<li><a class="govuk-link" href="https://www.gov.uk/guidance/style-guide">The style guide</a></li>
<li><a class="govuk-link" href="#">Words to avoid</a></li>
</ul>
</div>
</div>
</div>
<div class="govuk-o-grid js-slug">
<div class="govuk-o-grid__item govuk-o-grid__item--two-thirds">
<div class="govuk-!-mb-r6 panel panel-border-wide">
<h3 class="govuk-heading-s govuk-!-mb-r1 govuk-!-m-r0">The web address for this content will look like:</h3>
<span class="govuk-body empty">
You haven’t entered a title yet.
</span>
<span class="govuk-body js-slug-parent">
https://www.gov.uk/<span class="js-dynamic-slug">government/this-is-the-title</span>
</span>
</div>
</div>
</div>
<div class="govuk-o-grid" data-module="live-content-check">
<div class="govuk-o-grid__item govuk-o-grid__item--two-thirds">
<div class="govuk-!-mb-r6 is-textarea">
<label class="govuk-c-label" for="summary">
Summary
</label>
<textarea name="summary" class="govuk-c-textarea js-check-content" data-target="summary-checks" name="textarea" id="summary" rows="2">{% if editing %}{{data['summary']}}{% endif %}</textarea>
</div>
</div>
<div class="govuk-o-grid__item govuk-o-grid__item--one-third">
<div class="js-contextual-guidance contextual-guidance" style="display: none">
<div id="summary-checks"></div>
<h3 class="govuk-heading-s govuk-!-mb-r1">Writing guidance</h3>
<ul class="govuk-list">
<li><a class="govuk-link" href="https://www.gov.uk/guidance/content-design/writing-for-gov-uk#plain-english">Using plain English</a></li>
<li><a class="govuk-link" href="https://www.gov.uk/guidance/style-guide">The style guide</a></li>
<li><a class="govuk-link" href="#">Words to avoid</a></li>
</ul>
</div>
</div>
</div>
<div class="govuk-o-grid body-guidance" data-module="live-content-check">
<div class="govuk-o-grid__item govuk-o-grid__item--two-thirds">
<div class="govuk-!-mb-r6 is-textarea">
<label class="govuk-c-label" for="body" id="body-label">
Body
</label>
{% if attachment_count > 0 %}
<div class="inserts">
<a href="#" id="openModal">Insert attachment</a>
<a href="#" style="margin-left: 20px">Insert image</a>
</div>
{% endif %}
<textarea name="body" class="govuk-c-textarea js-check-content" data-target="body-checks" name="textarea" id="body" rows="40">{% if editing %}{{data['body']}}{% endif %}</textarea>
</div>
</div>
<div class="govuk-o-grid__item govuk-o-grid__item--one-third">
<div class="js-contextual-guidance contextual-guidance" style="display: none">
<div id="body-checks"></div>
<h3 class="govuk-heading-s govuk-!-mb-r1">Writing guidance</h3>
<ul class="govuk-list">
<li><a class="govuk-link" href="https://www.gov.uk/guidance/content-design/writing-for-gov-uk#plain-english">Using plain English</a></li>
<li><a class="govuk-link" href="https://www.gov.uk/guidance/style-guide">The style guide</a></li>
<li><a class="govuk-link" href="#">Words to avoid</a></li>
</ul>
<h2 class="govuk-heading-s govuk-!-mb-r1">Markdown guidance</h2>
<p class="govuk-body">For details, read the guide to using Markdown</p>
<ul class="govuk-list">
<li><a class="govuk-link" href="#">Headings</a></li>
<li><a class="govuk-link" href="#">Links</a></li>
<li><a class="govuk-link" href="#">Bullets</a></li>
</ul>
</div>
</div>
</div>
<div class="govuk-!-mb-r6">
<input type="submit" class="govuk-c-button" value="Save">
</div>
<!-- <input type="submit" class="button add-left-margin" formaction="?saved" value="Save and continue editing"> -->
{% if editing %}
<div class="govuk-!-mb-r6">
<a href="/document-tasks" class="button button-link">Discard changes</a>
</div>
{% endif %}
</form>
<dialog id="js-modal-dialog" class="modal-dialog dialog" role="dialog" aria-live="polite" aria-labelledby="dialog-title" aria-describedby="at-timer" data-module="attachment-insert">
<div class="modal-dialog__inner js-select-form">
<h1 id="dialog-title" class="heading-large govuk-!-mb-r6">
Insert attachment
</h1>
<div class="modal-dialog__inner__text">
<h2 class="govuk-heading-m">Select an attachment</h2>
{% include "includes/attachment-list.html" %}
<h2 class="govuk-heading-m">Or insert a new one</h2>
</div>
<div class="modal-dialog__inner__block">
<a href="/attachment" class="govuk-c-button dialog-button modal-dialog__inner__button js-upload-attachment">Add attachment</a>
<p class="govuk-body">
<a href="/" class="js-dialog-close">Cancel</a>
</p>
</div>
</div>
<div class="modal-dialog__inner js-upload-form" style="display: none">
<h1 id="dialog-title" class="heading-large govuk-!-mb-r6">
Upload an attachment
</h1>
<div class="modal-dialog__inner__text">
<div class="govuk-!-mb-r3 is-input">
<label class="govuk-c-label govuk-c-label--bold" for="attachment-title">
Attachment title
<span class="govuk-c-label__hint">Use the official title of the document</span>
</label>
<input required type="text" name="{{ attachment_id }}-attachment-title" class="js-check-content govuk-c-input" id="attachment-title" data-target="attachment-title-checks" value="{% if editing %}{{data[attachment_id + '-attachment-title']}}{% endif %}">
</div>
<label class="govuk-c-label govuk-c-label--bold" for="attachment-file">
File
</label>
<input type="file" name="attachment-file" class="govuk-c-file-upload">
</div>
<div class="modal-dialog__inner__block">
<a href="/attachment" class="govuk-c-button dialog-button modal-dialog__inner__button js-edge">Upload</a>
<p class="govuk-body">
<a href="/" class="js-upload-close">Cancel</a>
</p>
</div>
</div>
</dialog>
</main>
{% endblock %}