typo 5.4.3 → 5.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. data/CHANGELOG +21 -8
  2. data/README +2 -2
  3. data/app/controllers/accounts_controller.rb +6 -10
  4. data/app/controllers/admin/content_controller.rb +2 -3
  5. data/app/controllers/admin/profiles_controller.rb +0 -1
  6. data/app/controllers/admin/resources_controller.rb +6 -20
  7. data/app/controllers/articles_controller.rb +5 -5
  8. data/app/controllers/setup_controller.rb +45 -0
  9. data/app/controllers/xml_controller.rb +0 -9
  10. data/app/helpers/admin/base_helper.rb +50 -33
  11. data/app/helpers/admin/categories_helper.rb +12 -0
  12. data/app/helpers/admin/feedback_helper.rb +10 -0
  13. data/app/helpers/application_helper.rb +13 -0
  14. data/app/models/blog.rb +0 -10
  15. data/app/models/content.rb +4 -3
  16. data/app/models/feedback.rb +1 -0
  17. data/app/models/feedback/states.rb +2 -1
  18. data/app/models/resource.rb +0 -26
  19. data/app/models/user.rb +2 -2
  20. data/app/views/accounts/confirm.html.erb +1 -16
  21. data/app/views/accounts/login.html.erb +9 -17
  22. data/app/views/accounts/recover_password.html.erb +5 -8
  23. data/app/views/accounts/signup.html.erb +1 -0
  24. data/app/views/admin/categories/_categories.html.erb +11 -3
  25. data/app/views/admin/categories/index.html.erb +6 -9
  26. data/app/views/admin/categories/reorder.html.erb +5 -3
  27. data/app/views/admin/content/_article_list.html.erb +9 -4
  28. data/app/views/admin/content/_drafts.html.erb +7 -5
  29. data/app/views/admin/content/_form.html.erb +91 -83
  30. data/app/views/admin/content/_images.html.erb +4 -0
  31. data/app/views/admin/content/_visual_editor.html.erb +1 -0
  32. data/app/views/admin/content/index.html.erb +35 -38
  33. data/app/views/admin/dashboard/_comments.html.erb +17 -12
  34. data/app/views/admin/dashboard/_inbound.html.erb +11 -4
  35. data/app/views/admin/dashboard/_overview.html.erb +18 -8
  36. data/app/views/admin/dashboard/_popular.html.erb +17 -12
  37. data/app/views/admin/dashboard/_posts.html.erb +18 -13
  38. data/app/views/admin/dashboard/_typo_dev.html.erb +10 -6
  39. data/app/views/admin/dashboard/_welcome.html.erb +17 -3
  40. data/app/views/admin/dashboard/index.html.erb +9 -16
  41. data/app/views/admin/feedback/_button.html.erb +7 -7
  42. data/app/views/admin/feedback/_form.html.erb +28 -28
  43. data/app/views/admin/feedback/_item.html.erb +10 -3
  44. data/app/views/admin/feedback/article.html.erb +6 -5
  45. data/app/views/admin/feedback/index.html.erb +35 -37
  46. data/app/views/admin/pages/_form.html.erb +30 -42
  47. data/app/views/admin/pages/_pages.html.erb +15 -34
  48. data/app/views/admin/pages/_visual_editor.html.erb +1 -0
  49. data/app/views/admin/pages/index.html.erb +13 -6
  50. data/app/views/admin/profiles/index.html.erb +6 -4
  51. data/app/views/admin/resources/_upload.html.erb +15 -8
  52. data/app/views/admin/resources/images.html.erb +1 -1
  53. data/app/views/admin/resources/index.html.erb +1 -17
  54. data/app/views/admin/settings/_submit.html.erb +1 -1
  55. data/app/views/admin/settings/feedback.html.erb +96 -91
  56. data/app/views/admin/settings/index.html.erb +74 -74
  57. data/app/views/admin/settings/seo.html.erb +67 -66
  58. data/app/views/admin/settings/update_database.html.erb +24 -24
  59. data/app/views/admin/settings/write.html.erb +24 -70
  60. data/app/views/admin/sidebar/_active.html.erb +9 -8
  61. data/app/views/admin/sidebar/_available.html.erb +5 -3
  62. data/app/views/admin/sidebar/index.html.erb +12 -12
  63. data/app/views/admin/themes/catalogue.html.erb +16 -3
  64. data/app/views/admin/themes/index.html.erb +23 -13
  65. data/app/views/admin/users/_form.html.erb +180 -175
  66. data/app/views/admin/users/edit.html.erb +4 -5
  67. data/app/views/admin/users/index.html.erb +4 -3
  68. data/app/views/admin/users/new.html.erb +5 -7
  69. data/app/views/layouts/accounts.html.erb +7 -9
  70. data/app/views/layouts/administration.html.erb +21 -27
  71. data/app/views/layouts/setup.html.erb +18 -0
  72. data/app/views/notification_mailer/notif_user.html.erb +14 -12
  73. data/app/views/setup/confirm.html.erb +1 -0
  74. data/app/views/setup/index.html.erb +17 -0
  75. data/app/views/shared/_confirm.html.erb +16 -0
  76. data/config/environment.rb +3 -2
  77. data/config/initializers/access_rules.rb +0 -1
  78. data/config/routes.rb +4 -3
  79. data/db/migrate/087_drop_blacklist_patterns.rb +14 -0
  80. data/db/migrate/088_drop_session_table.rb +14 -0
  81. data/db/schema.rb +29 -37
  82. data/doc/Installer.txt +3 -3
  83. data/lib/spam_protection.rb +0 -10
  84. data/lib/tasks/release.rake +1 -1
  85. data/lib/typo_version.rb +1 -1
  86. data/public/images/admin/ui-bg_diagonals-thick_90_eeeeee_40x40.png +0 -0
  87. data/public/images/admin/ui-bg_flat_15_cd0a0a_40x100.png +0 -0
  88. data/public/images/admin/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
  89. data/public/images/admin/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
  90. data/public/images/admin/ui-bg_highlight-hard_100_f2f5f7_1x100.png +0 -0
  91. data/public/images/admin/ui-bg_highlight-hard_70_000000_1x100.png +0 -0
  92. data/public/images/admin/ui-bg_highlight-soft_100_deedf7_1x100.png +0 -0
  93. data/public/images/admin/ui-bg_highlight-soft_25_ffef8f_1x100.png +0 -0
  94. data/public/images/admin/ui-bg_highlight-soft_50_116088_1x100.png +0 -0
  95. data/public/images/admin/ui-icons_2694e8_256x240.png +0 -0
  96. data/public/images/admin/ui-icons_2e83ff_256x240.png +0 -0
  97. data/public/images/admin/ui-icons_3d80b3_256x240.png +0 -0
  98. data/public/images/admin/ui-icons_72a7cf_256x240.png +0 -0
  99. data/public/images/admin/ui-icons_ffffff_256x240.png +0 -0
  100. data/public/javascripts/lightbox.js +2 -2
  101. data/public/stylesheets/accounts.css +119 -0
  102. data/public/stylesheets/administration.css +598 -625
  103. data/spec/controllers/accounts_controller_spec.rb +94 -12
  104. data/spec/controllers/admin/categories_controller_spec.rb +0 -11
  105. data/spec/controllers/admin/profiles_controller_spec.rb +2 -2
  106. data/spec/controllers/admin/resources_controller_spec.rb +15 -2
  107. data/spec/controllers/articles_controller_spec.rb +27 -0
  108. data/spec/controllers/routes/xml_routing_spec.rb +0 -8
  109. data/spec/controllers/setup_controller_spec.rb +24 -0
  110. data/spec/controllers/xml_controller_spec.rb +0 -7
  111. data/spec/models/comment_spec.rb +37 -7
  112. data/spec/models/configuration_spec.rb +0 -11
  113. data/spec/models/trackback_spec.rb +0 -8
  114. data/spec/models/user_spec.rb +9 -0
  115. data/spec/spec_helper.rb +1 -1
  116. data/test/fixtures/blogs.yml +0 -8
  117. data/test/fixtures/users.yml +1 -0
  118. data/vendor/plugins/upload_progress/lib/upload_progress_helper.rb +1 -1
  119. metadata +26 -38
  120. data/app/controllers/admin/blacklist_controller.rb +0 -47
  121. data/app/helpers/admin/blacklist_helper.rb +0 -2
  122. data/app/models/blacklist_pattern.rb +0 -24
  123. data/app/views/admin/base/_recent_comments.html.erb +0 -10
  124. data/app/views/admin/base/_recent_trackbacks.html.erb +0 -10
  125. data/app/views/admin/blacklist/_blacklist_patterns.html.erb +0 -16
  126. data/app/views/admin/blacklist/_form.html.erb +0 -14
  127. data/app/views/admin/blacklist/_quick_post.html.erb +0 -9
  128. data/app/views/admin/blacklist/destroy.html.erb +0 -10
  129. data/app/views/admin/blacklist/edit.html.erb +0 -10
  130. data/app/views/admin/blacklist/index.html.erb +0 -10
  131. data/app/views/admin/dashboard/_sysinfo.html.erb +0 -11
  132. data/app/views/admin/resources/_itunes_category_add.html.erb +0 -11
  133. data/app/views/admin/resources/_itunes_category_edit.html.erb +0 -32
  134. data/app/views/admin/resources/_metadata_add.html.erb +0 -22
  135. data/app/views/admin/resources/_metadata_edit.html.erb +0 -22
  136. data/config/iTunes.yml +0 -72
  137. data/db/typo_dev +0 -0
  138. data/public/images/admin/blue_block_bottom_left.jpg +0 -0
  139. data/public/images/admin/blue_block_bottom_right.jpg +0 -0
  140. data/public/images/admin/blue_block_top_left.jpg +0 -0
  141. data/public/images/admin/blue_block_top_right.jpg +0 -0
  142. data/public/images/admin/editor_active_top_left.jpg +0 -0
  143. data/public/images/admin/editor_active_top_right.jpg +0 -0
  144. data/public/images/admin/editor_bottom_left.jpg +0 -0
  145. data/public/images/admin/editor_bottom_right.jpg +0 -0
  146. data/public/images/admin/input_text_left.jpg +0 -0
  147. data/public/images/admin/input_text_right.jpg +0 -0
  148. data/public/images/admin/input_text_small_left.jpg +0 -0
  149. data/public/images/admin/input_text_small_right.jpg +0 -0
  150. data/public/images/admin/publisher_bottom.jpg +0 -0
  151. data/public/images/admin/publisher_top.jpg +0 -0
  152. data/public/stylesheets/border-radius-ie8.htc +0 -34
  153. data/spec/controllers/admin/blacklist_controller_spec.rb +0 -54
  154. data/spec/models/blacklist_pattern_spec.rb +0 -12
  155. data/test/fixtures/blacklist_patterns.yml +0 -8
@@ -1,4 +1,5 @@
1
1
  # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
+ # NOTE: passwords are valid when User.salt == 'change-me'.
2
3
 
3
4
  tobi:
4
5
  login: tobi
@@ -293,7 +293,7 @@ module UploadProgress
293
293
  # .uploadStatus { font-size: 10px; color: grey; }
294
294
  #
295
295
  def upload_status_text_tag(content=nil, options={})
296
- content_tag("div", content, {:id => status_tag_id, :class => 'uploadStatus'}.merge(options))
296
+ content_tag("div", content, {:id => status_tag_id, :class => 'uploadStatus ui-progressbar-value ui-widget-header ui-corner-left'}.merge(options))
297
297
  end
298
298
 
299
299
  # Content helper that will create the element tree that can be easily styled
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typo
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.3
4
+ version: 5.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Fr\xC3\xA9d\xC3\xA9ric de Villamil"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-14 00:00:00 +01:00
12
+ date: 2010-04-05 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -137,7 +137,6 @@ files:
137
137
  - app/apis/typo_web_service.rb
138
138
  - app/controllers/accounts_controller.rb
139
139
  - app/controllers/admin/base_controller.rb
140
- - app/controllers/admin/blacklist_controller.rb
141
140
  - app/controllers/admin/cache_controller.rb
142
141
  - app/controllers/admin/categories_controller.rb
143
142
  - app/controllers/admin/content_controller.rb
@@ -161,6 +160,7 @@ files:
161
160
  - app/controllers/content_controller.rb
162
161
  - app/controllers/feedback_controller.rb
163
162
  - app/controllers/grouping_controller.rb
163
+ - app/controllers/setup_controller.rb
164
164
  - app/controllers/tags_controller.rb
165
165
  - app/controllers/textfilter_controller.rb
166
166
  - app/controllers/theme_controller.rb
@@ -168,8 +168,8 @@ files:
168
168
  - app/controllers/xml_controller.rb
169
169
  - app/helpers/accounts_helper.rb
170
170
  - app/helpers/admin/base_helper.rb
171
- - app/helpers/admin/blacklist_helper.rb
172
171
  - app/helpers/admin/cache_helper.rb
172
+ - app/helpers/admin/categories_helper.rb
173
173
  - app/helpers/admin/comments_helper.rb
174
174
  - app/helpers/admin/content_helper.rb
175
175
  - app/helpers/admin/feedback_helper.rb
@@ -200,7 +200,6 @@ files:
200
200
  - app/helpers/xml_helper.rb
201
201
  - app/models/article/states.rb
202
202
  - app/models/article.rb
203
- - app/models/blacklist_pattern.rb
204
203
  - app/models/blog.rb
205
204
  - app/models/blog_sweeper.rb
206
205
  - app/models/cache_information.rb
@@ -233,14 +232,6 @@ files:
233
232
  - app/views/accounts/login.html.erb
234
233
  - app/views/accounts/recover_password.html.erb
235
234
  - app/views/accounts/signup.html.erb
236
- - app/views/admin/base/_recent_comments.html.erb
237
- - app/views/admin/base/_recent_trackbacks.html.erb
238
- - app/views/admin/blacklist/_blacklist_patterns.html.erb
239
- - app/views/admin/blacklist/_form.html.erb
240
- - app/views/admin/blacklist/_quick_post.html.erb
241
- - app/views/admin/blacklist/destroy.html.erb
242
- - app/views/admin/blacklist/edit.html.erb
243
- - app/views/admin/blacklist/index.html.erb
244
235
  - app/views/admin/categories/_categories.html.erb
245
236
  - app/views/admin/categories/_form.html.erb
246
237
  - app/views/admin/categories/destroy.html.erb
@@ -263,7 +254,6 @@ files:
263
254
  - app/views/admin/dashboard/_overview.html.erb
264
255
  - app/views/admin/dashboard/_popular.html.erb
265
256
  - app/views/admin/dashboard/_posts.html.erb
266
- - app/views/admin/dashboard/_sysinfo.html.erb
267
257
  - app/views/admin/dashboard/_typo_dev.html.erb
268
258
  - app/views/admin/dashboard/_welcome.html.erb
269
259
  - app/views/admin/dashboard/index.html.erb
@@ -283,10 +273,6 @@ files:
283
273
  - app/views/admin/pages/new.html.erb
284
274
  - app/views/admin/pages/show.html.erb
285
275
  - app/views/admin/profiles/index.html.erb
286
- - app/views/admin/resources/_itunes_category_add.html.erb
287
- - app/views/admin/resources/_itunes_category_edit.html.erb
288
- - app/views/admin/resources/_metadata_add.html.erb
289
- - app/views/admin/resources/_metadata_edit.html.erb
290
276
  - app/views/admin/resources/_mime_edit.html.erb
291
277
  - app/views/admin/resources/_pages.html.erb
292
278
  - app/views/admin/resources/_upload.html.erb
@@ -346,6 +332,7 @@ files:
346
332
  - app/views/comments/show.html.erb
347
333
  - app/views/layouts/accounts.html.erb
348
334
  - app/views/layouts/administration.html.erb
335
+ - app/views/layouts/setup.html.erb
349
336
  - app/views/layouts/sidebar.html.erb
350
337
  - app/views/notification_mailer/_mail_footer.html.erb
351
338
  - app/views/notification_mailer/_mail_header.html.erb
@@ -355,6 +342,9 @@ files:
355
342
  - app/views/notification_mailer/trackback.html.erb
356
343
  - app/views/settings/done.html.erb
357
344
  - app/views/settings/install.html.erb
345
+ - app/views/setup/confirm.html.erb
346
+ - app/views/setup/index.html.erb
347
+ - app/views/shared/_confirm.html.erb
358
348
  - app/views/shared/_search.html.erb
359
349
  - app/views/sidebar/_row.html.erb
360
350
  - app/views/sidebar/_sidebar.html.erb
@@ -391,7 +381,6 @@ files:
391
381
  - config/initializers/access_rules.rb
392
382
  - config/initializers/inflector.rb
393
383
  - config/initializers/mime_types.rb
394
- - config/iTunes.yml
395
384
  - config/lighttpd.conf
396
385
  - config/locales/nl.rb
397
386
  - config/mail.yml.example
@@ -488,6 +477,8 @@ files:
488
477
  - db/migrate/084_move_users_to_profiles.rb
489
478
  - db/migrate/085_add_article_parent_draft.rb
490
479
  - db/migrate/086_add_user_last_connection.rb
480
+ - db/migrate/087_drop_blacklist_patterns.rb
481
+ - db/migrate/088_drop_session_table.rb
491
482
  - db/schema.mysql-v3.sql
492
483
  - db/schema.mysql.sql
493
484
  - db/schema.postgresql.sql
@@ -497,7 +488,6 @@ files:
497
488
  - db/schema.sqlserver.sql
498
489
  - db/schema_version
499
490
  - db/scripts/fix_permalinks.rb
500
- - db/typo_dev
501
491
  - db/updates/update.168.to.200.mysql.sql
502
492
  - db/updates/update.168.to.200.psql.sql
503
493
  - doc/Installer.txt
@@ -554,22 +544,22 @@ files:
554
544
  - public/dispatch.fcgi
555
545
  - public/dispatch.rb
556
546
  - public/favicon.ico
557
- - public/images/admin/blue_block_bottom_left.jpg
558
- - public/images/admin/blue_block_bottom_right.jpg
559
- - public/images/admin/blue_block_top_left.jpg
560
- - public/images/admin/blue_block_top_right.jpg
561
- - public/images/admin/editor_active_top_left.jpg
562
- - public/images/admin/editor_active_top_right.jpg
563
- - public/images/admin/editor_bottom_left.jpg
564
- - public/images/admin/editor_bottom_right.jpg
565
- - public/images/admin/input_text_left.jpg
566
- - public/images/admin/input_text_right.jpg
567
- - public/images/admin/input_text_small_left.jpg
568
- - public/images/admin/input_text_small_right.jpg
569
547
  - public/images/admin/loading.gif
570
- - public/images/admin/publisher_bottom.jpg
571
- - public/images/admin/publisher_top.jpg
572
548
  - public/images/admin/typologo.gif
549
+ - public/images/admin/ui-bg_diagonals-thick_90_eeeeee_40x40.png
550
+ - public/images/admin/ui-bg_flat_15_cd0a0a_40x100.png
551
+ - public/images/admin/ui-bg_glass_100_e4f1fb_1x400.png
552
+ - public/images/admin/ui-bg_glass_80_d7ebf9_1x400.png
553
+ - public/images/admin/ui-bg_highlight-hard_100_f2f5f7_1x100.png
554
+ - public/images/admin/ui-bg_highlight-hard_70_000000_1x100.png
555
+ - public/images/admin/ui-bg_highlight-soft_100_deedf7_1x100.png
556
+ - public/images/admin/ui-bg_highlight-soft_25_ffef8f_1x100.png
557
+ - public/images/admin/ui-bg_highlight-soft_50_116088_1x100.png
558
+ - public/images/admin/ui-icons_2694e8_256x240.png
559
+ - public/images/admin/ui-icons_2e83ff_256x240.png
560
+ - public/images/admin/ui-icons_3d80b3_256x240.png
561
+ - public/images/admin/ui-icons_72a7cf_256x240.png
562
+ - public/images/admin/ui-icons_ffffff_256x240.png
573
563
  - public/images/calendar_date_select/calendar.gif
574
564
  - public/images/close.gif
575
565
  - public/images/closelabel.gif
@@ -866,10 +856,10 @@ files:
866
856
  - public/javascripts/typo.js
867
857
  - public/javascripts/typo_carousel.js
868
858
  - public/robots.txt
859
+ - public/stylesheets/accounts.css
869
860
  - public/stylesheets/administration.css
870
861
  - public/stylesheets/administration_rtl.css
871
862
  - public/stylesheets/base_packaged.css
872
- - public/stylesheets/border-radius-ie8.htc
873
863
  - public/stylesheets/calendar_date_select/default.css
874
864
  - public/stylesheets/codecollapse.css
875
865
  - public/stylesheets/coderay.css
@@ -902,7 +892,6 @@ files:
902
892
  - script/spacecheck
903
893
  - script/spec
904
894
  - spec/controllers/accounts_controller_spec.rb
905
- - spec/controllers/admin/blacklist_controller_spec.rb
906
895
  - spec/controllers/admin/cache_controller_spec.rb
907
896
  - spec/controllers/admin/categories_controller_spec.rb
908
897
  - spec/controllers/admin/content_controller_spec.rb
@@ -924,6 +913,7 @@ files:
924
913
  - spec/controllers/comments_controller_spec.rb
925
914
  - spec/controllers/routes/articles_routing_spec.rb
926
915
  - spec/controllers/routes/xml_routing_spec.rb
916
+ - spec/controllers/setup_controller_spec.rb
927
917
  - spec/controllers/tags_controller_spec.rb
928
918
  - spec/controllers/textfilter_controller_spec.rb
929
919
  - spec/controllers/theme_controller_spec.rb
@@ -935,7 +925,6 @@ files:
935
925
  - spec/models/amazon_sidebar_spec.rb
936
926
  - spec/models/article_closing_spec.rb
937
927
  - spec/models/article_spec.rb
938
- - spec/models/blacklist_pattern_spec.rb
939
928
  - spec/models/blog_spec.rb
940
929
  - spec/models/cache_information_spec.rb
941
930
  - spec/models/cache_support_spec.rb
@@ -965,7 +954,6 @@ files:
965
954
  - spec/views/articles/index_spec.rb
966
955
  - spec/views/articles/read_spec.rb
967
956
  - spec/views/comments/html_sanitization_spec.rb
968
- - test/fixtures/blacklist_patterns.yml
969
957
  - test/fixtures/blogs.yml
970
958
  - test/fixtures/categories.yml
971
959
  - test/fixtures/categorizations.yml
@@ -1,47 +0,0 @@
1
- class Admin::BlacklistController < Admin::BaseController
2
- def index
3
- @blacklist_patterns = BlacklistPattern.paginate :page => params[:page], :order => 'pattern ASC', :per_page => this_blog.admin_display_elements
4
- end
5
-
6
- def new
7
- @blacklist_pattern = BlacklistPattern.new
8
-
9
- if params[:blacklist_pattern].has_key?('type')
10
- @blacklist_pattern = case params[:blacklist_pattern][:type]
11
- when "StringPattern": StringPattern.new
12
- when "RegexPattern": RegexPattern.new
13
- end
14
- end rescue nil
15
-
16
- @blacklist_pattern.attributes = params[:blacklist_pattern]
17
-
18
- if request.post? and @blacklist_pattern.save
19
- flash[:notice] = _('Blacklist Pattern was successfully created.')
20
- else
21
- flash[:error] = _('Blacklist Pattern could not be created.')
22
- end
23
- redirect_to :action => 'index'
24
- end
25
-
26
- def edit
27
- @blacklist_pattern = BlacklistPattern.find(params[:id])
28
- @blacklist_pattern.attributes = params[:blacklist_pattern]
29
- if request.post?
30
- if @blacklist_pattern.save
31
- flash[:notice] = _('BlacklistPattern was successfully updated.')
32
- else
33
- flash[:error] = _('Blacklist Pattern could not be updated.')
34
- end
35
- redirect_to :action => 'index'
36
- end
37
- end
38
-
39
- def destroy
40
- @blacklist_pattern = BlacklistPattern.find(params[:id])
41
- if request.post?
42
- @blacklist_pattern.destroy
43
- redirect_to :action => 'index'
44
- end
45
- end
46
-
47
- end
@@ -1,2 +0,0 @@
1
- module Admin::BlacklistHelper
2
- end
@@ -1,24 +0,0 @@
1
- class BlacklistPattern < ActiveRecord::Base
2
- end
3
-
4
- class RegexPattern < BlacklistPattern
5
- validates_presence_of :pattern
6
- def matches?(string)
7
- string.match(/#{pattern}/)
8
- end
9
-
10
- def to_s
11
- "Regex /#{pattern}/"
12
- end
13
- end
14
-
15
- class StringPattern < BlacklistPattern
16
- validates_presence_of :pattern
17
- def matches?(string)
18
- string.match(/\b#{Regexp.quote(pattern)}\b/)
19
- end
20
-
21
- def to_s
22
- "String '#{pattern}'"
23
- end
24
- end
@@ -1,10 +0,0 @@
1
- <h2><%= _("Recent comments")%></h2>
2
- <ul class="recent">
3
- <% for comment in Comment.find(:all, :limit => 5, :order => 'id DESC' ) %>
4
- <li>
5
- <h4><%= truncate(comment.author, :length => 20) %></h4>
6
- <div><%= link_to truncate(comment.body, :length => 20), :controller => "/admin/comments", :action => "show", :id => comment.id, :article_id => comment.article_id %></div>
7
- <p class="right"><%= time_ago_in_words(comment.created_at) %> ago</p>
8
- </li>
9
- <% end %>
10
- </ul>
@@ -1,10 +0,0 @@
1
- <h2><%=_("Recent trackbacks")%></h2>
2
- <ul class="recent">
3
- <% for trackback in Trackback.find(:all, :limit => 5, :order => 'id DESC' ) %>
4
- <li>
5
- <%= link_to truncate(trackback.excerpt, :length => 20), :controller => "/admin/trackbacks", :action => "show", :id => trackback.id, :article_id => trackback.article_id %><br />
6
- by <%= truncate(trackback.blog_name, :length => 20) %><br />
7
- <%= time_ago_in_words(trackback.created_at) %> ago
8
- </li>
9
- <% end %>
10
- </ul>
@@ -1,16 +0,0 @@
1
- <table cellspacing="1" cellpadding="0">
2
- <tr>
3
- <th><%= _("Pattern") %></th>
4
- <th><%= _("Type") %></th>
5
- <th><%= _("Delete")%></th>
6
- </tr>
7
- <%= render_void_table(@blacklist_patterns.size, 3) %>
8
- <% for blacklist_pattern in @blacklist_patterns -%>
9
- <tr <%= alternate_class -%>>
10
- <td><%= link_to h(blacklist_pattern.pattern), :action => "edit", :id => blacklist_pattern.id %></td>
11
- <td><%= blacklist_pattern.class %></td>
12
- <td><%= link_to _("Delete"), :action => 'destroy', :id => blacklist_pattern.id %></td>
13
- </tr>
14
- <% end -%>
15
- <%= display_pagination(@blacklist_patterns, 3)%>
16
- </table>
@@ -1,14 +0,0 @@
1
- <%= error_messages_for 'blacklist_pattern' %>
2
-
3
- <ul class="admin">
4
- <li>
5
- <label for="blacklist_pattern_pattern" class="block"><%= _("Pattern")%></label>
6
- <%= text_field :blacklist_pattern, :pattern %>
7
- </li>
8
- <li>
9
- <label for="blacklist_pattern_type" class="block"><%= _("Type")%></label>
10
- <select name="blacklist_pattern[type]">
11
- <%= options_for_select [ [_('String'), 'StringPattern'], [_('Regex'), 'RegexPattern' ] ] %>
12
- </select>
13
- </li>
14
- </ul>
@@ -1,9 +0,0 @@
1
- <% form_tag :action=>"new" do %>
2
-
3
- <%= render :partial => "form" %>
4
-
5
- <p class="paginate r">
6
- <a href="#" onclick="new Effect.BlindUp('quick-post', {duration: 0.4}); return false;" >
7
- <%= _("Cancel")%></a> <%= _("or")%> <%= save(_("Save") + "&raquo;") %>
8
- </p>
9
- <% end %>
@@ -1,10 +0,0 @@
1
- <% @page_heading = _('Blacklist Patterns') %>
2
-
3
- <% content_for('tasks') do %>
4
- <%= task_overview %>
5
- <% end %>
6
-
7
- <p><%= _("Are you sure you want to delete this item?")%></p>
8
- <% form_tag :action => "destroy", :id => @blacklist_pattern.id do %>
9
- <%= confirm_delete %>
10
- <% end %>
@@ -1,10 +0,0 @@
1
- <% @page_heading = _('Editing pattern') %>
2
-
3
- <% content_for('tasks') do %>
4
- <%= task_overview %>
5
- <% end %>
6
-
7
- <% form_tag :action=>"edit", :id => @blacklist_pattern.id do %>
8
- <%= render :partial => "form" %>
9
- <%= cancel_or_save %>
10
- <% end %>
@@ -1,10 +0,0 @@
1
- <% @page_heading = _('Blacklist Patterns') + ' <span>&raquo; ' + task_quickpost(_('add new') + '</span>') %>
2
- <% subtabs_for(:settings) %>
3
-
4
- <div id="quick-post" style="display:none;position:absolute;">
5
- <%= render :partial => "quick_post" %>
6
- </div>
7
-
8
- <div class="list">
9
- <%= render :partial => 'blacklist_patterns' %>
10
- </div>
@@ -1,11 +0,0 @@
1
- <div class="bordered">
2
- <h3><%= _("About your blog") %></h3>
3
-
4
- <p><%= _("You're running Typo %s", TYPO_VERSION) %></p>
5
- <ul>
6
- <li> <%= _("Total posts : %d", @statposts) %></li>
7
- <li> <%= _("Your posts : %d" , @statuserposts) %></li>
8
- <li> <%= _("Total comments : %d" , @statcomments) %></li>
9
- <li> <%= _("Spam comments : %d" , @statspam) %></li>
10
- </ul>
11
- </div>
@@ -1,11 +0,0 @@
1
- <select name="itunes_category[]" id="resource_itunes_category_<%= id %>" size="3" multiple="multiple">
2
- <% @itunes_category_list.each do |pcat| -%>
3
- <% pcat.each_pair do |cat,subcats| -%>
4
- <% #not a great way of handling this but it looks better -%>
5
- <option value="<%=h cat %>"><%=h cat %></option>
6
- <% subcats.each do |subcat| -%>
7
- <option value="<%=h cat %>-<%=h subcat %>">&nbsp;-<%=h subcat %></option>
8
- <% end unless subcats.nil? -%>
9
- <% end -%>
10
- <% end -%>
11
- </select>
@@ -1,32 +0,0 @@
1
- <%
2
- #Since the data is in yaml coming out of the DB it is converted here from
3
- #comparision. This is a hack to get things working.
4
- unless categories.nil?
5
- selected = YAML::load(categories)
6
- else
7
- selected = Hash.new
8
- end
9
- -%>
10
- <select name="itunes_category[]" id="resource_itunes_category_<%= id %>" size="3" multiple="multiple">
11
- <% @itunes_category_list.each do |h|
12
- h.each_pair do |cat,subcats| -%>
13
- <% # not a great way of handling this but it looks better -%>
14
- <% if selected.key?(cat) -%>
15
- <option value="<%=h cat %>" selected="selected"><%=h cat %></option>
16
- <% else -%>
17
- <option value="<%=h cat %>"><%=h cat %></option>
18
- <% end -%>
19
- <% subcats.each do |subcat| -%>
20
- <% unless selected[cat].nil? -%>
21
- <% if selected[cat].include?(subcat) -%>
22
- <option value="<%=h cat %>-<%=h subcat %>" selected="selected">&nbsp;-<%=h subcat %></option>
23
- <% else -%>
24
- <option value="<%=h cat %>-<%=h subcat %>">&nbsp;-<%=h subcat %></option>
25
- <% end -%>
26
- <% else -%>
27
- <option value="<%=h cat %>-<%=h subcat %>">&nbsp;-<%=h subcat %></option>
28
- <% end -%>
29
- <% end unless subcats.nil? %>
30
- <% end -%>
31
- <% end -%>
32
- </select>