biovision-post 0.26.191013.0 → 0.28.191126.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,427 +8,439 @@
8
8
 
9
9
  <dl>
10
10
  <% if handler.allow?('chief_editor') %>
11
- <dt><%= t('activerecord.attributes.post.user') %></dt>
12
- <dd>
13
- <div>
14
- <%=
15
- radio_button_tag(
16
- :user_for_entity,
17
- current_user.id,
18
- entity.id.nil? || entity.user_id == current_user.id,
19
- id: "user_for_entity_#{current_user.id}"
20
- )
21
- %>
22
- <%= label_tag("user_for_entity_#{current_user.id}", current_user.profile_name) %>
23
- </div>
24
- <% EditorialMember.list_for_administration.each do |editorial_member| %>
25
- <% next if editorial_member.user_id == current_user.id %>
11
+ <div>
12
+ <dt><%= t('activerecord.attributes.post.user') %></dt>
13
+ <dd>
26
14
  <div>
27
- <% element_id = "user_for_entity_#{editorial_member.id}" %>
28
15
  <%=
29
16
  radio_button_tag(
30
17
  :user_for_entity,
31
- editorial_member.user_id,
32
- entity.user_id == editorial_member.user_id,
33
- id: element_id
18
+ current_user.id,
19
+ entity.id.nil? || entity.user_id == current_user.id,
20
+ id: "user_for_entity_#{current_user.id}"
34
21
  )
35
22
  %>
36
- <%= label_tag(element_id, editorial_member.profile_name) %>
23
+ <%= label_tag("user_for_entity_#{current_user.id}", current_user.profile_name) %>
37
24
  </div>
38
- <% end %>
39
- </dd>
25
+ <% EditorialMember.list_for_administration.each do |editorial_member| %>
26
+ <% next if editorial_member.user_id == current_user.id %>
27
+ <div>
28
+ <% element_id = "user_for_entity_#{editorial_member.id}" %>
29
+ <%=
30
+ radio_button_tag(
31
+ :user_for_entity,
32
+ editorial_member.user_id,
33
+ entity.user_id == editorial_member.user_id,
34
+ id: element_id
35
+ )
36
+ %>
37
+ <%= label_tag(element_id, editorial_member.profile_name) %>
38
+ </div>
39
+ <% end %>
40
+ </dd>
41
+ </div>
40
42
  <% end %>
41
43
 
42
44
  <% if languages.count > 1 %>
43
- <dt><%= f.label :language_id %></dt>
44
- <dd><%= f.select :language_id, languages_for_select(false) %></dd>
45
+ <div>
46
+ <dt><%= f.label :language_id %></dt>
47
+ <dd><%= f.select :language_id, languages_for_select(false) %></dd>
48
+ </div>
45
49
  <% end %>
46
50
 
47
51
  <% if PostLayout.any? %>
48
- <dt><%= f.label :post_layout_id %></dt>
49
- <dd><%= f.select :post_layout_id, post_layouts_for_select %></dd>
52
+ <div>
53
+ <dt><%= f.label :post_layout_id %></dt>
54
+ <dd><%= f.select :post_layout_id, post_layouts_for_select %></dd>
55
+ </div>
50
56
  <% end %>
51
57
 
52
- <dt><%= f.label :publication_time %></dt>
53
- <dd>
54
- <%=
55
- f.datetime_local_field(
56
- :publication_time,
57
- id: "#{model_name}_publication_time",
58
- required: true
59
- )
60
- %>
61
- </dd>
58
+ <div>
59
+ <dt><%= f.label :publication_time %></dt>
60
+ <dd>
61
+ <%=
62
+ f.datetime_local_field(
63
+ :publication_time,
64
+ id: "#{model_name}_publication_time",
65
+ required: true
66
+ )
67
+ %>
68
+ </dd>
69
+ </div>
62
70
 
63
- <dt><%= f.label :title %></dt>
64
- <dd>
65
- <%=
66
- f.text_field(
67
- :title,
68
- id: "#{model_name}_title",
69
- size: nil,
70
- maxlength: Post::TITLE_LIMIT,
71
- required: true,
72
- data: { transliterate: "#{model_name}_slug" }
73
- )
74
- %>
75
- <div class="guideline"><%= t('.guidelines.title') %></div>
76
- </dd>
71
+ <div>
72
+ <dt><%= f.label :title %></dt>
73
+ <dd>
74
+ <%=
75
+ f.text_field(
76
+ :title,
77
+ id: "#{model_name}_title",
78
+ size: nil,
79
+ maxlength: Post::TITLE_LIMIT,
80
+ required: true,
81
+ data: { transliterate: "#{model_name}_slug" }
82
+ )
83
+ %>
84
+ <div class="guideline"><%= t('.guidelines.title') %></div>
85
+ </dd>
86
+ </div>
77
87
 
78
- <dt><%= f.label :slug %></dt>
79
- <dd>
80
- <%=
81
- f.text_field(
82
- :slug,
83
- id: "#{model_name}_slug",
84
- size: nil,
85
- maxlength: Post::SLUG_LIMIT,
86
- required: true,
87
- pattern: Post::SLUG_PATTERN_HTML,
88
- title: t('.guidelines.slug')
89
- )
90
- %>
91
- <div class="guideline"><%= t('.guidelines.slug') %></div>
92
- </dd>
88
+ <div>
89
+ <dt><%= f.label :slug %></dt>
90
+ <dd>
91
+ <%=
92
+ f.text_field(
93
+ :slug,
94
+ id: "#{model_name}_slug",
95
+ size: nil,
96
+ maxlength: Post::SLUG_LIMIT,
97
+ required: true,
98
+ pattern: Post::SLUG_PATTERN_HTML,
99
+ title: t('.guidelines.slug')
100
+ )
101
+ %>
102
+ <div class="guideline"><%= t('.guidelines.slug') %></div>
103
+ </dd>
104
+ </div>
93
105
 
94
106
  <% categories = PostCategory.list_for_tree(entity.post_type_id) %>
95
107
  <% if categories.any? %>
96
- <dt><label><%= t('.categories') %></label></dt>
108
+ <div>
109
+ <dt><label><%= t('.categories') %></label></dt>
110
+ <dd>
111
+ <%=
112
+ render(
113
+ partial: 'posts/form/category_links',
114
+ locals: {
115
+ categories: categories,
116
+ collection: categories.select { |_, i| i[:parent_id].nil? },
117
+ entity: entity,
118
+ handler: handler
119
+ }
120
+ )
121
+ %>
122
+ </dd>
123
+ </div>
124
+ <% end %>
125
+
126
+ <div>
127
+ <dt><%= f.label :lead %></dt>
97
128
  <dd>
98
129
  <%=
99
- render(
100
- partial: 'posts/form/category_links',
101
- locals: {
102
- entity: entity,
103
- collection: categories.select { |_, i| i[:parent_id].nil? },
104
- categories: categories
130
+ f.text_area(
131
+ :lead,
132
+ id: "#{model_name}_lead",
133
+ cols: 80,
134
+ rows: 3,
135
+ maxlength: Post::LEAD_LIMIT,
136
+ class: 'auto-expand',
137
+ data: {
138
+ min_rows: 3,
139
+ max_rows: 10
105
140
  }
106
141
  )
107
142
  %>
143
+ <div class="guideline"><%= t('.guidelines.lead') %></div>
108
144
  </dd>
109
- <% end %>
110
-
111
- <dt><%= f.label :lead %></dt>
112
- <dd>
113
- <%=
114
- f.text_area(
115
- :lead,
116
- id: "#{model_name}_lead",
117
- cols: 80,
118
- rows: 3,
119
- maxlength: Post::LEAD_LIMIT,
120
- class: 'auto-expand',
121
- data: {
122
- min_rows: 3,
123
- max_rows: 10
124
- }
125
- )
126
- %>
127
- <div class="guideline"><%= t('.guidelines.lead') %></div>
128
- </dd>
145
+ </div>
129
146
 
130
- <dt><%= f.label :body %></dt>
131
- <dd>
132
- <div>
133
- <button type="button" class="js-wysiwyg-toggle" data-element="<%= model_name %>_body">WYSIWYG</button>
147
+ <div>
148
+ <dt><%= f.label :body %></dt>
149
+ <dd>
134
150
  <div>
135
- <%= f.check_box :avoid_parsing, id: "#{model_name}_avoid_parsing" %>
136
- <%= f.label :avoid_parsing %>
151
+ <button type="button" class="js-wysiwyg-toggle" data-element="<%= model_name %>_body">WYSIWYG</button>
152
+ <div>
153
+ <%= f.check_box :avoid_parsing, id: "#{model_name}_avoid_parsing" %>
154
+ <%= f.label :avoid_parsing %>
155
+ </div>
137
156
  </div>
138
- </div>
139
- <%=
140
- f.text_area(
141
- :body,
142
- id: "#{model_name}_body",
143
- cols: 20,
144
- rows: 25,
145
- required: true,
146
- data: {
147
- # wysiwyg: 1,
148
- upload_url: post_illustrations_path
149
- }
150
- )
151
- %>
152
- </dd>
153
-
154
- <dt><%= label_tag(:tags_string, t('.tags')) %></dt>
155
- <dd>
156
- <%=
157
- text_field_tag(:tags_string, entity.tags_string)
158
- %>
159
- </dd>
160
-
161
- <dt><%= f.label :time_required %></dt>
162
- <dd>
163
- <%=
164
- f.number_field(
165
- :time_required,
166
- id: "#{model_name}_time_required",
167
- size: nil,
168
- in: Post::TIME_RANGE
169
- )
170
- %>
171
- <div class="guideline"><%= t('.guidelines.time_required') %></div>
172
- </dd>
173
-
174
- <dt><%= f.label :author_name %></dt>
175
- <dd>
176
- <%=
177
- f.text_field(
178
- :author_name,
179
- id: "#{model_name}_author_name",
180
- size: nil,
181
- maxlength: Post::META_LIMIT
182
- )
183
- %>
184
- <div class="guideline"><%= t('.guidelines.author_name') %></div>
185
- </dd>
186
-
187
- <dt><%= f.label :author_title %></dt>
188
- <dd>
189
- <%=
190
- f.text_field(
191
- :author_title,
192
- id: "#{model_name}_author_title",
193
- size: nil,
194
- maxlength: Post::META_LIMIT
195
- )
196
- %>
197
- <div class="guideline"><%= t('.guidelines.author_title') %></div>
198
- </dd>
157
+ <%=
158
+ f.text_area(
159
+ :body,
160
+ id: "#{model_name}_body",
161
+ cols: 20,
162
+ rows: 25,
163
+ required: true,
164
+ data: {
165
+ # wysiwyg: 1,
166
+ upload_url: post_illustrations_path
167
+ }
168
+ )
169
+ %>
170
+ </dd>
171
+ </div>
199
172
 
200
- <dt><%= f.label :author_url %></dt>
201
- <dd>
202
- <%=
203
- f.url_field(
204
- :author_url,
205
- id: "#{model_name}_author_url",
206
- size: nil,
207
- maxlength: Post::META_LIMIT
208
- )
209
- %>
210
- <div class="guideline"><%= t('.guidelines.author_url') %></div>
211
- </dd>
173
+ <div>
174
+ <dt><%= label_tag(:tags_string, t('.tags')) %></dt>
175
+ <dd>
176
+ <%=
177
+ text_field_tag(:tags_string, entity.tags_string)
178
+ %>
179
+ </dd>
180
+ </div>
212
181
 
213
- <dt><%= f.label :image %></dt>
214
- <dd>
215
- <% figure_id = "#{model_name}-image" %>
216
- <figure role="group" class="preview" id="<%= figure_id %>">
217
- <% if entity.image.blank? %>
218
- <%= f.label :image, image_tag('biovision/base/placeholders/3x2.svg') %>
219
- <% else %>
220
- <%= f.label :image, image_tag(entity.image.big.url) %>
221
- <% end %>
222
- <figcaption>
223
- <%=
224
- f.file_field(
225
- :image,
226
- id: "#{model_name}_image",
227
- accept: 'image/jpeg,image/png',
228
- data: { image: figure_id }
229
- )
230
- %>
231
- </figcaption>
232
- </figure>
233
- <div class="guideline"><%= t('.guidelines.image') %></div>
234
- </dd>
182
+ <div>
183
+ <dt><%= f.label :time_required %></dt>
184
+ <dd>
185
+ <%=
186
+ f.number_field(
187
+ :time_required,
188
+ id: "#{model_name}_time_required",
189
+ size: nil,
190
+ in: Post::TIME_RANGE
191
+ )
192
+ %>
193
+ <div class="guideline"><%= t('.guidelines.time_required') %></div>
194
+ </dd>
195
+ </div>
235
196
 
236
- <dt><%= f.label :image_alt_text %></dt>
237
- <dd>
238
- <%=
239
- f.text_field(
240
- :image_alt_text,
241
- id: "#{model_name}_image_alt_text",
242
- size: nil,
243
- maxlength: Post::META_LIMIT
244
- )
245
- %>
246
- <div class="guideline"><%= t('.guidelines.image_alt_text') %></div>
247
- </dd>
197
+ <div>
198
+ <dt><%= f.label :author_name %></dt>
199
+ <dd>
200
+ <%=
201
+ f.text_field(
202
+ :author_name,
203
+ id: "#{model_name}_author_name",
204
+ size: nil,
205
+ maxlength: Post::META_LIMIT
206
+ )
207
+ %>
208
+ <div class="guideline"><%= t('.guidelines.author_name') %></div>
209
+ </dd>
210
+ </div>
248
211
 
249
- <dt><%= f.label :image_name %></dt>
250
- <dd>
251
- <%=
252
- f.text_field(
253
- :image_name,
254
- id: "#{model_name}_image_name",
255
- size: nil,
256
- maxlength: Post::IMAGE_NAME_LIMIT
257
- )
258
- %>
259
- <div class="guideline"><%= t('.guidelines.image_name') %></div>
260
- </dd>
212
+ <div>
213
+ <dt><%= f.label :author_title %></dt>
214
+ <dd>
215
+ <%=
216
+ f.text_field(
217
+ :author_title,
218
+ id: "#{model_name}_author_title",
219
+ size: nil,
220
+ maxlength: Post::META_LIMIT
221
+ )
222
+ %>
223
+ <div class="guideline"><%= t('.guidelines.author_title') %></div>
224
+ </dd>
225
+ </div>
261
226
 
262
- <dt><%= f.label :image_source_name %></dt>
263
- <dd>
264
- <%=
265
- f.text_field(
266
- :image_source_name,
267
- id: "#{model_name}_image_source_name",
268
- size: nil,
269
- maxlength: Post::META_LIMIT
270
- )
271
- %>
272
- <div class="guideline"><%= t('.guidelines.image_source_name') %></div>
273
- </dd>
227
+ <div>
228
+ <dt><%= f.label :author_url %></dt>
229
+ <dd>
230
+ <%=
231
+ f.url_field(
232
+ :author_url,
233
+ id: "#{model_name}_author_url",
234
+ size: nil,
235
+ maxlength: Post::META_LIMIT
236
+ )
237
+ %>
238
+ <div class="guideline"><%= t('.guidelines.author_url') %></div>
239
+ </dd>
240
+ </div>
274
241
 
275
- <dt><%= f.label :image_source_link %></dt>
276
- <dd>
277
- <%=
278
- f.url_field(
279
- :image_source_link,
280
- id: "#{model_name}_image_source_link",
281
- size: nil,
282
- maxlength: Post::META_LIMIT,
283
- placeholder: t('.placeholders.image_source_link')
284
- )
285
- %>
286
- <div class="guideline"><%= t('.guidelines.image_source_link') %></div>
287
- </dd>
242
+ <div>
243
+ <dt><%= f.label :image %></dt>
244
+ <dd>
245
+ <% figure_id = "#{model_name}-image" %>
246
+ <figure role="group" class="preview" id="<%= figure_id %>">
247
+ <% if entity.image.blank? %>
248
+ <%= f.label :image, image_tag('biovision/base/placeholders/3x2.svg') %>
249
+ <% else %>
250
+ <%= f.label :image, image_tag(entity.image.big.url) %>
251
+ <% end %>
252
+ <figcaption>
253
+ <%=
254
+ f.file_field(
255
+ :image,
256
+ id: "#{model_name}_image",
257
+ accept: 'image/jpeg,image/png',
258
+ data: { image: figure_id }
259
+ )
260
+ %>
261
+ </figcaption>
262
+ </figure>
263
+ <div class="guideline"><%= t('.guidelines.image') %></div>
264
+ </dd>
265
+ </div>
288
266
 
289
- <dt><%= f.label :source_name %></dt>
290
- <dd>
291
- <%=
292
- f.text_field(
293
- :source_name,
294
- id: "#{model_name}_source_name",
295
- size: nil,
296
- maxlength: Post::META_LIMIT
297
- )
298
- %>
299
- <div class="guideline"><%= t('.guidelines.source') %></div>
300
- </dd>
267
+ <div>
268
+ <dt><%= f.label :image_alt_text %></dt>
269
+ <dd>
270
+ <%=
271
+ f.text_field(
272
+ :image_alt_text,
273
+ id: "#{model_name}_image_alt_text",
274
+ size: nil,
275
+ maxlength: Post::META_LIMIT
276
+ )
277
+ %>
278
+ <div class="guideline"><%= t('.guidelines.image_alt_text') %></div>
279
+ </dd>
280
+ </div>
301
281
 
302
- <dt><%= f.label :original_title %></dt>
303
- <dd>
304
- <%=
305
- f.text_field(
306
- :original_title,
307
- id: "#{model_name}_original_title",
308
- size: nil,
309
- maxlength: Post::META_LIMIT
310
- )
311
- %>
312
- <div class="guideline"><%= t('.guidelines.original_title') %></div>
313
- </dd>
282
+ <div>
283
+ <dt><%= f.label :image_name %></dt>
284
+ <dd>
285
+ <%=
286
+ f.text_field(
287
+ :image_name,
288
+ id: "#{model_name}_image_name",
289
+ size: nil,
290
+ maxlength: Post::IMAGE_NAME_LIMIT
291
+ )
292
+ %>
293
+ <div class="guideline"><%= t('.guidelines.image_name') %></div>
294
+ </dd>
295
+ </div>
314
296
 
315
- <dt><%= f.label :source_link %></dt>
316
- <dd>
317
- <%=
318
- f.url_field(
319
- :source_link,
320
- id: "#{model_name}_source_link",
321
- size: nil,
322
- maxlength: Post::META_LIMIT,
323
- placeholder: t('.placeholders.source_link')
324
- )
325
- %>
326
- <div class="guideline"><%= t('.guidelines.source_link') %></div>
327
- </dd>
297
+ <div>
298
+ <dt><%= f.label :image_source_name %></dt>
299
+ <dd>
300
+ <%=
301
+ f.text_field(
302
+ :image_source_name,
303
+ id: "#{model_name}_image_source_name",
304
+ size: nil,
305
+ maxlength: Post::META_LIMIT
306
+ )
307
+ %>
308
+ <div class="guideline"><%= t('.guidelines.image_source_name') %></div>
309
+ </dd>
310
+ </div>
328
311
 
329
- <dt><%= f.label :meta_title %></dt>
330
- <dd>
331
- <%=
332
- f.text_field(
333
- :meta_title,
334
- id: "#{model_name}_meta_title",
335
- size: nil,
336
- maxlength: Post::META_LIMIT
337
- )
338
- %>
339
- <div class="guideline"><%= t('.guidelines.meta_title') %></div>
340
- </dd>
312
+ <div>
313
+ <dt><%= f.label :image_source_link %></dt>
314
+ <dd>
315
+ <%=
316
+ f.url_field(
317
+ :image_source_link,
318
+ id: "#{model_name}_image_source_link",
319
+ size: nil,
320
+ maxlength: Post::META_LIMIT,
321
+ placeholder: t('.placeholders.image_source_link')
322
+ )
323
+ %>
324
+ <div class="guideline"><%= t('.guidelines.image_source_link') %></div>
325
+ </dd>
326
+ </div>
341
327
 
342
- <dt><%= f.label :meta_description %></dt>
343
- <dd>
344
- <%=
345
- f.text_field(
346
- :meta_description,
347
- id: "#{model_name}_meta_description",
348
- size: nil,
349
- maxlength: Post::META_LIMIT
350
- )
351
- %>
352
- <div class="guideline"><%= t('.guidelines.meta_description') %></div>
353
- </dd>
328
+ <div>
329
+ <dt><%= f.label :source_name %></dt>
330
+ <dd>
331
+ <%=
332
+ f.text_field(
333
+ :source_name,
334
+ id: "#{model_name}_source_name",
335
+ size: nil,
336
+ maxlength: Post::META_LIMIT
337
+ )
338
+ %>
339
+ <div class="guideline"><%= t('.guidelines.source') %></div>
340
+ </dd>
341
+ </div>
354
342
 
355
- <dt><%= f.label :meta_keywords %></dt>
356
- <dd>
357
- <%=
358
- f.text_field(
359
- :meta_keywords,
360
- id: "#{model_name}_meta_keywords",
361
- size: nil,
362
- maxlength: Post::META_LIMIT
363
- )
364
- %>
365
- <div class="guideline"><%= t('.guidelines.meta_keywords') %></div>
366
- </dd>
343
+ <div>
344
+ <dt><%= f.label :original_title %></dt>
345
+ <dd>
346
+ <%=
347
+ f.text_field(
348
+ :original_title,
349
+ id: "#{model_name}_original_title",
350
+ size: nil,
351
+ maxlength: Post::META_LIMIT
352
+ )
353
+ %>
354
+ <div class="guideline"><%= t('.guidelines.original_title') %></div>
355
+ </dd>
356
+ </div>
367
357
 
368
- <% if handler.allow?('chief_editor', 'deputy_chief_editor') %>
369
- <dt><%= f.label :rating %></dt>
358
+ <div>
359
+ <dt><%= f.label :source_link %></dt>
370
360
  <dd>
371
361
  <%=
372
- f.number_field(
373
- :rating,
374
- id: "#{model_name}_rating",
375
- step: 0.0000001,
376
- size: 5
362
+ f.url_field(
363
+ :source_link,
364
+ id: "#{model_name}_source_link",
365
+ size: nil,
366
+ maxlength: Post::META_LIMIT,
367
+ placeholder: t('.placeholders.source_link')
377
368
  )
378
369
  %>
370
+ <div class="guideline"><%= t('.guidelines.source_link') %></div>
379
371
  </dd>
372
+ </div>
373
+
374
+ <%= render partial: 'shared/forms/meta_texts', locals: { f: f } %>
375
+
376
+ <% if handler.allow?('chief_editor', 'deputy_chief_editor') %>
377
+ <div>
378
+ <dt><%= f.label :rating %></dt>
379
+ <dd>
380
+ <%=
381
+ f.number_field(
382
+ :rating,
383
+ id: "#{model_name}_rating",
384
+ step: 0.0000001,
385
+ size: 5
386
+ )
387
+ %>
388
+ </dd>
389
+ </div>
380
390
  <% end %>
381
391
 
382
- <dt><%= t(:flags) %></dt>
383
- <dd>
384
- <ul class="flags">
385
- <% if entity.id.nil? && handler.allow?('chief_editor', 'deputy_chief_editor') %>
392
+ <div>
393
+ <dt><%= t(:flags) %></dt>
394
+ <dd>
395
+ <ul class="flags">
396
+ <% if entity.id.nil? && handler.allow?('chief_editor', 'deputy_chief_editor') %>
397
+ <li>
398
+ <%= check_box_tag :featured, '1' %>
399
+ <%= label_tag :featured, t('activerecord.models.featured_post') %>
400
+ </li>
401
+ <% end %>
386
402
  <li>
387
- <%= check_box_tag :featured, '1' %>
388
- <%= label_tag :featured, t('activerecord.models.featured_post') %>
403
+ <%= f.check_box :visible, id: "#{model_name}_visible" %>
404
+ <%= f.label :visible %>
405
+ </li>
406
+ <li>
407
+ <%= f.check_box :explicit, id: "#{model_name}_explicit" %>
408
+ <%= f.label :explicit %>
389
409
  </li>
390
- <% end %>
391
- <li>
392
- <%= f.check_box :visible, id: "#{model_name}_visible" %>
393
- <%= f.label :visible %>
394
- </li>
395
- <li>
396
- <%= f.check_box :explicit, id: "#{model_name}_explicit" %>
397
- <%= f.label :explicit %>
398
- </li>
399
- <li>
400
- <%= f.check_box :show_owner, id: "#{model_name}_show_owner" %>
401
- <%= f.label :show_owner %>
402
- </li>
403
- <li>
404
- <%= f.check_box :translation, id: "#{model_name}_translation" %>
405
- <%= f.label :translation %>
406
- <div>
407
- <%= f.label :translator_name %><br/>
408
- <%=
409
- f.text_field(
410
- :translator_name,
411
- id: "#{model_name}_translator_name",
412
- size: nil,
413
- maxlength: Post::META_LIMIT
414
- )
415
- %>
416
- </div>
417
- </li>
418
- <% if Gem.loaded_specs.key?('biovision-comment') %>
419
410
  <li>
420
- <%= f.check_box :allow_comments, id: "#{model_name}_allow_comments" %>
421
- <%= f.label :allow_comments %>
411
+ <%= f.check_box :show_owner, id: "#{model_name}_show_owner" %>
412
+ <%= f.label :show_owner %>
422
413
  </li>
423
- <% end %>
424
- <% if Gem.loaded_specs.key?('biovision-vote') %>
425
414
  <li>
426
- <%= f.check_box :allow_votes, id: "#{model_name}_allow_votes" %>
427
- <%= f.label :allow_votes %>
415
+ <%= f.check_box :translation, id: "#{model_name}_translation" %>
416
+ <%= f.label :translation %>
417
+ <div>
418
+ <%= f.label :translator_name %><br/>
419
+ <%=
420
+ f.text_field(
421
+ :translator_name,
422
+ id: "#{model_name}_translator_name",
423
+ size: nil,
424
+ maxlength: Post::META_LIMIT
425
+ )
426
+ %>
427
+ </div>
428
428
  </li>
429
- <% end %>
430
- </ul>
431
- </dd>
429
+ <% if Gem.loaded_specs.key?('biovision-comment') %>
430
+ <li>
431
+ <%= f.check_box :allow_comments, id: "#{model_name}_allow_comments" %>
432
+ <%= f.label :allow_comments %>
433
+ </li>
434
+ <% end %>
435
+ <% if Gem.loaded_specs.key?('biovision-vote') %>
436
+ <li>
437
+ <%= f.check_box :allow_votes, id: "#{model_name}_allow_votes" %>
438
+ <%= f.label :allow_votes %>
439
+ </li>
440
+ <% end %>
441
+ </ul>
442
+ </dd>
443
+ </div>
432
444
  </dl>
433
445
 
434
446
  <%#= render partial: 'posts/form/gallery', locals: { entity: entity } %>
@@ -437,7 +449,7 @@
437
449
 
438
450
  <div class="buttons">
439
451
  <% if languages.count == 1 %>
440
- <% entity.language = languages.first %>
452
+ <% entity.language = languages.active.first %>
441
453
  <%= f.hidden_field :language_id %>
442
454
  <% end %>
443
455
  <%= f.hidden_field :post_type_id if entity.id.nil? %>