typo 5.4.4 → 5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +59 -28
- data/MAINTAINERS +9 -17
- data/README +28 -20
- data/UPGRADE +6 -2
- data/app/controllers/accounts_controller.rb +1 -1
- data/app/controllers/admin/content_controller.rb +1 -1
- data/app/controllers/admin/feedback_controller.rb +3 -3
- data/app/controllers/admin/pages_controller.rb +2 -0
- data/app/controllers/application_controller.rb +6 -1
- data/app/controllers/articles_controller.rb +13 -1
- data/app/helpers/application_helper.rb +5 -2
- data/app/helpers/authors_helper.rb +14 -3
- data/app/models/article.rb +6 -4
- data/app/models/blog.rb +0 -4
- data/app/models/blog_sweeper.rb +1 -1
- data/app/models/content.rb +10 -5
- data/app/models/page_cache.rb +6 -7
- data/app/models/user.rb +1 -0
- data/app/views/admin/content/_form.html.erb +13 -11
- data/app/views/admin/content/_images.html.erb +1 -1
- data/app/views/admin/content/_simple_editor.html.erb +1 -0
- data/app/views/admin/content/_visual_editor.html.erb +1 -0
- data/app/views/admin/dashboard/_overview.html.erb +7 -7
- data/app/views/admin/pages/_form.html.erb +1 -0
- data/app/views/admin/pages/_images.html.erb +18 -0
- data/app/views/admin/pages/_simple_editor.html.erb +1 -2
- data/app/views/admin/pages/_visual_editor.html.erb +2 -1
- data/app/views/admin/pages/index.html.erb +1 -1
- data/app/views/admin/settings/feedback.html.erb +2 -1
- data/app/views/admin/tags/edit.html.erb +1 -1
- data/app/views/articles/_article.html.erb +17 -13
- data/app/views/articles/_article_content.html.erb +1 -0
- data/app/views/articles/_comment_box.html.erb +1 -1
- data/app/views/articles/_password_form.html.erb +10 -0
- data/app/views/articles/groupings.html.erb +1 -1
- data/app/views/articles/index.html.erb +1 -2
- data/app/views/articles/read.html.erb +1 -4
- data/app/views/articles/search.html.erb +1 -1
- data/app/views/layouts/administration.html.erb +1 -1
- data/app/views/shared/_search.html.erb +1 -1
- data/config/ckeditor.yml +14 -0
- data/config/environment.rb +13 -25
- data/config/environments/test.rb +1 -3
- data/config/filemanager.yml +16 -0
- data/config/initializers/access_rules.rb +5 -0
- data/config/routes.rb +5 -1
- data/db/migrate/004_add_sidebars.rb +3 -9
- data/db/migrate/089_drop_cache_information_table.rb +31 -0
- data/db/migrate/090_remove_keywords_from_posts.rb +9 -0
- data/db/migrate/091_adds_password_protection_to_posts.rb +9 -0
- data/doc/CACHE.SETUP.README +36 -0
- data/lang/de_DE.rb +6 -1
- data/lang/pl_PL.rb +221 -89
- data/lib/filemanager.rb +53 -0
- data/lib/filemanager/controller.rb +217 -0
- data/lib/i18n_interpolation_deprecation.rb +26 -0
- data/lib/rails_patch/active_support.rb +4 -0
- data/lib/tasks/release.rake +4 -131
- data/lib/typo_version.rb +1 -1
- data/public/.htaccess +6 -5
- data/public/filemanager/images/avi.gif +0 -0
- data/public/filemanager/images/box.gif +0 -0
- data/public/filemanager/images/bullet.gif +0 -0
- data/public/filemanager/images/close.gif +0 -0
- data/public/filemanager/images/closelabel.gif +0 -0
- data/public/filemanager/images/doc.gif +0 -0
- data/public/filemanager/images/donate-button.gif +0 -0
- data/public/filemanager/images/download-icon.gif +0 -0
- data/public/filemanager/images/folder.gif +0 -0
- data/public/filemanager/images/gif.gif +0 -0
- data/public/filemanager/images/htm.gif +0 -0
- data/public/filemanager/images/html.gif +0 -0
- data/public/filemanager/images/image-1.jpg +0 -0
- data/public/filemanager/images/image.gif +0 -0
- data/public/filemanager/images/jpg.gif +0 -0
- data/public/filemanager/images/loading.gif +0 -0
- data/public/filemanager/images/mov.gif +0 -0
- data/public/filemanager/images/nextlabel.gif +0 -0
- data/public/filemanager/images/pdf.gif +0 -0
- data/public/filemanager/images/png.gif +0 -0
- data/public/filemanager/images/ppt.gif +0 -0
- data/public/filemanager/images/prevlabel.gif +0 -0
- data/public/filemanager/images/rar.gif +0 -0
- data/public/filemanager/images/rm.gif +0 -0
- data/public/filemanager/images/rmvb.gif +0 -0
- data/public/filemanager/images/separator.gif +0 -0
- data/public/filemanager/images/spacer.gif +0 -0
- data/public/filemanager/images/swf.gif +0 -0
- data/public/filemanager/images/thumb-1.jpg +0 -0
- data/public/filemanager/images/tool_copy.gif +0 -0
- data/public/filemanager/images/tool_cut.gif +0 -0
- data/public/filemanager/images/tool_del.gif +0 -0
- data/public/filemanager/images/tool_folder.gif +0 -0
- data/public/filemanager/images/tool_imagemanager.gif +0 -0
- data/public/filemanager/images/tool_new.gif +0 -0
- data/public/filemanager/images/tool_paste.gif +0 -0
- data/public/filemanager/images/tool_props.gif +0 -0
- data/public/filemanager/images/tool_refresh.gif +0 -0
- data/public/filemanager/images/tool_unzip.gif +0 -0
- data/public/filemanager/images/tool_upload.gif +0 -0
- data/public/filemanager/images/tool_zip.gif +0 -0
- data/public/filemanager/images/txt.gif +0 -0
- data/public/filemanager/images/unknown.gif +0 -0
- data/public/filemanager/images/wmv.gif +0 -0
- data/public/filemanager/images/xls.gif +0 -0
- data/public/filemanager/images/zip.gif +0 -0
- data/public/filemanager/javascripts/filemanager.js +6 -0
- data/public/filemanager/javascripts/lang/en.js +31 -0
- data/public/filemanager/javascripts/lang/zh_CN.js +31 -0
- data/public/filemanager/javascripts/lightbox.js +497 -0
- data/public/filemanager/javascripts/translate.js +42 -0
- data/public/filemanager/resources/resources.txt +1 -0
- data/public/filemanager/stylesheets/filelist.css +147 -0
- data/public/filemanager/stylesheets/general.css +135 -0
- data/public/filemanager/stylesheets/lightbox.css +27 -0
- data/public/javascripts/prototype_ext.js +117 -0
- data/public/stylesheets/administration.css +19 -2
- data/themes/dirtylicious/views/articles/_article.html.erb +16 -12
- data/themes/dirtylicious/views/articles/_article_content.html.erb +1 -0
- data/themes/dirtylicious/views/articles/_password_form.html.erb +10 -0
- data/themes/scribbish/views/articles/_article.html.erb +18 -14
- data/themes/scribbish/views/articles/_article_content.html.erb +1 -0
- data/themes/scribbish/views/articles/_password_form.html.erb +10 -0
- data/themes/standard_issue/views/articles/_article.html.erb +16 -12
- data/themes/standard_issue/views/articles/_article_content.html.erb +1 -0
- data/themes/standard_issue/views/articles/_password_form.html.erb +10 -0
- data/themes/true-blue-3/helpers/theme_helper.rb +2 -2
- data/themes/true-blue-3/images/submit_form.jpg +0 -0
- data/themes/true-blue-3/stylesheets/style.css +27 -3
- data/themes/true-blue-3/views/articles/_article.html.erb +13 -8
- data/themes/true-blue-3/views/articles/_article_content.html.erb +1 -0
- data/themes/true-blue-3/views/articles/_comment_form.html.erb +1 -1
- data/themes/true-blue-3/views/articles/_password_form.html.erb +10 -0
- data/themes/true-blue-3/views/categories/_article.html.erb +5 -0
- data/themes/true-blue-3/views/tags/_article.html.erb +4 -0
- data/themes/typographic/views/articles/_article.html.erb +16 -12
- data/themes/typographic/views/articles/_article_content.html.erb +1 -0
- data/themes/typographic/views/articles/_password_form.html.erb +10 -0
- data/vendor/plugins/easy-ckeditor/app/controllers/ckeditor_controller.rb +2 -1
- data/vendor/plugins/easy-ckeditor/lib/ckeditor.rb +1 -20
- data/vendor/plugins/easy-ckeditor/{tasks → lib/tasks}/ckeditor_tasks.rake +0 -0
- data/vendor/plugins/filemanager/app/controllers/fm/filemanager_controller.rb +22 -0
- data/vendor/plugins/filemanager/app/views/fm/filemanager/index.html.erb +512 -0
- data/vendor/plugins/filemanager/app/views/fm/filemanager/view.html.erb +67 -0
- data/vendor/plugins/filemanager/filemanager.yml +16 -0
- data/vendor/plugins/static_sidebar/lib/static_sidebar.rb +4 -2
- data/vendor/plugins/typo_converter/{tasks → lib/tasks}/typo_converters_tasks.rake +0 -0
- data/vendor/plugins/typo_login_system/lib/access_control.rb +24 -1
- data/vendor/plugins/typo_textfilter_code/{tasks → lib/tasks}/typo_textfilter_code_tasks.rake +0 -0
- data/vendor/plugins/typo_textfilter_code/lib/typo_textfilter_code.rb +4 -3
- data/vendor/plugins/typo_textfilter_flickr/{tasks → lib/tasks}/typo_textfilter_flickr_tasks.rake +0 -0
- data/vendor/plugins/typo_textfilter_htmlfilter/{tasks → lib/tasks}/typo_textfilter_htmlfilter_tasks.rake +0 -0
- data/vendor/plugins/typo_textfilter_lightbox/{tasks → lib/tasks}/typo_textfilter_lightbox_tasks.rake +0 -0
- data/vendor/plugins/typo_textfilter_markdown/{tasks → lib/tasks}/typo_textfilter_markdown_tasks.rake +0 -0
- data/vendor/plugins/typo_textfilter_none/{tasks → lib/tasks}/typo_textfilter_none_tasks.rake +0 -0
- data/vendor/plugins/typo_textfilter_smartypants/{tasks → lib/tasks}/typo_textfilter_smartypants_tasks.rake +0 -0
- data/vendor/plugins/typo_textfilter_textile/{tasks → lib/tasks}/typo_textfilter_textile_tasks.rake +0 -0
- data/vendor/plugins/typo_textfilter_textile_and_markdown/{tasks → lib/tasks}/typo_textfilter_textile_and_markdown_tasks.rake +0 -0
- data/vendor/plugins/xml_sidebar/views/content.rhtml +1 -1
- metadata +190 -195
- data/app/controllers/admin/cache_controller.rb +0 -9
- data/app/models/cache_information.rb +0 -19
- data/db/schema.rb +0 -242
- data/doc/test_themes.rb +0 -50
- data/public/javascripts/ckeditor/config.js +0 -27
- data/spec/controllers/accounts_controller_spec.rb +0 -414
- data/spec/controllers/admin/cache_controller_spec.rb +0 -18
- data/spec/controllers/admin/categories_controller_spec.rb +0 -73
- data/spec/controllers/admin/content_controller_spec.rb +0 -443
- data/spec/controllers/admin/dashboard_controller_spec.rb +0 -13
- data/spec/controllers/admin/feedback_controller_spec.rb +0 -308
- data/spec/controllers/admin/pages_controller_spec.rb +0 -80
- data/spec/controllers/admin/profiles_controller_spec.rb +0 -22
- data/spec/controllers/admin/resources_controller_spec.rb +0 -53
- data/spec/controllers/admin/settings_controller_spec.rb +0 -80
- data/spec/controllers/admin/tags_controller_spec.rb +0 -64
- data/spec/controllers/admin/textfilters_controller_spec.rb +0 -20
- data/spec/controllers/admin/themes_controller_spec.rb +0 -30
- data/spec/controllers/admin/users_controller_spec.rb +0 -109
- data/spec/controllers/application_controller_spec.rb +0 -18
- data/spec/controllers/articles_controller_spec.rb +0 -440
- data/spec/controllers/authors_controller_spec.rb +0 -42
- data/spec/controllers/backend_controller_spec.rb +0 -337
- data/spec/controllers/categories_controller_spec.rb +0 -117
- data/spec/controllers/comments_controller_spec.rb +0 -137
- data/spec/controllers/routes/articles_routing_spec.rb +0 -31
- data/spec/controllers/routes/xml_routing_spec.rb +0 -71
- data/spec/controllers/setup_controller_spec.rb +0 -24
- data/spec/controllers/tags_controller_spec.rb +0 -147
- data/spec/controllers/textfilter_controller_spec.rb +0 -192
- data/spec/controllers/theme_controller_spec.rb +0 -39
- data/spec/controllers/xml_controller_spec.rb +0 -185
- data/spec/factories.rb +0 -69
- data/spec/helpers/application_helper_spec.rb +0 -25
- data/spec/helpers/content_helper_spec.rb +0 -28
- data/spec/lib/text_filter_plugin_spec.rb +0 -15
- data/spec/models/amazon_sidebar_spec.rb +0 -40
- data/spec/models/article_closing_spec.rb +0 -42
- data/spec/models/article_spec.rb +0 -515
- data/spec/models/blog_spec.rb +0 -116
- data/spec/models/cache_information_spec.rb +0 -42
- data/spec/models/cache_support_spec.rb +0 -51
- data/spec/models/category_spec.rb +0 -44
- data/spec/models/comment_spec.rb +0 -240
- data/spec/models/configuration_spec.rb +0 -91
- data/spec/models/content_state/feedback_states_spec.rb +0 -64
- data/spec/models/notification_spec.rb +0 -8
- data/spec/models/page_cache_spec.rb +0 -30
- data/spec/models/page_spec.rb +0 -91
- data/spec/models/ping_pinger_spec.rb +0 -33
- data/spec/models/ping_spec.rb +0 -154
- data/spec/models/redirect_spec.rb +0 -17
- data/spec/models/resource_spec.rb +0 -39
- data/spec/models/route_cache_spec.rb +0 -11
- data/spec/models/sidebar_spec.rb +0 -7
- data/spec/models/static_sidebar_spec.rb +0 -17
- data/spec/models/tag_spec.rb +0 -65
- data/spec/models/text_filter_spec.rb +0 -34
- data/spec/models/theme_spec.rb +0 -45
- data/spec/models/trackback_spec.rb +0 -60
- data/spec/models/trigger_spec.rb +0 -40
- data/spec/models/user_spec.rb +0 -198
- data/spec/rcov.opts +0 -2
- data/spec/spec.opts +0 -4
- data/spec/spec_helper.rb +0 -133
- data/spec/views/articles/index_spec.rb +0 -63
- data/spec/views/articles/read_spec.rb +0 -67
- data/spec/views/comments/html_sanitization_spec.rb +0 -119
- data/test/fixtures/blogs.yml +0 -27
- data/test/fixtures/categories.yml +0 -29
- data/test/fixtures/categorizations.yml +0 -31
- data/test/fixtures/contents.yml +0 -231
- data/test/fixtures/feedback.yml +0 -180
- data/test/fixtures/notification_mailer/article +0 -3
- data/test/fixtures/notification_mailer/comment +0 -3
- data/test/fixtures/notification_mailer/trackback +0 -3
- data/test/fixtures/notifications.yml +0 -0
- data/test/fixtures/page_caches.yml +0 -7
- data/test/fixtures/profiles.yml +0 -27
- data/test/fixtures/redirects.yml +0 -10
- data/test/fixtures/resources.yml +0 -21
- data/test/fixtures/sidebars.yml +0 -10
- data/test/fixtures/tags.yml +0 -10
- data/test/fixtures/text_filters.yml +0 -37
- data/test/fixtures/triggers.yml +0 -1
- data/test/fixtures/users.yml +0 -101
- data/test/mocks/test/dns_mock.rb +0 -13
- data/test/mocks/test/flickr_mock.rb +0 -30
- data/test/mocks/test/http_mock.rb +0 -39
- data/test/mocks/test/theme_mock.rb +0 -5
- data/test/mocks/test/xmlrpc_mock.rb +0 -28
- data/test/mocks/themes/123-numbers-in-path/about.markdown +0 -0
- data/test/mocks/themes/CamelCaseDirectory/about.markdown +0 -0
- data/test/mocks/themes/i-have-special-chars/about.markdown +0 -0
- data/test/mocks/themes/typographic/about.markdown +0 -7
- data/test/mocks/themes/typographic/images/Thumbs.db +0 -0
- data/test/mocks/themes/typographic/images/accept.png +0 -0
- data/test/mocks/themes/typographic/images/accept50.png +0 -0
- data/test/mocks/themes/typographic/images/bg_body.jpg +0 -0
- data/test/mocks/themes/typographic/images/bg_white.png +0 -0
- data/test/mocks/themes/typographic/images/bg_wrapper.jpg +0 -0
- data/test/mocks/themes/typographic/images/bullet_bottom.png +0 -0
- data/test/mocks/themes/typographic/images/bullet_right.png +0 -0
- data/test/mocks/themes/typographic/images/email_open.png +0 -0
- data/test/mocks/themes/typographic/images/email_open50.png +0 -0
- data/test/mocks/themes/typographic/images/meta.png +0 -0
- data/test/mocks/themes/typographic/images/page_edit.png +0 -0
- data/test/mocks/themes/typographic/images/page_edit50.png +0 -0
- data/test/mocks/themes/typographic/images/tag.png +0 -0
- data/test/mocks/themes/typographic/images/user.png +0 -0
- data/test/mocks/themes/typographic/images/user50.png +0 -0
- data/test/mocks/themes/typographic/images/world_link.png +0 -0
- data/test/mocks/themes/typographic/images/world_link50.png +0 -0
- data/test/mocks/themes/typographic/layouts/default.html.erb +0 -42
- data/test/mocks/themes/typographic/preview.png +0 -0
- data/test/mocks/themes/typographic/stylesheets/colors.css +0 -51
- data/test/mocks/themes/typographic/stylesheets/layout.css +0 -346
- data/test/mocks/themes/typographic/stylesheets/reset.css +0 -5
- data/test/mocks/themes/typographic/stylesheets/style.css +0 -36
- data/test/mocks/themes/typographic/views/articles/_article.html.erb +0 -41
- data/test/mocks/themes/typographic/views/articles/_comment.html.erb +0 -14
- data/test/mocks/themes/typographic/views/articles/_comment_form.html.erb +0 -48
- data/test/mocks/themes/typographic/views/articles/_comment_list.html.erb +0 -7
- data/test/mocks/themes/typographic/views/articles/_trackback.html.erb +0 -9
- data/test/mocks/themes/typographic/views/articles/comment_preview.html.erb +0 -10
- data/test/mocks/themes/typographic/views/articles/index.html.erb +0 -5
- data/test/mocks/themes/typographic/views/articles/read.html.erb +0 -42
- data/test/mocks/themes/typographic/views/shared/_search.html.erb +0 -17
- data/test/mocks/themes/typographic/views/theme/static_view_test.html.erb +0 -1
- data/test/test_helper.rb +0 -13
- data/themes/true-blue-3/images/frederic-de-villamil.jpg +0 -0
- data/themes/true-blue-3/images/textarea_bg.jpg +0 -0
@@ -512,7 +512,7 @@ div.setting { float: left; margin-bottom: 12px;}
|
|
512
512
|
|
513
513
|
/* Form */
|
514
514
|
.float { display: block; float: left; width: 200px; line-height: 20px; }
|
515
|
-
.large { width:
|
515
|
+
.large { width: 99%; }
|
516
516
|
.medium { width: 300px;}
|
517
517
|
p.settings { width: 530px; text-align: right; }
|
518
518
|
.input_text input, .input_text textarea { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
|
@@ -658,4 +658,21 @@ td.paginate {
|
|
658
658
|
margin-left: 4%;
|
659
659
|
}
|
660
660
|
|
661
|
-
.target { cursor: move;}
|
661
|
+
.target { cursor: move;}
|
662
|
+
|
663
|
+
#header {
|
664
|
+
float: left;
|
665
|
+
width: 70%;
|
666
|
+
}
|
667
|
+
|
668
|
+
#logout {
|
669
|
+
display: block;
|
670
|
+
width: 28%;
|
671
|
+
margin-left: 70%;
|
672
|
+
text-align: right;
|
673
|
+
padding-top: 10px;
|
674
|
+
}
|
675
|
+
|
676
|
+
#container {
|
677
|
+
clear: both;
|
678
|
+
}
|
@@ -9,22 +9,26 @@
|
|
9
9
|
</div>
|
10
10
|
|
11
11
|
<div class="content">
|
12
|
-
<%
|
13
|
-
<%
|
14
|
-
|
12
|
+
<% if article.password.nil? or article.password.empty? %>
|
13
|
+
<% unless controller.action_name == 'redirect' %>
|
14
|
+
<% if article.excerpt? %>
|
15
|
+
<%= article.excerpt %>
|
16
|
+
<% else %>
|
17
|
+
<%= article.html(:body) %>
|
18
|
+
<% if article.extended? %>
|
19
|
+
<div class="extended">
|
20
|
+
<p><%= link_to_permalink article, _("Continue reading") + "..." %></p>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
15
24
|
<% else %>
|
16
25
|
<%= article.html(:body) %>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
</div>
|
21
|
-
<% end %>
|
26
|
+
<div class="extended">
|
27
|
+
<%= article.html(:extended) %>
|
28
|
+
</div>
|
22
29
|
<% end %>
|
23
30
|
<% else %>
|
24
|
-
<%=
|
25
|
-
<div class="extended">
|
26
|
-
<%= article.html(:extended) %>
|
27
|
-
</div>
|
31
|
+
<%= render :partial => 'articles/password_form', :locals => { :article => article } %>
|
28
32
|
<% end %>
|
29
33
|
</div>
|
30
34
|
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= @article.html(:all) %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div id='content-<%= article.id %>'>
|
2
|
+
<p>This post is password protected. Please fill in your password or login to view the content</p>
|
3
|
+
<% remote_form_for :articles, article, :url => { :action => 'check_password'}, :update => "content-#{article.id}" do |f| %>
|
4
|
+
<%= password_field(:article, :password) %>
|
5
|
+
<input type='hidden' name='article[id]' value='<%= article.id %>' />
|
6
|
+
<%= submit_to_remote('check_password', _('Submit') + '!',
|
7
|
+
:update => "content-#{article.id}",
|
8
|
+
:url => {:action => 'check_password'}) %>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
@@ -10,23 +10,27 @@
|
|
10
10
|
</p>
|
11
11
|
|
12
12
|
<div class="content">
|
13
|
-
<%
|
14
|
-
<%
|
15
|
-
|
13
|
+
<% if article.password.nil? or article.password.empty? %>
|
14
|
+
<% unless controller.action_name == 'redirect' %>
|
15
|
+
<% if article.excerpt? %>
|
16
|
+
<%= article.excerpt %>
|
17
|
+
<% else %>
|
18
|
+
<%= article.html(:body) %>
|
19
|
+
<% if article.extended? %>
|
20
|
+
<div class="extended">
|
21
|
+
<p><%= link_to_permalink article,"Continue reading..." %></p>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
16
25
|
<% else %>
|
17
26
|
<%= article.html(:body) %>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
27
|
+
<div class="extended">
|
28
|
+
<%= article.html(:extended) %>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
<% else %>
|
32
|
+
<%= render :partial => 'articles/password_form', :locals => { :article => article } %>
|
23
33
|
<% end %>
|
24
|
-
<% else %>
|
25
|
-
<%= article.html(:body) %>
|
26
|
-
<div class="extended">
|
27
|
-
<%= article.html(:extended) %>
|
28
|
-
</div>
|
29
|
-
<% end %>
|
30
34
|
</div>
|
31
35
|
|
32
36
|
<ul class="meta">
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= @article.html(:all) %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div id='content-<%= article.id %>'>
|
2
|
+
<p>This post is password protected. Please fill in your password or login to view the content</p>
|
3
|
+
<% remote_form_for :articles, article, :url => { :action => 'check_password'}, :update => "content-#{article.id}" do |f| %>
|
4
|
+
<%= password_field(:article, :password) %>
|
5
|
+
<input type='hidden' name='article[id]' value='<%= article.id %>' />
|
6
|
+
<%= submit_to_remote('check_password', _('Submit') + '!',
|
7
|
+
:update => "content-#{article.id}",
|
8
|
+
:url => {:action => 'check_password'}) %>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
@@ -1,22 +1,26 @@
|
|
1
1
|
<div class="atomentry" id="article-<%= article.id %>">
|
2
2
|
<h2 class="title"><%= (controller.action_name.include? 'permalink') ? article.title : link_to_permalink(article,article.title) %></h2>
|
3
3
|
<div class="content">
|
4
|
-
<%
|
5
|
-
<%
|
6
|
-
|
4
|
+
<% if article.password.nil? or article.password.empty? %>
|
5
|
+
<% unless controller.action_name == 'redirect' %>
|
6
|
+
<% if article.excerpt? %>
|
7
|
+
<%= article.excerpt %>
|
8
|
+
<% else %>
|
9
|
+
<%= article.html(:body) %>
|
10
|
+
<% if article.extended? %>
|
11
|
+
<div class="extended">
|
12
|
+
<p><%= link_to_permalink article,"Continue reading..." %></p>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
7
16
|
<% else %>
|
8
17
|
<%= article.html(:body) %>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
</div>
|
13
|
-
<% end %>
|
18
|
+
<div class="extended">
|
19
|
+
<%= article.html(:extended) %>
|
20
|
+
</div>
|
14
21
|
<% end %>
|
15
22
|
<% else %>
|
16
|
-
<%=
|
17
|
-
<div class="extended">
|
18
|
-
<%= article.html(:extended) %>
|
19
|
-
</div>
|
23
|
+
<%= render :partial => 'articles/password_form', :locals => { :article => article } %>
|
20
24
|
<% end %>
|
21
25
|
</div>
|
22
26
|
<div class="meta">
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= @article.html(:all) %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div id='content-<%= article.id %>'>
|
2
|
+
<p>This post is password protected. Please fill in your password or login to view the content</p>
|
3
|
+
<% remote_form_for :articles, article, :url => { :action => 'check_password'}, :update => "content-#{article.id}" do |f| %>
|
4
|
+
<%= password_field(:article, :password) %>
|
5
|
+
<input type='hidden' name='article[id]' value='<%= article.id %>' />
|
6
|
+
<%= submit_to_remote('check_password', _('Submit') + '!',
|
7
|
+
:update => "content-#{article.id}",
|
8
|
+
:url => {:action => 'check_password'}) %>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
@@ -69,10 +69,10 @@ def category_name(id)
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def display_comments_counter(article)
|
72
|
-
pluralize(article.published_comments.size,
|
72
|
+
link_to pluralize(article.published_comments.size,
|
73
73
|
_('%d comments', article.published_comments.size),
|
74
74
|
_('%d comment', article.published_comments.size),
|
75
|
-
_('%d comments', article.published_comments.size))
|
75
|
+
_('%d comments', article.published_comments.size)), article.permalink_url
|
76
76
|
end
|
77
77
|
|
78
78
|
def show_pages_links
|
Binary file
|
@@ -210,6 +210,10 @@ a {
|
|
210
210
|
|
211
211
|
}
|
212
212
|
|
213
|
+
.comments a {
|
214
|
+
color: #fb7c00;
|
215
|
+
}
|
216
|
+
|
213
217
|
#external {
|
214
218
|
position: absolute;
|
215
219
|
top: 55px;
|
@@ -435,7 +439,6 @@ img.gravatar {
|
|
435
439
|
}
|
436
440
|
|
437
441
|
p.comment {
|
438
|
-
background: url('../../images/theme/bg_input.jpg') left no-repeat;
|
439
442
|
padding: 10px 3px 0 5px;
|
440
443
|
width: 230;
|
441
444
|
height: 30px;
|
@@ -444,10 +447,14 @@ p.comment {
|
|
444
447
|
#comment_author,
|
445
448
|
#comment_email,
|
446
449
|
#comment_url {
|
447
|
-
|
450
|
+
padding: 10px 3px 0 5px;
|
448
451
|
border: none;
|
449
452
|
font: 13px/20px "Lucida Sans Unicode", "Lucida Grande", Arial, sans-serif;
|
450
453
|
width: 290px;
|
454
|
+
border: #000 1px solid;
|
455
|
+
-moz-border-radius: 5px;
|
456
|
+
moz-border-radius: 5px;
|
457
|
+
-webkit-border-radius: 5px;
|
451
458
|
}
|
452
459
|
|
453
460
|
#comment_body {
|
@@ -455,10 +462,13 @@ p.comment {
|
|
455
462
|
font: 13px/20px "Lucida Sans Unicode", "Lucida Grande", Arial, sans-serif;
|
456
463
|
width: 640px;
|
457
464
|
height: 175px;
|
465
|
+
border: #000 1px solid;
|
466
|
+
-moz-border-radius: 5px;
|
467
|
+
moz-border-radius: 5px;
|
468
|
+
-webkit-border-radius: 5px;
|
458
469
|
}
|
459
470
|
|
460
471
|
p.body {
|
461
|
-
background: url('../../images/theme/textarea_bg.jpg') left no-repeat;
|
462
472
|
padding: 10px 5px;
|
463
473
|
}
|
464
474
|
|
@@ -553,3 +563,17 @@ a#carousel-previous {
|
|
553
563
|
#carousel-next {
|
554
564
|
right: 0;
|
555
565
|
}
|
566
|
+
|
567
|
+
#form-submit-button {
|
568
|
+
border: #d46900 1px solid;
|
569
|
+
background: url("../../images/theme/submit_form.jpg") bottom left repeat-x #fe9e3f;
|
570
|
+
color: #fff;
|
571
|
+
-moz-border-radius: 4px;
|
572
|
+
moz-border-radius: 4px;
|
573
|
+
border-radius: 4px;
|
574
|
+
-webkit-border-radius: 4px;
|
575
|
+
font: 14px/14px "Lucida Sans Unicode", "Lucida Grande", Arial, sans-serif;
|
576
|
+
text-transform: capitalize;
|
577
|
+
padding: 10px 15px;
|
578
|
+
|
579
|
+
}
|
@@ -1,17 +1,22 @@
|
|
1
1
|
<div class='category-excerpt <%= "border" if @article_counter >= 0 %>' id="article-<%= article.id %>">
|
2
2
|
<h2><%= (controller.controller_name == 'redirect') ? article.title : link_to_permalink(article,article.title) %></h2>
|
3
|
-
<%
|
4
|
-
<%
|
5
|
-
|
3
|
+
<% if article.password.nil? or article.password.empty? %>
|
4
|
+
<% unless controller.action_name == 'redirect' %>
|
5
|
+
<% if article.excerpt? %>
|
6
|
+
<%= article.excerpt %>
|
7
|
+
<% else %>
|
8
|
+
<%= article.html(:body) %>
|
9
|
+
<% end %>
|
6
10
|
<% else %>
|
7
11
|
<%= article.html(:body) %>
|
12
|
+
<% if article.extended? %>
|
13
|
+
<%= article.html(:extended) %>
|
14
|
+
<% end %>
|
8
15
|
<% end %>
|
9
|
-
|
10
|
-
|
11
|
-
<% if article.extended? %>
|
12
|
-
<%= article.html(:extended) %>
|
16
|
+
<% else %>
|
17
|
+
<%= render :partial => 'articles/password_form', :locals => { :article => article } %>
|
13
18
|
<% end %>
|
14
|
-
|
19
|
+
|
15
20
|
<div class='author'>
|
16
21
|
Published on <%= _(article.published_at.utc.strftime(_("%%a, %%d %%b %%Y %%H:%%M", article.published_at.utc))) %>
|
17
22
|
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= @article.html(:all) %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<%= text_area 'comment', 'body' %>
|
18
18
|
</p>
|
19
19
|
<p class='comment_submit'>
|
20
|
-
<input type='
|
20
|
+
<input type='submit' id='form-submit-button' value="<%= _('comment') %>" />
|
21
21
|
</p>
|
22
22
|
</div>
|
23
23
|
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div id='content-<%= article.id %>'>
|
2
|
+
<p>This post is password protected. Please fill in your password or login to view the content</p>
|
3
|
+
<% remote_form_for :articles, article, :url => { :action => 'check_password'}, :update => "content-#{article.id}" do |f| %>
|
4
|
+
<%= password_field(:article, :password) %>
|
5
|
+
<input type='hidden' name='article[id]' value='<%= article.id %>' />
|
6
|
+
<%= submit_to_remote('check_password', _('Submit') + '!',
|
7
|
+
:update => "content-#{article.id}",
|
8
|
+
:url => {:action => 'check_password'}) %>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<div class='category-excerpt <%= "border" if @article_counter >= 0 %>' id="article-<%= article.id %>">
|
2
2
|
<h2><%= link_to_permalink(article, article.title) %></h2>
|
3
|
+
<% if article.password.nil? or article.password.empty? %>
|
3
4
|
<% if article.excerpt? %>
|
4
5
|
<%= article.excerpt %>
|
5
6
|
<% else %>
|
@@ -11,6 +12,10 @@
|
|
11
12
|
<%= article.html(:extended) %>
|
12
13
|
<% end %>
|
13
14
|
<% end %>
|
15
|
+
<% else %>
|
16
|
+
<%= render :partial => 'articles/password_form', :locals => { :article => article } %>
|
17
|
+
<% end %>
|
18
|
+
|
14
19
|
<div class='author'>
|
15
20
|
Published on <%= _(article.published_at.utc.strftime(_("%%a, %%d %%b %%Y %%H:%%M", article.published_at.utc))) %>
|
16
21
|
</div>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<div class='category-excerpt <%= "border" if @article_counter >= 0 %>' id="article-<%= article.id %>">
|
2
2
|
<h2><%= (controller.controller_name == 'redirect') ? article.title : link_to_permalink(article,article.title) %></h2>
|
3
|
+
<% if article.password.nil? or article.password.empty? %>
|
3
4
|
<% if article.excerpt? %>
|
4
5
|
<%= article.excerpt %>
|
5
6
|
<% else %>
|
@@ -11,6 +12,9 @@
|
|
11
12
|
<%= article.html(:extended) %>
|
12
13
|
<% end %>
|
13
14
|
<% end %>
|
15
|
+
<% else %>
|
16
|
+
<%= render :partial => 'articles/password_form', :locals => { :article => article } %>
|
17
|
+
<% end %>
|
14
18
|
<div class='author'>
|
15
19
|
Published on <%= _(article.published_at.utc.strftime(_("%%a, %%d %%b %%Y %%H:%%M", article.published_at.utc))) %>
|
16
20
|
</div>
|
@@ -6,22 +6,26 @@
|
|
6
6
|
</div>
|
7
7
|
</div>
|
8
8
|
<div class="content">
|
9
|
-
<%
|
10
|
-
<%
|
11
|
-
|
9
|
+
<% if article.password.nil? or article.password.empty? %>
|
10
|
+
<% unless controller.action_name == 'redirect' %>
|
11
|
+
<% if article.excerpt? %>
|
12
|
+
<%= article.excerpt %>
|
13
|
+
<% else %>
|
14
|
+
<%= article.html(:body) %>
|
15
|
+
<% if article.extended? %>
|
16
|
+
<div class="extended">
|
17
|
+
<p><%= link_to_permalink article,"Continue reading..." %></p>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
<% end %>
|
12
21
|
<% else %>
|
13
22
|
<%= article.html(:body) %>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
</div>
|
18
|
-
<% end %>
|
23
|
+
<div class="extended">
|
24
|
+
<%= article.html(:extended) %>
|
25
|
+
</div>
|
19
26
|
<% end %>
|
20
27
|
<% else %>
|
21
|
-
<%=
|
22
|
-
<div class="extended">
|
23
|
-
<%= article.html(:extended) %>
|
24
|
-
</div>
|
28
|
+
<%= render :partial => 'articles/password_form', :locals => { :article => article } %>
|
25
29
|
<% end %>
|
26
30
|
</div>
|
27
31
|
<% if controller.controller_name == "articles" and controller.action_name == "redirect" %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= @article.html(:all) %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div id='content-<%= article.id %>'>
|
2
|
+
<p>This post is password protected. Please fill in your password or login to view the content</p>
|
3
|
+
<% remote_form_for :articles, article, :url => { :action => 'check_password'}, :update => "content-#{article.id}" do |f| %>
|
4
|
+
<%= password_field(:article, :password) %>
|
5
|
+
<input type='hidden' name='article[id]' value='<%= article.id %>' />
|
6
|
+
<%= submit_to_remote('check_password', _('Submit') + '!',
|
7
|
+
:update => "content-#{article.id}",
|
8
|
+
:url => {:action => 'check_password'}) %>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
@@ -12,6 +12,7 @@ class CkeditorController < ActionController::Base
|
|
12
12
|
"image/pjpeg",
|
13
13
|
"image/gif",
|
14
14
|
"image/png",
|
15
|
+
"image/x-png",
|
15
16
|
"application/x-shockwave-flash"
|
16
17
|
]
|
17
18
|
|
@@ -104,7 +105,7 @@ class CkeditorController < ActionController::Base
|
|
104
105
|
<html>
|
105
106
|
<body>
|
106
107
|
<script type="text/javascript">
|
107
|
-
window.parent.CKEDITOR.tools.callFunction(
|
108
|
+
window.parent.CKEDITOR.tools.callFunction(#{params[:CKEditorFuncNum]}, "#{uploaded_file_path}");
|
108
109
|
</script>
|
109
110
|
</body>
|
110
111
|
</html>'
|
@@ -12,7 +12,7 @@ module Ckeditor
|
|
12
12
|
PLUGIN_CONTROLLER_PATH = "#{PLUGIN_PATH}/app/controllers"
|
13
13
|
PLUGIN_VIEWS_PATH = "#{PLUGIN_PATH}/app/views"
|
14
14
|
PLUGIN_HELPER_PATH = "#{PLUGIN_PATH}/app/helpers"
|
15
|
-
PLUGIN_FILE_MANAGER_URI = ''
|
15
|
+
PLUGIN_FILE_MANAGER_URI = '/fm/filemanager'
|
16
16
|
PLUGIN_FILE_MANAGER_UPLOAD_URI = '/ckeditor/upload'
|
17
17
|
|
18
18
|
module Helper
|
@@ -91,22 +91,3 @@ module Ckeditor
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
end
|
94
|
-
|
95
|
-
include ActionView
|
96
|
-
module ActionView::Helpers::AssetTagHelper
|
97
|
-
alias_method :rails_javascript_include_tag, :javascript_include_tag
|
98
|
-
|
99
|
-
# <%= javascript_include_tag :defaults, :ckeditor %>
|
100
|
-
def javascript_include_tag(*sources)
|
101
|
-
main_sources, application_source = [], []
|
102
|
-
if sources.include?(:ckeditor)
|
103
|
-
sources.delete(:ckeditor)
|
104
|
-
sources.push('ckeditor/ckeditor')
|
105
|
-
end
|
106
|
-
unless sources.empty?
|
107
|
-
main_sources = rails_javascript_include_tag(*sources).split("\n")
|
108
|
-
application_source = main_sources.pop if main_sources.last.include?('application.js')
|
109
|
-
end
|
110
|
-
[main_sources.join("\n"), application_source].join("\n")
|
111
|
-
end
|
112
|
-
end
|