-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpost.html.twig
More file actions
199 lines (170 loc) · 9.1 KB
/
post.html.twig
File metadata and controls
199 lines (170 loc) · 9.1 KB
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
{% extends '@forum/layout.html.twig' %}
{% block content %}
{{ fireHook('view.post.start') }}
<div class="linkst">
<div class="inbox">
<ul class="crumbs">
<li><a href="{{ urlBase }}">{{ trans('Index') }}</a></li>
<li>
<span>» </span>
<a href="{{ pathFor('Forum', {'id': cur_posting.id, 'name': url_forum}) }}">
{{ cur_posting.forum_name }}</a>
</li>
{% if inputPost('req_subject') %}
<li><span>» </span>{{ inputPost('req_subject') }}</li>
{% endif %}
{% if cur_posting[subject] is defined %}
<li><span>» </span><a href="{{ pathFor('Topic', {'id': tid, 'name': url_topic}) }}">
{{ cur_posting[subject] }}</a>
</li>
{% endif %}
<li><span>» </span><strong>{{ action }}</strong></li>
</ul>
</div>
</div>
{#// If there are errors, we display them#}
{% if errors is not empty %}
<div id="posterror" class="block">
<h2><span>{{ trans('Post errors') }}</span></h2>
<div class="box">
<div class="inbox error-info">
<p>{{ trans('Post errors info') }}</p>
<ul class="error-list">
{% for cur_error in errors %}
<li><strong>{{ cur_error }}</strong></li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% elseif inputPost('preview') %}
<div id="postpreview" class="blockpost">
<h2><span>{{ trans('Post preview') }}</span></h2>
<div class="box">
<div class="inbox">
<div class="postbody">
<div class="postright">
<div class="postmsg">
{{ preview_message|raw }}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
<div id="postform" class="blockform">
<h2><span>{{ action }}</span></h2>
<div class="box">
{{ form|raw }}
<div class="inform">
<fieldset>
<legend>{{ trans('Write message legend') }}</legend>
<div class="infldset txtarea">
<input type="hidden" name="form_sent" value="1" />
<input type="hidden" name="csrf_name" value="{{ csrf_name }}">
<input type="hidden" name="csrf_value" value="{{ csrf_value }}">
{% if userGet('is_guest') %}
{% set email_form_name = settings('p_force_guest_email') == '1' ? 'req_email' : 'email' %}
<label class="conl required">
<strong>{{ trans('Guest name') }} <span>{{ trans('Required') }}</span></strong><br />
<input type="text" name="req_username" value="{{ inputPost('req_username') ? post.username : '' }}" size="25" maxlength="25" tabindex="{{ cur_index }}" /><br />
{% set cur_index = cur_index + 1 %}
</label>
<label class="conl{{ settings('p_force_guest_email') == '1' ? ' required' : '' }}">
{{ settings('p_force_guest_email') == '1' ? "<strong>#{ trans('Email') } <span>#{ trans('Required') }</span></strong>" : trans('Email') }}
<br />
<input type="text" name="{{ email_form_name }}" value="{{ inputPost( email_form_name ) ? post.email : '' }}" size="50" maxlength="80" tabindex="{{ cur_index }}" /><br />
{% set cur_index = cur_index + 1 %}
</label>
<div class="clearer"></div>
{% endif %}
{% if fid %}
<label class="required">
<strong>{{ trans('Subject') }} <span>{{ trans('Required') }}</span></strong><br />
<input class="longinput" type="text" name="req_subject" value="{{ inputPost('req_subject') ? post.subject : '' }}" maxlength="70" tabindex="{{ cur_index }}" /><br />
</label>
{% set cur_index = cur_index + 1 %}
{% endif %}
<label class="required"><strong>{{ trans('Message') }} <span>{{ trans('Required') }}</span></strong><br />
<textarea name="req_message" id="req_message" rows="20" tabindex="{{ cur_index }}">{{ inputPost('req_message') ? inputPost('req_message')|raw : (quote is defined ? quote|raw : '') }}</textarea><br />
{% set cur_index = cur_index + 1 %}
</label>
<ul class="bblinks list-inline">
<li><a href="{{ pathFor('help') }}#bbcode" onclick="window.open(this.href); return false;">{{ trans('BBCode') }}ok</a> {{ settings('p_message_bbcode') == '1' ? trans('on') : trans('off') }}</li>
<li><a href="{{ pathFor('help') }}#url" onclick="window.open (this.href); return false;">{{ trans('url tag') }}</a> {{ settings('p_message_bbcode') == '1' and can('post.links') ? trans('on') : trans('off') }}</li>
<li><a href="{{ pathFor('help') }}#img" onclick="window.open(this.href); return false;">{{ trans('img tag') }}</a> {{ settings('p_message_bbcode') == '1' and settings('p_message_img_tag') == '1' ? trans('on') : trans('off') }}</li>
<li><a href="{{ pathFor('help') }}#smilies" onclick="window.open(this.href); return false;">{{ trans('Smilies') }}</a> {{ settings('o_smilies') == '1' ? trans('on') : trans('off') }}</li>
</ul>
</div>
</fieldset>
{% if checkboxes is defined %}
</div>
<div class="inform">
<fieldset>
<legend>{{ trans('Options') }}</legend>
<div class="infldset">
<div class="rbox">
{{ checkboxes|join("\n\t\t\t\t\t\t\t")|raw }}
</div>
</div>
</fieldset>
{% endif %}
</div>
{% if userGet('is_guest') %}
<div class="inform">
<fieldset>
<legend>{{ trans('Robot title') }}</legend>
<div class="infldset">
<p>{{ trans('Robot info') }}</p>
<label class="required"><strong>
{% set question = lang_antispam_questions|keys %}
{% set qencoded = getHash('md5', question[index_questions]) %}
{{ trans(['Robot question', question[index_questions]]) }}
<span>{{ trans('Required') }}</span></strong>
<br />
<input name="captcha" id="captcha" type="text" size="10" maxlength="30" />
<input name="captcha_q" value="{{ qencoded }}" type="hidden" /><br />
</label>
</div>
</fieldset>
</div>
{% endif %}
<p class="buttons">
<input type="submit" name="submit" value="{{ trans('Submit') }}" tabindex="{{ cur_index }}" accesskey="s" />
{% set cur_index = cur_index + 1 %}
<input type="submit" name="preview" value="{{ trans('Preview') }}" tabindex="{{ cur_index }}" accesskey="p" />
<a href="javascript:history.go(-1)">{{ trans('Go back') }}</a>
</p>
</form>
</div>
</div>
{% if tid and settings('o_topic_review') != '0' %}
<div id="postreview">
<h2><span>{{ trans('Topic review') }}</span></h2>
{% for post in post_data %}
<div class="blockpost">
<div class="box{{ loop.index % 2 == 0 ? ' roweven' : ' rowodd' }}">
<div class="inbox">
<div class="postbody">
<div class="postleft">
<dl>
<dt><strong>{{ post.poster }}</strong></dt>
<dd><span>{{ formatTime(post.posted) }}</span></dd>
</dl>
</div>
<div class="postright">
<div class="postmsg">
{{ post.message|raw }}
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{{ fireHook('view.post.end') }}
{% endblock content %}