Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Article can be protected by password

Fix backoffice field for password,
fix front in bootstrap theme by adding the protect_password partial for
article render
  • Loading branch information...
commit dbfa4ad4b06655983a55a2e00494e8ad67f8ad36 1 parent 53d29ee
@yaf yaf authored
View
2  app/views/admin/content/_form.html.erb
@@ -167,7 +167,7 @@
</p>
<div id='visibility' class='collapse'>
<label for="article_password"><%= t(".password") %></label>
- <%= text_field 'article', 'published_at', :class => "form-control" %>
+ <%= text_field 'article', 'password', :class => "form-control" %>
<p>
<span class="btn btn-mini btn-default">
<%= toggle_element('visibility', t('.ok')) %>
View
2  config/locales/da.yml
@@ -56,6 +56,8 @@ da:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/de.yml
@@ -57,6 +57,8 @@ de:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/en.yml
@@ -57,6 +57,8 @@ en:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/es-MX.yml
@@ -57,6 +57,8 @@ es-MX:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/fr.yml
@@ -57,6 +57,8 @@ fr:
helper:
at: "à"
articles:
+ password_form:
+ submit: "Envoyer"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/he-IL.yml
@@ -57,6 +57,8 @@ he-IL:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/it.yml
@@ -57,6 +57,8 @@ it:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/ja.yml
@@ -57,6 +57,8 @@ ja:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/lt.yml
@@ -57,6 +57,8 @@ lt:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/nb-NO.yml
@@ -57,6 +57,8 @@ nb-NO:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/nl.yml
@@ -57,6 +57,8 @@ nl:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/pl.yml
@@ -57,6 +57,8 @@ pl:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/pt-BR.yml
@@ -57,6 +57,8 @@ pt-BR:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/ro.yml
@@ -57,6 +57,8 @@ ro:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/ru.yml
@@ -57,6 +57,8 @@ ru:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/zh-CN.yml
@@ -57,6 +57,8 @@ zh-CN:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  config/locales/zh-TW.yml
@@ -57,6 +57,8 @@ zh-TW:
helper:
at: "at"
articles:
+ password_form:
+ submit: "Submit"
index:
next_page: "Next page"
previous_page: "Previous page"
View
2  themes/bootstrap/views/articles/read.html.erb
@@ -1,8 +1,10 @@
<div class="article" id="article-<%= @article.id %>">
<h1 class='page-header'><%= link_to_permalink(@article,@article.title) %></h1>
+
<%= @article.html(:body) %>
<%= @article.html(:extended) %>
+ <%= render 'articles/protected_article_content', { article: @article } %>
<%= render 'articles/meta', article: @article %>
<% if @article.user.twitter.present? %>
Please sign in to comment.
Something went wrong with that request. Please try again.