lines-engine 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +3 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +49 -52
- data/app/controllers/lines/admin/articles_controller.rb +3 -3
- data/app/controllers/lines/application_controller.rb +1 -1
- data/app/controllers/lines/sessions_controller.rb +1 -1
- data/app/helpers/lines/application_helper.rb +13 -14
- data/app/views/kaminari/lines/_next_page.html.erb +1 -1
- data/app/views/kaminari/lines/_prev_page.html.erb +1 -1
- data/app/views/layouts/lines/application.html.erb +2 -2
- data/app/views/lines/admin/articles/_form.html.erb +29 -17
- data/app/views/lines/admin/articles/_picture_box.html.erb +2 -30
- data/app/views/lines/admin/articles/edit.html.erb +0 -13
- data/app/views/lines/admin/articles/index.html.erb +10 -10
- data/app/views/lines/admin/articles/new.html.erb +1 -15
- data/app/views/lines/admin/authors/_form.html.erb +11 -11
- data/app/views/lines/admin/authors/index.html.erb +4 -4
- data/app/views/lines/admin/authors/show.html.erb +1 -1
- data/app/views/lines/sessions/new.html.erb +4 -4
- data/app/views/lines/shared/_footer.html.erb +1 -1
- data/app/views/lines/shared/_navigation.html.erb +1 -1
- data/config/locales/de.yml +210 -0
- data/config/locales/kaminari.de.yml +8 -0
- data/config/locales/lines.de.yml +66 -0
- data/config/locales/lines.en.yml +66 -0
- data/lib/generators/lines/install_generator.rb +4 -0
- data/lib/lines/engine.rb +17 -0
- data/lib/lines/version.rb +1 -1
- data/lines.gemspec +2 -2
- data/spec/dummy/config/application.rb +1 -1
- data/spec/features/article_spec.rb +2 -2
- data/spec/spec_helper.rb +8 -3
- metadata +26 -47
- metadata.gz.sig +0 -0
- data/config/initializers/simple_form.rb +0 -144
- data/spec/dummy/db/migrate/20140505122014_base_migration.rb +0 -84
- data/spec/dummy/db/migrate/20140702160602_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +0 -31
- data/spec/dummy/db/migrate/20140702160603_add_missing_unique_indices.acts_as_taggable_on_engine.rb +0 -20
- data/spec/dummy/db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +0 -15
- data/spec/dummy/db/migrate/20141027143656_add_teaser_to_article.rb +0 -5
- data/spec/dummy/db/migrate/20150421093311_add_reset_password_fields_to_users.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a9dfd417c327209ac7ba0b305cc9aecdc997067
|
4
|
+
data.tar.gz: 02d1a7d0170c3cce61dcf8520a6db6ecc71c76e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b216ce1faf8f94c5a8d5e60fbfc41266f3cf574be601f98d56630f445699bdef670896b232bce2ad3a93de3a3e41742e93de0d4eef5d827d798d1395d73558
|
7
|
+
data.tar.gz: 8ebc8ccdbd91cd80f998baff80458a011e7e2c4e652400881d704d673288d475bcfd11bf8e319f6224bf7137d4c6ce8160a810e46a0eeb00ca3c5ff04d2f46c2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lines-engine (1.
|
4
|
+
lines-engine (1.1.0)
|
5
5
|
acts-as-taggable-on (~> 3.5, >= 3.5)
|
6
6
|
bcrypt (~> 3.1.0, >= 3.1.0)
|
7
7
|
bcrypt-ruby (>= 3.0.0, <= 4)
|
8
8
|
carrierwave (~> 0.10.0, >= 0.10.0)
|
9
9
|
coffee-rails (>= 4.0.0, < 5)
|
10
10
|
friendly_id (~> 5.1.0, >= 5.1.0)
|
11
|
+
i18n (~> 0.7.0)
|
11
12
|
jquery-fileupload-rails (~> 0.4.1, >= 0.4.1)
|
12
13
|
jquery-rails (>= 3.1.0, < 5)
|
13
14
|
jquery-ui-rails (~> 5, >= 5.0.0)
|
@@ -22,7 +23,6 @@ PATH
|
|
22
23
|
rmagick (~> 2.13.4, >= 2.13.4)
|
23
24
|
sanitize (~> 3.0.0, >= 3.0.0)
|
24
25
|
sass-rails (>= 4.0.0)
|
25
|
-
simple_form (~> 3, >= 3.0.0, < 4)
|
26
26
|
sitemap_generator (~> 5.0.0, >= 5.0.5)
|
27
27
|
thor (~> 0.1, >= 0.19)
|
28
28
|
thread_safe (~> 0.1, >= 0.3)
|
@@ -31,36 +31,36 @@ PATH
|
|
31
31
|
GEM
|
32
32
|
remote: https://rubygems.org/
|
33
33
|
specs:
|
34
|
-
actionmailer (4.2.
|
35
|
-
actionpack (= 4.2.
|
36
|
-
actionview (= 4.2.
|
37
|
-
activejob (= 4.2.
|
34
|
+
actionmailer (4.2.4)
|
35
|
+
actionpack (= 4.2.4)
|
36
|
+
actionview (= 4.2.4)
|
37
|
+
activejob (= 4.2.4)
|
38
38
|
mail (~> 2.5, >= 2.5.4)
|
39
39
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
40
|
-
actionpack (4.2.
|
41
|
-
actionview (= 4.2.
|
42
|
-
activesupport (= 4.2.
|
40
|
+
actionpack (4.2.4)
|
41
|
+
actionview (= 4.2.4)
|
42
|
+
activesupport (= 4.2.4)
|
43
43
|
rack (~> 1.6)
|
44
44
|
rack-test (~> 0.6.2)
|
45
45
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
46
46
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
47
|
-
actionview (4.2.
|
48
|
-
activesupport (= 4.2.
|
47
|
+
actionview (4.2.4)
|
48
|
+
activesupport (= 4.2.4)
|
49
49
|
builder (~> 3.1)
|
50
50
|
erubis (~> 2.7.0)
|
51
51
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
52
52
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
53
|
-
activejob (4.2.
|
54
|
-
activesupport (= 4.2.
|
53
|
+
activejob (4.2.4)
|
54
|
+
activesupport (= 4.2.4)
|
55
55
|
globalid (>= 0.3.0)
|
56
|
-
activemodel (4.2.
|
57
|
-
activesupport (= 4.2.
|
56
|
+
activemodel (4.2.4)
|
57
|
+
activesupport (= 4.2.4)
|
58
58
|
builder (~> 3.1)
|
59
|
-
activerecord (4.2.
|
60
|
-
activemodel (= 4.2.
|
61
|
-
activesupport (= 4.2.
|
59
|
+
activerecord (4.2.4)
|
60
|
+
activemodel (= 4.2.4)
|
61
|
+
activesupport (= 4.2.4)
|
62
62
|
arel (~> 6.0)
|
63
|
-
activesupport (4.2.
|
63
|
+
activesupport (4.2.4)
|
64
64
|
i18n (~> 0.7)
|
65
65
|
json (~> 1.7, >= 1.7.7)
|
66
66
|
minitest (~> 5.1)
|
@@ -70,7 +70,7 @@ GEM
|
|
70
70
|
activerecord (>= 3.2, < 5)
|
71
71
|
addressable (2.3.8)
|
72
72
|
arel (6.0.3)
|
73
|
-
autoprefixer-rails (
|
73
|
+
autoprefixer-rails (6.0.3)
|
74
74
|
execjs
|
75
75
|
json
|
76
76
|
bcrypt (3.1.10)
|
@@ -81,7 +81,7 @@ GEM
|
|
81
81
|
i18n
|
82
82
|
rake (>= 10.0.0)
|
83
83
|
sshkit (~> 1.3)
|
84
|
-
capybara (2.
|
84
|
+
capybara (2.5.0)
|
85
85
|
mime-types (>= 1.16)
|
86
86
|
nokogiri (>= 1.3.3)
|
87
87
|
rack (>= 1.0.0)
|
@@ -104,13 +104,13 @@ GEM
|
|
104
104
|
crass (0.2.1)
|
105
105
|
diff-lcs (1.2.5)
|
106
106
|
erubis (2.7.0)
|
107
|
-
execjs (2.
|
107
|
+
execjs (2.6.0)
|
108
108
|
factory_girl (4.5.0)
|
109
109
|
activesupport (>= 3.0.0)
|
110
110
|
factory_girl_rails (4.5.0)
|
111
111
|
factory_girl (~> 4.5.0)
|
112
112
|
railties (>= 3.0.0)
|
113
|
-
faker (1.
|
113
|
+
faker (1.5.0)
|
114
114
|
i18n (~> 0.5)
|
115
115
|
ffi (1.9.10)
|
116
116
|
formatador (0.2.5)
|
@@ -135,7 +135,7 @@ GEM
|
|
135
135
|
actionpack (>= 3.1)
|
136
136
|
railties (>= 3.1)
|
137
137
|
sass (>= 3.2)
|
138
|
-
jquery-rails (4.0.
|
138
|
+
jquery-rails (4.0.5)
|
139
139
|
rails-dom-testing (~> 1.0)
|
140
140
|
railties (>= 4.2.0)
|
141
141
|
thor (>= 0.14, < 2.0)
|
@@ -150,7 +150,7 @@ GEM
|
|
150
150
|
listen (3.0.3)
|
151
151
|
rb-fsevent (>= 0.9.3)
|
152
152
|
rb-inotify (>= 0.9)
|
153
|
-
loofah (2.0.
|
153
|
+
loofah (2.0.3)
|
154
154
|
nokogiri (>= 1.5.9)
|
155
155
|
lumberjack (1.0.9)
|
156
156
|
mail (2.6.3)
|
@@ -158,10 +158,10 @@ GEM
|
|
158
158
|
meta-tags (2.0.0)
|
159
159
|
actionpack (>= 3.0.0)
|
160
160
|
method_source (0.8.2)
|
161
|
-
mime-types (2.6.
|
161
|
+
mime-types (2.6.2)
|
162
162
|
mini_portile (0.6.2)
|
163
163
|
minitest (5.8.0)
|
164
|
-
mysql2 (0.3.
|
164
|
+
mysql2 (0.3.20)
|
165
165
|
nenv (0.2.0)
|
166
166
|
net-scp (1.2.1)
|
167
167
|
net-ssh (>= 2.6.5)
|
@@ -170,7 +170,7 @@ GEM
|
|
170
170
|
mini_portile (~> 0.6.0)
|
171
171
|
nokogumbo (1.1.12)
|
172
172
|
nokogiri
|
173
|
-
notiffany (0.0.
|
173
|
+
notiffany (0.0.8)
|
174
174
|
nenv (~> 0.1)
|
175
175
|
shellany (~> 0.0)
|
176
176
|
orm_adapter (0.5.0)
|
@@ -186,20 +186,20 @@ GEM
|
|
186
186
|
rack-test (0.6.3)
|
187
187
|
rack (>= 1.0)
|
188
188
|
railroady (1.3.1)
|
189
|
-
rails (4.2.
|
190
|
-
actionmailer (= 4.2.
|
191
|
-
actionpack (= 4.2.
|
192
|
-
actionview (= 4.2.
|
193
|
-
activejob (= 4.2.
|
194
|
-
activemodel (= 4.2.
|
195
|
-
activerecord (= 4.2.
|
196
|
-
activesupport (= 4.2.
|
189
|
+
rails (4.2.4)
|
190
|
+
actionmailer (= 4.2.4)
|
191
|
+
actionpack (= 4.2.4)
|
192
|
+
actionview (= 4.2.4)
|
193
|
+
activejob (= 4.2.4)
|
194
|
+
activemodel (= 4.2.4)
|
195
|
+
activerecord (= 4.2.4)
|
196
|
+
activesupport (= 4.2.4)
|
197
197
|
bundler (>= 1.3.0, < 2.0)
|
198
|
-
railties (= 4.2.
|
198
|
+
railties (= 4.2.4)
|
199
199
|
sprockets-rails
|
200
200
|
rails-deprecated_sanitizer (1.0.3)
|
201
201
|
activesupport (>= 4.2.0.alpha)
|
202
|
-
rails-dom-testing (1.0.
|
202
|
+
rails-dom-testing (1.0.7)
|
203
203
|
activesupport (>= 4.2.0.beta, < 5.0)
|
204
204
|
nokogiri (~> 1.6.0)
|
205
205
|
rails-deprecated_sanitizer (>= 1.0.1)
|
@@ -207,13 +207,13 @@ GEM
|
|
207
207
|
loofah (~> 2.0)
|
208
208
|
rails3-jquery-autocomplete (1.0.15)
|
209
209
|
rails (>= 3.2)
|
210
|
-
railties (4.2.
|
211
|
-
actionpack (= 4.2.
|
212
|
-
activesupport (= 4.2.
|
210
|
+
railties (4.2.4)
|
211
|
+
actionpack (= 4.2.4)
|
212
|
+
activesupport (= 4.2.4)
|
213
213
|
rake (>= 0.8.7)
|
214
214
|
thor (>= 0.18.1, < 2.0)
|
215
215
|
rake (10.4.2)
|
216
|
-
rb-fsevent (0.9.
|
216
|
+
rb-fsevent (0.9.6)
|
217
217
|
rb-inotify (0.9.5)
|
218
218
|
ffi (>= 0.5.0)
|
219
219
|
redcarpet (3.2.3)
|
@@ -238,23 +238,20 @@ GEM
|
|
238
238
|
crass (~> 0.2.0)
|
239
239
|
nokogiri (>= 1.4.4)
|
240
240
|
nokogumbo (= 1.1.12)
|
241
|
-
sass (3.4.
|
242
|
-
sass-rails (5.0.
|
241
|
+
sass (3.4.18)
|
242
|
+
sass-rails (5.0.4)
|
243
243
|
railties (>= 4.0.0, < 5.0)
|
244
244
|
sass (~> 3.1)
|
245
245
|
sprockets (>= 2.8, < 4.0)
|
246
246
|
sprockets-rails (>= 2.0, < 4.0)
|
247
|
-
tilt (
|
247
|
+
tilt (>= 1.1, < 3)
|
248
248
|
shellany (0.0.1)
|
249
|
-
simple_form (3.1.0)
|
250
|
-
actionpack (~> 4.0)
|
251
|
-
activemodel (~> 4.0)
|
252
249
|
sitemap_generator (5.0.5)
|
253
250
|
builder
|
254
251
|
slop (3.6.0)
|
255
|
-
sprockets (3.
|
252
|
+
sprockets (3.3.4)
|
256
253
|
rack (~> 1.0)
|
257
|
-
sprockets-rails (2.3.
|
254
|
+
sprockets-rails (2.3.3)
|
258
255
|
actionpack (>= 3.0)
|
259
256
|
activesupport (>= 3.0)
|
260
257
|
sprockets (>= 2.8, < 4.0)
|
@@ -264,10 +261,10 @@ GEM
|
|
264
261
|
net-ssh (>= 2.8.0)
|
265
262
|
thor (0.19.1)
|
266
263
|
thread_safe (0.3.5)
|
267
|
-
tilt (
|
264
|
+
tilt (2.0.1)
|
268
265
|
tzinfo (1.2.2)
|
269
266
|
thread_safe (~> 0.1)
|
270
|
-
uglifier (2.7.
|
267
|
+
uglifier (2.7.2)
|
271
268
|
execjs (>= 0.3.0)
|
272
269
|
json (>= 1.8.0)
|
273
270
|
xpath (2.0.0)
|
@@ -164,9 +164,9 @@ module Lines
|
|
164
164
|
|
165
165
|
# Allowed attribute with strong_params
|
166
166
|
def article_params
|
167
|
-
params.require(:article).permit(:content, :teaser, :hero_image, :short_hero_image, :published,
|
168
|
-
:
|
169
|
-
:document, :document_cache, :hero_image_file, :remove_document, :remove_hero_image, :pictures,
|
167
|
+
params.require(:article).permit(:content, :teaser, :hero_image, :short_hero_image, :published,
|
168
|
+
:published_at, :sub_title, :title, :hero_image_cache, :tag_list, :gplus_url, :featured,
|
169
|
+
:document, :document_cache, :hero_image_file, :remove_document, :remove_hero_image, :pictures,
|
170
170
|
pictures_attributes: [:id, :image, :name, :article_id], author_ids: [] )
|
171
171
|
end
|
172
172
|
|
@@ -11,7 +11,7 @@ module Lines
|
|
11
11
|
|
12
12
|
# checks if current user is authorized. Redirects to login_url if not
|
13
13
|
def authorize
|
14
|
-
redirect_to login_url, notice:
|
14
|
+
redirect_to login_url, notice: t('lines.please_login') if current_lines_user.nil?
|
15
15
|
end
|
16
16
|
|
17
17
|
end
|
@@ -72,21 +72,20 @@ module Lines
|
|
72
72
|
html = content_tag(:div, id: 'navbar') do
|
73
73
|
content_tag(:div, class: 'navbar-inner') do
|
74
74
|
if current_lines_user
|
75
|
-
#content_tag(:span, link_to('', admin_articles_path), class: 'backlink', title: 'Dashboard') + content_tag(:span, action_link, class: 'actionlink') + content_tag(:span, class: 'buttons', &block) + content_tag(:span, link_to('Logout', logout_path), class: 'logout') + content_tag(:span, "Logged in as #{current_lines_user.email}", class: 'logged-in-as')
|
76
75
|
content_tag(:span, class: 'buttons', &block) + "<div class='btn-menu'><dic class='stripes'></div></div>".html_safe +
|
77
76
|
"<div class='submenu'>
|
78
77
|
<div class='submenu-inner'>
|
79
78
|
<ul>
|
80
79
|
<li>#{link_to("Dashboard", admin_articles_path)}</li>
|
81
|
-
<li>#{link_to(
|
80
|
+
<li>#{link_to(t('activerecord.models.lines/author', count: 2).html_safe, admin_authors_path)}</li>
|
82
81
|
</ul>
|
83
82
|
<ul>
|
84
|
-
<li class='small'
|
85
|
-
<li>#{link_to(
|
83
|
+
<li class='small'>#{t('lines.logged_in_as').html_safe} #{current_lines_user.email}</li>
|
84
|
+
<li>#{link_to(t('lines.buttons.logout').html_safe, logout_path)}</li>
|
86
85
|
</ul>
|
87
86
|
<ul>
|
88
|
-
<li>#{link_to(
|
89
|
-
<li>#{link_to(
|
87
|
+
<li>#{link_to(t('lines.buttons.formating_help').html_safe, "#", class: "btn-cheatsheet")}</li>
|
88
|
+
<li>#{link_to(t('lines.buttons.about').html_safe, "http://lines.opoloo.com")}</li>
|
90
89
|
</ul>
|
91
90
|
</div>
|
92
91
|
</div>".html_safe
|
@@ -102,17 +101,17 @@ module Lines
|
|
102
101
|
def get_action_link
|
103
102
|
if controller_path == 'admin/articles'
|
104
103
|
case action_name
|
105
|
-
when 'index' then '
|
106
|
-
when 'new' then '
|
107
|
-
when 'edit' then '
|
108
|
-
when 'show' then
|
104
|
+
when 'index' then t('lines/buttons/all_articles').html_safe
|
105
|
+
when 'new' then t('lines/buttons/new_article').html_safe
|
106
|
+
when 'edit' then t('lines/buttons/edit_article').html_safe
|
107
|
+
when 'show' then t('lines/buttons/preview').html_safe
|
109
108
|
end
|
110
109
|
elsif controller_path == 'admin/authors'
|
111
110
|
case action_name
|
112
|
-
when 'index' then '
|
113
|
-
when 'new' then '
|
114
|
-
when 'edit' then '
|
115
|
-
when 'show' then
|
111
|
+
when 'index' then t('lines/buttons/all_authors').html_safe
|
112
|
+
when 'new' then t('lines/buttons/new_author').html_safe
|
113
|
+
when 'edit' then t('lines/buttons/edit_author').html_safe
|
114
|
+
when 'show' then t('lines/buttons/author').html_safe
|
116
115
|
end
|
117
116
|
end
|
118
117
|
end
|
@@ -7,5 +7,5 @@
|
|
7
7
|
remote: data-remote
|
8
8
|
-%>
|
9
9
|
<span class="next">
|
10
|
-
<%= link_to_unless current_page.last?,
|
10
|
+
<%= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, :rel => 'next', :remote => remote %>
|
11
11
|
</span>
|
@@ -7,5 +7,5 @@
|
|
7
7
|
remote: data-remote
|
8
8
|
-%>
|
9
9
|
<span class="prev">
|
10
|
-
<%= link_to_unless current_page.first?,
|
10
|
+
<%= link_to_unless current_page.first?, t('views.pagination.previous').html_safe, url, :rel => 'prev', :remote => remote %>
|
11
11
|
</span>
|
@@ -20,8 +20,8 @@
|
|
20
20
|
<body>
|
21
21
|
<% if current_lines_user %>
|
22
22
|
<%= render_navbar do %>
|
23
|
-
<%= link_to '
|
24
|
-
<%= link_to '
|
23
|
+
<%= link_to t('lines.buttons.new_article').html_safe, new_admin_article_path, class: "btn btn-new-article highlight" %>
|
24
|
+
<%= link_to t('lines.buttons.dashboard').html_safe, admin_articles_path, class: "btn btn-view-blog" %>
|
25
25
|
<% end %>
|
26
26
|
<div class="spacer"></div>
|
27
27
|
<% end %>
|
@@ -1,9 +1,21 @@
|
|
1
|
-
|
1
|
+
<% if @article.errors.any? %>
|
2
|
+
<div id="error_explanation">
|
3
|
+
<h2><%= pluralize(@article.errors.count, "error") %> prohibited this article from being saved:</h2>
|
4
|
+
<ul>
|
5
|
+
<% @article.errors.full_messages.each do |msg| %>
|
6
|
+
<li><%= msg %></li>
|
7
|
+
<% end %>
|
8
|
+
</ul>
|
9
|
+
<a href="#" class="close">x</a>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= form_for([:admin, @article], id: 'article_form') do |f| %>
|
2
14
|
<div class="new-article">
|
3
15
|
<div class="hero-upload">
|
4
16
|
<%= f.file_field :hero_image %>
|
5
17
|
<%= f.hidden_field :remove_hero_image %>
|
6
|
-
<div class="btn-change-hero"
|
18
|
+
<div class="btn-change-hero"><%= t('lines.buttons.change') %></div>
|
7
19
|
<% if @article.short_hero_image.present? %>
|
8
20
|
<img src="<%= @article.short_hero_image %>" alt="" />
|
9
21
|
<% elsif @article.hero_image? %>
|
@@ -13,9 +25,9 @@
|
|
13
25
|
<div class="upload-overlay">
|
14
26
|
<div class="upload-overlay-close icon-close"></div>
|
15
27
|
<div class="upload-overlay-inner">
|
16
|
-
<h2
|
17
|
-
<div class="btn-remove-hero<%= " show" if @article.hero_image? || @article.short_hero_image %>"
|
18
|
-
<%= f.label :hero_image,
|
28
|
+
<h2><%= t('lines.buttons.select_hero_image') %></h2>
|
29
|
+
<div class="btn-remove-hero<%= " show" if @article.hero_image? || @article.short_hero_image %>"><%= t('lines.buttons.remove_hero_image') %></div>
|
30
|
+
<%= f.label :hero_image, t('lines.buttons.upload_image') %>
|
19
31
|
<div class="hero-images">
|
20
32
|
<% Lines::Article::HERO_IMAGES.each_with_index do |h, i| %>
|
21
33
|
<img src="<%= "/heroes/#{h}" %>" alt="" class="<%= 'selected-hero-image' if ('/heroes/' + h) == @article.short_hero_image %>" />
|
@@ -28,26 +40,26 @@
|
|
28
40
|
</div>
|
29
41
|
|
30
42
|
<div class="input-field required">
|
31
|
-
<%= f.text_field :title, placeholder:
|
43
|
+
<%= f.text_field :title, placeholder: true, class: 'title' %>
|
32
44
|
</div>
|
33
45
|
|
34
46
|
<div class="input-field">
|
35
|
-
<%= f.text_field :sub_title, placeholder:
|
47
|
+
<%= f.text_field :sub_title, placeholder: true %>
|
36
48
|
</div>
|
37
49
|
|
38
50
|
<div class="input-field">
|
39
|
-
<%= f.text_area :teaser, placeholder:
|
51
|
+
<%= f.text_area :teaser, placeholder: true, rows: 1 %>
|
40
52
|
</div>
|
41
53
|
|
42
54
|
<div class="input-field editor required">
|
43
|
-
<%= f.text_area :content, placeholder:
|
55
|
+
<%= f.text_area :content, placeholder: true, rows: 1, data: {editor: "codemirror"} %>
|
44
56
|
</div>
|
45
57
|
|
46
58
|
<div class="input-field">
|
47
59
|
<div class="documents">
|
48
|
-
<%= f.label :document, "#{@article.document? ? @article.document.file.filename + ' <span>(' + number_to_human_size(File.size(@article.document.file.file)) + ')</span>' : '
|
60
|
+
<%= f.label :document, "#{@article.document? ? @article.document.file.filename + ' <span>(' + number_to_human_size(File.size(@article.document.file.file)) + ')</span>' : t('lines.buttons.attach_document').html_safe }".html_safe, class: "attachment-label", title: t('lines.buttons.change_attachment').html_safe -%>
|
49
61
|
<% if @article.document? %>
|
50
|
-
<span class="icon-delete btn-delete-attachment" title="
|
62
|
+
<span class="icon-delete btn-delete-attachment" title="<%= t('lines.buttons.remove_attachment').html_safe %>"></span>
|
51
63
|
<% end %>
|
52
64
|
<%= f.file_field :document, class: "article-document-value" %>
|
53
65
|
<div class="hidden">
|
@@ -58,20 +70,20 @@
|
|
58
70
|
|
59
71
|
</div>
|
60
72
|
|
61
|
-
<h2
|
73
|
+
<h2><%= t('activerecord.models.lines/author', count: 2) %> <span style="color: #c10020;">*</span></h2>
|
62
74
|
|
63
|
-
<div class="input-field">
|
75
|
+
<div class="input-field checkbox">
|
64
76
|
<%= f.collection_check_boxes(:author_ids, Lines::Author.all, :id, :name) %>
|
65
77
|
</div>
|
66
78
|
|
67
|
-
<h2
|
79
|
+
<h2><%= t('lines.additional_info').html_safe %></h2>
|
68
80
|
|
69
81
|
<div class="input-field">
|
70
82
|
<%= f.autocomplete_field :tag_list, autocomplete_tag_name_admin_articles_path, :"data-delimiter" => ', ', placeholder: "Tags" %>
|
71
83
|
</div>
|
72
84
|
|
73
85
|
<div class="input-field">
|
74
|
-
<%= f.text_field :gplus_url, placeholder:
|
86
|
+
<%= f.text_field :gplus_url, placeholder: true %>
|
75
87
|
</div>
|
76
88
|
|
77
89
|
<div class="input-field required">
|
@@ -79,8 +91,8 @@
|
|
79
91
|
</div>
|
80
92
|
|
81
93
|
<%= render_navbar do %>
|
82
|
-
<%= f.submit
|
83
|
-
<%= link_to
|
94
|
+
<%= f.submit t('lines.buttons.save_article').html_safe, class: "btn btn-save-publish highlight" %>
|
95
|
+
<%= link_to t('lines.buttons.cancel').html_safe, admin_articles_path, class: "btn btn-cancel" %>
|
84
96
|
<% end %>
|
85
97
|
|
86
98
|
</div>
|