HornsAndHooves-publify_core 10.0.3 → 10.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c608c462079f3d5fd64160d1506e7c90f4912c65120fdaf3e65e2d144420ed93
4
- data.tar.gz: e9b8ccb059eb98cb23a310edd1d26acd41fbfa2a3a01ed68d10e4b6531cacf4d
3
+ metadata.gz: 4cd1439645737309c9615edba562cd7d51ede8f66a21fe888161ca91c0eacc83
4
+ data.tar.gz: 9a44b960e7718b3fb36aea0e6e24ef22efd98e21c9f6e8dc72d2fa96857a4a26
5
5
  SHA512:
6
- metadata.gz: '064290a1fb5c58f8377b5b5f1def37eaeecfb3534fb619dbd9bbe58771c6f399ef38932304b3a4d3c8a8c04475ef262f544b267fff85a4c813e92db568475227'
7
- data.tar.gz: 1e70d5f710253599e2059d3a9632c3509495cd6b54f9f6922e2e13416790fee8a5a70ef41eb0287c23c36b75eedceac6a8ad5caaac09b5ae9f8769c6771440e9
6
+ metadata.gz: a099c2cd4321e1f98da962ede37b2419e5c975af1f64ea3149be241ab714bcdf70aa104feae5fe3573321ed0fa3afb41aab40662173fc880647860444dcfd1e9
7
+ data.tar.gz: f88a34421a40fbec2ac11ef84a772369d68ef5b85e9f0d9e6e459dd13bd196f12a94f0e08a85d6a8968f48d93b139f3e610fa0ba4951479b67d6d6f30b375907
@@ -136,6 +136,15 @@ select#article_resource_id:invalid {
136
136
  color: gray;
137
137
  }
138
138
 
139
+ #article_image_alt {
140
+ border: none;
141
+ -webkit-box-shadow: none;
142
+ box-shadow: none;
143
+ -webkit-transition: none;
144
+ transition: none;
145
+ padding-left: 4px;
146
+ }
147
+
139
148
  #article_body_and_extended,
140
149
  #page_body {
141
150
  font-size: 1.3em;
@@ -113,7 +113,7 @@ class Admin::ContentController < Admin::BaseController
113
113
  @article.author = current_user
114
114
  @article.save_attachments!(params[:attachments])
115
115
  @article.state = "draft" unless @article.withdrawn?
116
- @article.text_filter_name ||= current_user.text_filter.name
116
+ @article.text_filter_name ||= current_user.text_filter&.name || this_blog.text_filter
117
117
 
118
118
  if @article.title.blank?
119
119
  lastid = Article.order("id desc").first.id
@@ -185,7 +185,8 @@ class Admin::ContentController < Admin::BaseController
185
185
  :permalink,
186
186
  :published_at,
187
187
  :title,
188
- :keywords)
188
+ :keywords,
189
+ :excerpt)
189
190
  end
190
191
 
191
192
  def default_text_filter
@@ -6,7 +6,6 @@ class ArticlesController < ContentController
6
6
  before_action :login_required, only: [:preview, :preview_page]
7
7
  before_action :auto_discovery_feed, only: [:show, :index]
8
8
  before_action :verify_config
9
- before_action :populate_recent_articles, only: [:redirect, :preview]
10
9
 
11
10
  layout :theme_layout, except: [:trackback]
12
11
 
@@ -66,6 +65,8 @@ class ArticlesController < ContentController
66
65
  @article = Article.last_draft(params[:id])
67
66
  @page_title = this_blog.article_title_template.to_title(@article, this_blog, params)
68
67
 
68
+ populate_recent_articles
69
+
69
70
  render "read"
70
71
  end
71
72
 
@@ -85,6 +86,9 @@ class ArticlesController < ContentController
85
86
  factory = Article::Factory.new(this_blog, current_user)
86
87
 
87
88
  @article = factory.match_permalink_format(from, this_blog.permalink_format)
89
+
90
+ populate_recent_articles
91
+
88
92
  return show_article if @article
89
93
 
90
94
  # Redirect old version with /:year/:month/:day/:title to new format,
@@ -160,6 +164,8 @@ class ArticlesController < ContentController
160
164
 
161
165
  private def populate_recent_articles
162
166
  @recent_articles = this_blog.contents.published.limit(RECENT_ARTICLES_COUNT)
167
+
168
+ @recent_articles = @recent_articles.where.not(id: @article.id) if @article
163
169
  end
164
170
 
165
171
  # See an article We need define @article before
@@ -31,7 +31,7 @@ class SetupController < BaseController
31
31
 
32
32
  # EmailNotify.send_user_create_notification(@user)
33
33
 
34
- redirect_to confirm_accounts_url
34
+ redirect_to admin_dashboard_url
35
35
  end
36
36
 
37
37
  private
@@ -31,6 +31,7 @@
31
31
  <div class="col-md-8">
32
32
  <%= text_field 'article', 'title', class: 'form-control', placeholder: t('.title') %>
33
33
  <%= select 'article', 'resource_id', resource_options, { prompt: 'Select Image' }, { class: 'form-control', required: "required" } %>
34
+ <%= text_field 'article', 'image_alt', class: 'form-control', placeholder: t('.image_alt') %>
34
35
  <div id="editor">
35
36
  <%= text_area('article', 'body_and_extended', class: 'form-control ', style: 'height: 360px', placeholder: t('.type_your_post')) %>
36
37
  </div>
@@ -133,6 +134,22 @@
133
134
  </p>
134
135
  </div>
135
136
  </div>
137
+ <div class='control-group'>
138
+ <p>
139
+ <%= t('.excerpt') %>:
140
+ <%= toggle_element('excerpt') %>
141
+ </p>
142
+ <div id="excerpt" class="collapse">
143
+ <div class="form-group">
144
+ <%= text_field 'article', 'excerpt', autocomplete: 'off', class: 'form-control' %>
145
+ </div>
146
+ <p>
147
+ <span class="btn btn-mini btn-default">
148
+ <%= toggle_element('excerpt', t('.ok')) %>
149
+ </span>
150
+ </p>
151
+ </div>
152
+ </div>
136
153
  </fieldset>
137
154
  </div>
138
155
  </div>
@@ -43,6 +43,7 @@ en:
43
43
  article_type: Article type
44
44
  cancel: Cancel
45
45
  default: Default
46
+ excerpt: Excerpt(Meta description)
46
47
  now: now
47
48
  ok: OK
48
49
  password: Password
@@ -59,6 +60,7 @@ en:
59
60
  tags: Tags
60
61
  tags_explanation_html: Separate tags with commas. Use double quotes (&quot;) around multi-word tags, e.g. &quot;opera house&quot;.
61
62
  title: Title
63
+ image_alt: Image Alt Text
62
64
  type_your_post: Type your post
63
65
  visibility: Visibility
64
66
  index:
@@ -4,18 +4,18 @@ class AddMissingIndexes < ActiveRecord::Migration[4.2]
4
4
  set_role "blog_content"
5
5
 
6
6
  def change
7
- add_index :feedback, [:id, :type]
7
+ add_index :feedback, %i[id type]
8
8
  add_index :feedback, :user_id
9
- add_index :sidebars, [:id, :type]
9
+ add_index :sidebars, %i[id type]
10
10
  add_index :contents, :user_id
11
- add_index :contents, [:id, :type]
11
+ add_index :contents, %i[id type]
12
12
  add_index :articles_tags, :tag_id
13
13
  add_index :articles_tags, :article_id
14
14
  add_index :profiles_rights, :profile_id
15
15
  add_index :users, :profile_id
16
16
  add_index :users, :text_filter_id
17
17
  add_index :users, :resource_id
18
- add_index :triggers, [:pending_item_id, :pending_item_type]
18
+ add_index :triggers, %i[pending_item_id pending_item_type]
19
19
  add_index :redirections, :content_id
20
20
  add_index :redirections, :redirect_id
21
21
  add_index :resources, :article_id
@@ -19,13 +19,13 @@ class RemoveProfiles < ActiveRecord::Migration[4.2]
19
19
  end
20
20
 
21
21
  Profile.create!(label: "admin", nicename: "Publify administrator",
22
- modules: [:dashboard, :articles, :notes, :pages, :feedback,
23
- :media, :themes, :sidebar, :profile, :users,
24
- :settings, :seo])
22
+ modules: %i[dashboard articles notes pages feedback
23
+ media themes sidebar profile users
24
+ settings seo])
25
25
  Profile.create!(label: "publisher", nicename: "Blog publisher",
26
- modules: [:dashboard, :articles, :notes, :pages, :feedback,
27
- :media, :profile])
26
+ modules: %i[dashboard articles notes pages feedback
27
+ media profile])
28
28
  Profile.create!(label: "contributor", nicename: "Contributor",
29
- modules: [:dashboard, :profile])
29
+ modules: %i[dashboard profile])
30
30
  end
31
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PublifyCore
4
- VERSION = "10.0.3"
4
+ VERSION = "10.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: HornsAndHooves-publify_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.3
4
+ version: 10.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2022-07-06 00:00:00.000000000 Z
14
+ date: 2022-09-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: aasm