|
...
|
...
|
@@ -8,7 +8,9 @@ |
|
8
|
8
|
|
|
9
|
9
|
<ul class="nav nav-tabs" role="tablist">
|
|
10
|
10
|
<li class="nav-item" role="presentation"><a class="nav-link <%= controller_name == 'page_templates' ? 'active' : '' %>" href="#general" aria-controls="general" role="tab" data-toggle="tab">General</a></li>
|
|
11
|
|
- <li class="nav-item" role="presentation"><a class="nav-link <%= controller_name == 'page_templates2' ? 'active' : '' %>" href="#static" aria-controls="meta" role="tab" data-toggle="tab">Static</a></li>
|
|
|
11
|
+ <% if params[:lang].present? %>
|
|
|
12
|
+ <li class="nav-item" role="presentation"><a class="nav-link <%= controller_name == 'page_templates2' ? 'active' : '' %>" href="#static" aria-controls="meta" role="tab" data-toggle="tab">Static</a></li>
|
|
|
13
|
+ <% end %>
|
|
12
|
14
|
<% if Kanjai::PageLang.count > 0 %>
|
|
13
|
15
|
<li class="choose-lang">
|
|
14
|
16
|
<div class="text-right">
|
|
...
|
...
|
@@ -24,46 +26,48 @@ |
|
24
|
26
|
<% end %>
|
|
25
|
27
|
</div>
|
|
26
|
28
|
|
|
27
|
|
- <div class="tab-pane <%= controller_name == 'page_templates2' ? 'active' : '' %>" id="static" role="tabpanel">
|
|
28
|
|
- <%= form_for(@page_template, :url => update_marker_admin_page_template_url, :html => {:method => 'POST', :class => "form-horizontal ajax-file-upload-form simple_submit"}) do |form| %>
|
|
|
29
|
+ <% if params[:lang].present? %>
|
|
|
30
|
+ <div class="tab-pane <%= controller_name == 'page_templates2' ? 'active' : '' %>" id="static" role="tabpanel">
|
|
|
31
|
+ <%= form_for(@page_template, :url => update_marker_admin_page_template_url, :html => {:method => 'POST', :class => "form-horizontal ajax-file-upload-form simple_submit"}) do |form| %>
|
|
29
|
32
|
|
|
30
|
|
- <%= form.fields_for :page_content_markers, @markers do |form2| %>
|
|
|
33
|
+ <%= form.fields_for :page_content_markers, @markers do |form2| %>
|
|
31
|
34
|
|
|
32
|
|
- <div class="form-group">
|
|
33
|
|
- <%= form2.label :text_value, form2.object.marker_name, :class => "control-label" %>
|
|
34
|
|
- <% if form2.object.marker_type == 'string' %>
|
|
35
|
|
- <%= form2.text_field :text_value, :class => "form-control" %>
|
|
36
|
|
- <% end %>
|
|
37
|
|
- <% if form2.object.marker_type == 'text' %>
|
|
38
|
|
- <%= form2.text_area :text_value, :class => "form-control page_html_content" %>
|
|
39
|
|
- <% end %>
|
|
40
|
|
- <% if form2.object.marker_type == 'textarea' %>
|
|
41
|
|
- <%= form2.text_area :text_value, :class => "form-control" %>
|
|
42
|
|
- <% end %>
|
|
43
|
|
- <% if form2.object.marker_type == 'file' %>
|
|
44
|
|
- <% s3_direct_post = S3_BUCKET.presigned_post(key: "#{form2.object.get_file_path}${filename}", success_action_status: '201', acl: 'public-read') %>
|
|
45
|
|
- <%= form2.file_field :text_value, :class => "", 'data-url' => s3_direct_post.url, 'data-form-data' => s3_direct_post.fields.to_json, 'data-host' => URI.parse(s3_direct_post.url).host , 'data-type' => 'zip' %>
|
|
46
|
|
- <% if form2.object.text_value.present? %>
|
|
47
|
|
- <%= link_to 'file', form2.object.text_value %>
|
|
48
|
|
- <% end %>
|
|
49
|
|
- <% end %>
|
|
|
35
|
+ <div class="form-group">
|
|
|
36
|
+ <%= form2.label :text_value, form2.object.marker_name, :class => "control-label" %>
|
|
|
37
|
+ <% if form2.object.marker_type == 'string' %>
|
|
|
38
|
+ <%= form2.text_field :text_value, :class => "form-control" %>
|
|
|
39
|
+ <% end %>
|
|
|
40
|
+ <% if form2.object.marker_type == 'text' %>
|
|
|
41
|
+ <%= form2.text_area :text_value, :class => "form-control page_html_content" %>
|
|
|
42
|
+ <% end %>
|
|
|
43
|
+ <% if form2.object.marker_type == 'textarea' %>
|
|
|
44
|
+ <%= form2.text_area :text_value, :class => "form-control" %>
|
|
|
45
|
+ <% end %>
|
|
|
46
|
+ <% if form2.object.marker_type == 'file' %>
|
|
|
47
|
+ <% s3_direct_post = S3_BUCKET.presigned_post(key: "#{form2.object.get_file_path}${filename}", success_action_status: '201', acl: 'public-read') %>
|
|
|
48
|
+ <%= form2.file_field :text_value, :class => "", 'data-url' => s3_direct_post.url, 'data-form-data' => s3_direct_post.fields.to_json, 'data-host' => URI.parse(s3_direct_post.url).host , 'data-type' => 'zip' %>
|
|
|
49
|
+ <% if form2.object.text_value.present? %>
|
|
|
50
|
+ <%= link_to 'file', form2.object.text_value %>
|
|
|
51
|
+ <% end %>
|
|
|
52
|
+ <% end %>
|
|
50
|
53
|
|
|
51
|
|
- </div>
|
|
|
54
|
+ </div>
|
|
52
|
55
|
|
|
53
|
56
|
|
|
54
|
|
- <% end %>
|
|
|
57
|
+ <% end %>
|
|
55
|
58
|
|
|
56
|
|
- <div class="card-footer mt-20">
|
|
57
|
|
- <div class="clearfix">
|
|
58
|
|
- <div class="float-right">
|
|
59
|
|
- <%= link_to t('actions.cancel'), admin_page_templates_url, class: 'btn btn-secondary' %>
|
|
60
|
|
- <button class="btn btn-primary save" type="submit"><%= t('actions.save') %></button>
|
|
|
59
|
+ <div class="card-footer mt-20">
|
|
|
60
|
+ <div class="clearfix">
|
|
|
61
|
+ <div class="float-right">
|
|
|
62
|
+ <%= link_to t('actions.cancel'), admin_page_templates_url, class: 'btn btn-secondary' %>
|
|
|
63
|
+ <button class="btn btn-primary save" type="submit"><%= t('actions.save') %></button>
|
|
|
64
|
+ </div>
|
|
61
|
65
|
</div>
|
|
62
|
66
|
</div>
|
|
63
|
|
- </div>
|
|
64
|
67
|
|
|
65
|
|
- <% end %>
|
|
66
|
|
- </div>
|
|
|
68
|
+ <% end %>
|
|
|
69
|
+ </div>
|
|
|
70
|
+ <% end %>
|
|
67
|
71
|
</div>
|
|
68
|
72
|
|
|
69
|
73
|
</div>
|
...
|
...
|
|