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
@@ -48,16 +48,6 @@ class Blog < ActiveRecord::Base
48
48
  setting :sp_url_limit, :integer, 0
49
49
  setting :sp_akismet_key, :string, ''
50
50
 
51
- # Podcasting
52
- setting :itunes_explicit, :boolean, false
53
- setting :itunes_author, :string, ''
54
- setting :itunes_subtitle, :string, ''
55
- setting :itunes_summary, :string, ''
56
- setting :itunes_owner, :string, ''
57
- setting :itunes_email, :string, ''
58
- setting :itunes_name, :string, ''
59
- setting :itunes_copyright, :string, ''
60
-
61
51
  # Mostly Behaviour
62
52
  setting :text_filter, :string, 'markdown smartypants'
63
53
  setting :comment_text_filter, :string, 'markdown smartypants'
@@ -168,8 +168,8 @@ class Content < ActiveRecord::Base
168
168
  search_hash = {}
169
169
  end
170
170
 
171
- if search_hash[:searchstring]
172
- list_function << 'searchstring(search_hash[:searchstring])'
171
+ if search_hash[:searchstring]
172
+ list_function << 'searchstring(search_hash[:searchstring])' unless search_hash[:searchstring].to_s.empty?
173
173
  end
174
174
 
175
175
  if search_hash[:published_at] and %r{(\d\d\d\d)-(\d\d)} =~ search_hash[:published_at]
@@ -180,10 +180,11 @@ class Content < ActiveRecord::Base
180
180
  list_function << 'user_id(search_hash[:user_id])'
181
181
  end
182
182
 
183
- if search_hash[:published]
183
+ if search_hash[:published]
184
184
  list_function << 'published' if search_hash[:published].to_s == '1'
185
185
  list_function << 'not_published' if search_hash[:published].to_s == '0'
186
186
  end
187
+
187
188
  list_function
188
189
  end
189
190
  end
@@ -89,6 +89,7 @@ class Feedback < Content
89
89
 
90
90
  def classify
91
91
  begin
92
+ return :ham if self.user_id
92
93
  return :spam if blog.default_moderate_comments
93
94
  return :ham unless blog.sp_global
94
95
  rescue NoMethodError
@@ -69,7 +69,8 @@ module Feedback::States
69
69
  def enter_hook
70
70
  super
71
71
  content.just_changed_published_status = true
72
- content.state = :presumed_ham
72
+ content.state = :presumed_ham unless content.user_id
73
+ content.state = :just_marked_as_ham if content.user_id
73
74
  end
74
75
  def to_s
75
76
  _("Just Presumed Ham")
@@ -6,32 +6,6 @@ class Resource < ActiveRecord::Base
6
6
  after_destroy :delete_filename_on_disk
7
7
  before_validation_on_create :uniq_filename_on_disk
8
8
  belongs_to :article
9
-
10
- #Reads YAML file from config dir (iTunes.yml) for easy updating
11
- def get_itunes_categories
12
- itunes_categories_raw = YAML::load( File.open( "#{RAILS_ROOT}/config/iTunes.yml" ) )
13
- itunes_categories = []
14
- itunes_categories_raw.keys.sort.each do |cat|
15
- itunes_categories.push cat => itunes_categories_raw[cat]
16
- end
17
- return itunes_categories
18
- end
19
-
20
- def validate_on_update
21
- if itunes_explicit?
22
- errors.add_to_base("You must check the box to activate metadata.") unless itunes_metadata?
23
- errors.add_to_base("You must specify an author.") if itunes_author.blank?
24
- errors.add_to_base("You must specify an subtitle.") if itunes_subtitle.blank?
25
- errors.add_to_base("You must specify a summary.") if itunes_summary.blank?
26
- errors.add_to_base("You must specify keywords.") if itunes_keywords.blank?
27
- if !itunes_duration.blank?
28
- errors.add_to_base("You must specify duration in a HH:MM:SS format.") unless itunes_duration =~ /^(\d{0,2}:)?\d{1,2}:?\d{2}$/
29
- end
30
- if !itunes_category.nil?
31
- errors.add_to_base("You can only specify one parent category, but you can choose multiple sub categories.") if itunes_category.length > 1
32
- end
33
- end
34
- end
35
9
 
36
10
  def fullpath(file = nil)
37
11
  "#{RAILS_ROOT}/public/files/#{file.nil? ? filename : file}"
@@ -27,7 +27,7 @@ class User < ActiveRecord::Base
27
27
  find(:first,
28
28
  :conditions => ["login = ? AND password = ? AND state = ?", login, sha1(pass), 'active'])
29
29
  end
30
-
30
+
31
31
  def update_connection_time
32
32
  self.last_venue = last_connection
33
33
  self.last_connection = Time.now
@@ -163,7 +163,7 @@ class User < ActiveRecord::Base
163
163
  def crypt_unless_empty
164
164
  if password(true).empty?
165
165
  user = self.class.find(self.id)
166
- self.password = user.password
166
+ write_attribute "password", user.password
167
167
  else
168
168
  send_create_notification
169
169
  write_attribute "password", self.class.sha1(password(true))
@@ -1,16 +1 @@
1
- <%= content_tag :h3, link_to(image_tag("/images/admin/typologo.gif", :alt=>"Typo website"), "http://typosphere.org") %>
2
-
3
- <h3 class='mt20'><%= _("Congratulation!") %></h3>
4
- <p class='input_text_title'><%= _("You have successfully signed up") %></p>
5
- <p class='input_text_title'>
6
- <%= _("<strong>Login:</strong> %s", current_user.login)%>
7
- </p>
8
- <p class='input_text_title'>
9
- <%= _("<strong>Password:</strong> %s", session[:tmppass]) %>
10
- </p>
11
- <p class='input_text_title'>
12
- <%= _("Don't lose the mail sent at %s or you won't be able to login anymore", current_user.email)%>
13
- </p>
14
- <p class='input_text_title right'>
15
- <%= _("Proceed to %s", link_to(_("admin"), :controller => 'admin/settings')) %>
16
- </p>
1
+ <%= render :partial => 'shared/confirm'%>
@@ -1,33 +1,25 @@
1
1
  <%= content_tag :h3, link_to(image_tag("/images/admin/typologo.gif", :alt=>"Typo website"), "http://typosphere.org") %>
2
2
 
3
- <div id="flash"><%= render_flash rescue nil %></div>
3
+ <div id="flash"><%= render_the_flash %></div>
4
4
 
5
5
  <% form_tag :action=> "login" do %>
6
- <div>
7
- <h2><label for="user_login"><%= _('Login')%></label></h2>
6
+ <h3><label for="user_login"><%= _('Login')%></label></h3>
8
7
  <p class='input_text_title'>
9
8
  <%= text_field(:user, :login, {:class => 'title large'})%>
10
9
  </p>
11
- </div>
12
- <div>
13
- <h2><label for="user_password"><%= _('Password')%></label></h2>
10
+ <h3><label for="user_password"><%= _('Password')%></label></h3>
14
11
  <p class='input_text_title'>
15
12
  <%= password_field(:user, :password, {:class => 'title large'})%>
16
13
  </p>
17
- </div>
18
- <div>
19
14
  <label for="remember_me"><%= _('Remember me')%>
20
15
  <%= check_box_tag 'remember_me' %>
21
16
  </label>
22
- </div>
23
- <p>
24
- <input type="submit" name="login" value= "<%= _('Submit') %>" class="save large" id="submit" />
25
- </p>
17
+ <p>
18
+ <input type="submit" name="login" value= "<%= _('Submit') %>" class="save large" id="submit" />
19
+ </p>
26
20
 
27
- <p>
21
+ <p>
28
22
  <small><%= link_to "&laquo; #{_('Back to ')} #{this_blog.blog_name}", this_blog.base_url %></small><br />
29
23
  <small><%= link_to "#{_("I've lost my password")} &raquo;", :action => 'recover_password' %></small>
30
- </p>
31
- <% end %>
32
- </div>
33
- </div>
24
+ </p>
25
+ <% end %>
@@ -3,16 +3,13 @@
3
3
  <p id="flash"><%= render_flash rescue nil %></p>
4
4
 
5
5
  <% form_tag :action=> "recover_password" do %>
6
- <div>
7
- <h2><label for="user_login"><%= _("Username or email") %>:</label></h2>
6
+ <h3><label for="user_login"><%= _("Username or email") %>:</label></h3>
8
7
  <p class='input_text_title'>
9
8
  <%= text_field(:user, :login, {:class => 'title large'})%>
10
9
  </p>
11
- </div>
12
- <p><input type="submit" id="submit" class='save large' value="<%= _('Submit')%>" /></p>
13
- <p>
14
- <small><%= link_to "&laquo; #{_('Back to ')} #{this_blog.blog_name}", this_blog.base_url %></small>
15
- </p>
16
-
10
+ <p><input type="submit" id="submit" class='save large' value="<%= _('Submit')%>" /></p>
11
+ <p>
12
+ <small><%= link_to "&laquo; #{_('Back to ')} #{this_blog.blog_name}", this_blog.base_url %></small>
13
+ </p>
17
14
  <% end %>
18
15
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  <% form_tag :action=> "signup" do %>
6
6
  <div>
7
+ <h1><%= _("Create an account")%></h1>
7
8
  <h2><label for="user_login"><%= _("Username") %>:</label></h2>
8
9
  <p class='input_text_title'>
9
10
  <%= text_field(:user, :login, {:class => 'title large'})%>
@@ -1,14 +1,22 @@
1
1
  <table>
2
2
  <tr>
3
3
  <th><%= _("Title") %></th>
4
- <th><%= _("Posts") %></th>
5
4
  </tr>
6
5
  <%= render_void_table(@categories.size, 2) %>
7
6
 
8
7
  <% for category in @categories -%>
9
8
  <tr <%= alternate_class -%> id="category_<%= category.id -%>">
10
- <td><%= link_to_edit category.name, category %></td>
11
- <td><%= link_to_permalink category, pluralize(category.articles.size, _('no articles') , _('1 article'), __('%d articles')) %></td>
9
+ <td>
10
+ <%= link_to_edit category.name, category %><br />
11
+ <%= show_actions category %>
12
+ </td>
12
13
  </tr>
13
14
  <% end -%>
15
+ <tr>
16
+ <td class='paginate'>
17
+ <%= link_to_remote(_('Reorder'), :update => 'category_container', :url => { :action => 'reorder' }) %> |
18
+ <%= link_to_remote(_('Sort alphabetically'), :update => 'category_container', :url => { :action => 'asort' }) %>
19
+
20
+ </td>
21
+ </tr>
14
22
  </table>
@@ -1,11 +1,8 @@
1
- <% @page_heading = _('Categories') + "<span>&raquo; #{link_to(_('add new'), :controller => 'categories', :action => 'new')}</span>" %>
2
- <% subtabs_for(:content) %>
1
+ <% @page_heading = _('Categories') %>
2
+ <% @link_to_new = link_to(_("New Category"), {:controller => 'categories', :action => 'new'}, :id => 'dialog-link', :class => 'ui-state-default ui-corner-all') %>
3
+ <% subtabs_for(:content) %>
3
4
 
4
- <div id="category_container" class="list">
5
- <%= render :partial => 'categories' %>
6
- </div>
5
+ <div id="category_container" class="list">
6
+ <%= render :partial => 'categories' %>
7
+ </div>
7
8
 
8
- <div class="paginate">
9
- <%= link_to_remote(_('Reorder'), :update => 'category_container', :url => { :action => 'reorder' }) %> |
10
- <%= link_to_remote(_('Sort alphabetically'), :update => 'category_container', :url => { :action => 'asort' }) %>
11
- </div>
@@ -1,9 +1,11 @@
1
- <ul id="category_list">
1
+ <ul class='ui-sortable' id="category_list">
2
2
  <% for category in @categories -%>
3
- <li id="category_<%= category.id -%>"><%= category.name -%></li>
3
+ <li class='ui-state-default' id="category_<%= category.id -%>">
4
+ <span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
5
+ <%= category.name -%>
6
+ </li>
4
7
  <% end -%>
5
8
  </ul>
6
9
 
7
10
  <%= link_to_remote _("(Done)"), :update => "category_container", :url => { :action => "category_container" } %>
8
-
9
11
  <%= sortable_element "category_list", :url => { :action => "order" }, :complete => visual_effect(:highlight, "category_list") %>
@@ -1,12 +1,17 @@
1
1
  <%= render_void_table(@articles.size, 7) %>
2
2
  <% for article in @articles %>
3
3
  <tr <%= alternate_class %>>
4
- <td> <%= link_to h(article.title), :action => 'edit', :id => article.id %></td>
4
+ <td>
5
+ <%= link_to h(article.title), :action => 'edit', :id => article.id %>
6
+ <%= show_actions article %>
7
+ </td>
5
8
  <td><%= article.categories.map { |c| link_to h(c.name), {:controller => 'content', :action => 'index', "search[category]" => c.id}}.join(", ") %></td>
6
- <td><%= article.published_at.strftime("%m/%d/%Y") %></td>
7
9
  <td><%= author_link(article)%></td>
8
- <td><%= link_to_published article %></td>
9
- <td class="operation"><%= (article.allow_comments?) ? link_to(article.comments.ham.size.to_s, :controller => '/admin/feedback', :id => article.id, :action => 'article') : '-' %></td>
10
+ <td>
11
+ <%= format_date article.published_at %><br />
12
+ <%= published_or_not article %>
13
+ </td>
14
+ <td><%= (article.allow_comments?) ? link_to(article.comments.ham.size.to_s, :controller => '/admin/feedback', :id => article.id, :action => 'article') : '-' %></td>
10
15
  </tr>
11
16
  <% end %>
12
17
  <%= display_pagination(@articles, 7)%>
@@ -1,6 +1,8 @@
1
- <div class='bordered'>
2
- <h3><label class="block content"><%= _("Drafts:") %></label></h3>
3
- <% Article.drafts.all.each do |draft| %>
4
- <%= link_to("#{draft.title}<br />", :action => 'edit', :id => draft.id) %>
5
- <% end %>
1
+ <div class='ui-accordion ui-widget ui-helper-reset ui-accordion-icons settings'>
2
+ <h3 class='ui-accordion-header ui-helper-reset ui-state-active ui-corner-top'><%= _("Drafts")%></h3>
3
+ <div class='ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active'>
4
+ <% Article.drafts.all.each do |draft| %>
5
+ <%= link_to("#{draft.title},", :action => 'edit', :id => draft.id) %>
6
+ <% end %>
7
+ </div>
6
8
  </div>
@@ -4,111 +4,119 @@
4
4
  <div id="article_keywords_auto_complete" class="auto_complete"></div>
5
5
 
6
6
  <%= error_messages_for 'article' %>
7
+
7
8
  <div id='editor-right'>
8
- <h3>Publish settings</h3>
9
- <div id='publishing'>
10
- <%= check_box 'article', 'allow_comments' %>
11
- <label for="article_allow_comments"><%= _("Allow comments") %></label><br />
12
- <%= check_box 'article', 'allow_pings' %>
13
- <label for="article_allow_pings"><%= _("Allow trackbacks")%></label><br />
14
- <%= check_box 'article', 'published' %>
15
- <label for="article_published"><%= _("Published")%></label><br />
16
- <p class='right'>
17
- <input id='save_draft' type="submit" value="<%= _('Save as draft') %> &raquo;" name="article[draft]"/>&nbsp;
18
- <%= save( _("Publish") + " &raquo;") %><br />
19
- <%= link_to_destroy_with_profiles(@article) unless @article.id.nil? %>
20
- <%= link_to_destroy_draft @article %>
21
- </p>
22
- <span id='preview_link'><%= link_to(_("Preview"), {:controller => '/articles', :action => 'preview', :id => @article.id}, {:target => 'new'}) if @article.id %></span>
23
- </div>
24
- <div class='editor_bottom'>
25
- <div class='editor_bottom_right'></div>
9
+ <div class='ui-accordion ui-widget ui-helper-reset ui-accordion-icons settings'>
10
+ <h3 class='ui-accordion-header ui-helper-reset ui-state-active ui-corner-top'><span class='ui-icon ui-icon-pencil'> </span><%= _("Publish settings")%></h3>
11
+ <div class='ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active'>
12
+ <%= check_box 'article', 'allow_comments' %>
13
+ <label for="article_allow_comments"><%= _("Allow comments") %></label><br />
14
+ <%= check_box 'article', 'allow_pings' %>
15
+ <label for="article_allow_pings"><%= _("Allow trackbacks")%></label><br />
16
+ <%= check_box 'article', 'published' %>
17
+ <label for="article_published"><%= _("Published")%></label><br />
18
+ <p class='right'>
19
+ <input id='save_draft' type="submit" value="<%= _('Save as draft') %>" name="article[draft]" class='ui-state-default ui-corner-all' />
20
+ <%= save( _("Publish") + " &raquo;") %><br />
21
+ <%= link_to_destroy_with_profiles(@article) unless @article.id.nil? %>
22
+ <%= link_to_destroy_draft @article %>
23
+ </p>
24
+ <span id='preview_link'><%= link_to(_("Preview"), {:controller => '/articles', :action => 'preview', :id => @article.id}, {:target => 'new'}) if @article.id %></span>
25
+ </div>
26
26
  </div>
27
- <div id="categories">
28
- <h3><%= _("Categories") %></h3>
29
- <%- Category.all.each do |cat| %>
30
- <%= check_box_tag('categories[]', cat.id, (@article.categories.map(&:id).include? cat.id), :id => "category_#{h(cat.id)}") %>
31
- <%= label_tag "category_#{h(cat.id)}", h(cat.name) %><br />
32
- <% end -%>
27
+
28
+ <div class='ui-accordion ui-widget ui-helper-reset ui-accordion-icons settings'>
29
+ <h3 class='ui-accordion-header ui-helper-reset ui-state-active ui-corner-top'><span class='ui-icon ui-icon-pencil'> </span><%= _("Categories")%></h3>
30
+ <div class='ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active'>
31
+ <%- Category.all.each do |cat| %>
32
+ <%= check_box_tag('categories[]', cat.id, (@article.categories.map(&:id).include? cat.id), :id => "category_#{h(cat.id)}") %>
33
+ <%= label_tag "category_#{h(cat.id)}", h(cat.name) %><br />
34
+ <% end -%>
35
+ </div>
33
36
  </div>
34
- <%= render :partial => 'drafts'%>
35
37
  </div>
36
38
 
37
39
  <div id='editor-left'>
38
- <div>
40
+ <div class='settings'>
39
41
  <h2><label for="article_title"><%= _("Title")%></label></h2>
40
- <p class='input_text_title'>
41
- <%= text_field 'article', 'title', :class => 'large title' %>
42
+ <p class='input_text'>
43
+ <%= text_field 'article', 'title', :class => 'large' %>
42
44
  </p>
43
- </div>
44
- <div id='editor-menu'>
45
- <span id="f" class="<%= 'active' if current_user.editor == 'visual' %>">
46
- <%= build_editor_link("Visual", 'insert_editor', 'fck', 'visual_editor', 'visual') %>
47
- </span>
48
- <span id="s" class="<%= 'active' if current_user.editor == 'simple' %>">
49
- <%= build_editor_link("HTML", 'insert_editor', 'simple', 'simple_editor', 'simple') %>
50
- </span>
51
- </div>
52
- <div id="editor">
45
+
53
46
  <%= render(:partial => 'images', :object => @images) unless @images.empty? %>
54
- <div id='quicktags' style='<%= "display: none;" if current_user.editor == 'visual' %>'>
55
- <script type="text/javascript">edToolbar('article_body_and_extended');</script>
56
- </div>
57
- <div id ='visual_editor' <%= "style='display: none;'" if current_user.editor == 'simple'%> >
58
- <%= ckeditor_textarea('article', 'body_and_extended', {:class => 'large', :height => '300px', :rows => '20'}) if current_user.editor == 'visual' %>
59
- </div>
60
- <div id='simple_editor' <%= "style='display: none;'" if current_user.editor == 'visual'%> >
61
- <%= text_area('article', 'body_and_extended', {:class => 'large', :height => '300px', :rows => '20'}) %>
62
- <%= render_macros(@macros) if current_user.editor == 'simple' %>
47
+
48
+ <ul id='editor-menu'>
49
+ <li id="f" class=" <%= 'active' if current_user.editor == 'visual' %>">
50
+ <%= build_editor_link("Visual", 'insert_editor', 'fck', 'visual_editor', 'visual') %>
51
+ </li>
52
+ <li id="s" class=" <%= 'active' if current_user.editor == 'simple' %>">
53
+ <%= build_editor_link("HTML", 'insert_editor', 'simple', 'simple_editor', 'simple') %>
54
+ </li>
55
+ </ul>
56
+
57
+ <div id="editor" class='ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active'>
58
+ <div id='quicktags' style='<%= "display: none;" if current_user.editor == 'visual' %>'>
59
+ <script type="text/javascript">edToolbar('article_body_and_extended');</script>
60
+ </div>
61
+
62
+ <div id ='visual_editor' <%= "style='display: none;'" if current_user.editor == 'simple'%> >
63
+ <%= ckeditor_textarea('article', 'body_and_extended', {:class => 'large', :height => '300px', :rows => '20'}) if current_user.editor == 'visual' %>
64
+ </div>
65
+
66
+ <div id='simple_editor' class='input_text' <%= "style='display: none;'" if current_user.editor == 'visual'%> >
67
+ <%= text_area('article', 'body_and_extended', {:class => 'large', :height => '300px', :rows => '20'}) if current_user.editor == 'simple' %>
68
+ <%= render_macros(@macros) if current_user.editor == 'simple' %>
69
+ </div>
63
70
  </div>
64
- </div>
65
- <div class='editor_bottom'>
66
- <div class='editor_bottom_right'></div>
67
- </div>
68
- <div>
71
+
69
72
  <h3><label for="article_keywords"><%= _("Tags") %></label></h3>
70
- <p class='input_text_title'>
73
+ <p class='input_text'>
71
74
  <%= text_field 'article', 'keywords', {:autocomplete => 'off', :class => 'large small'} %>
72
75
  </p>
73
76
  <%= auto_complete_field 'article_keywords', { :url => { :action => "auto_complete_for_article_keywords"}, :tokens => ','}%>
74
77
  </div>
75
78
 
76
- <h3><label for='article_excerpt'><%= _("Excerpt") %></label></h3>
77
- <div class='blue_block'>
78
- <%= text_area 'article', 'excerpt', {:height => '150', :class => 'large', :rows => '5'} %>
79
- <p><%=_("Excerpts are posts summaries that are shown on your blog homepage only but won’t appear on the post itself")%></p>
79
+ <div class='ui-accordion ui-widget ui-helper-reset ui-accordion-icons settings'>
80
+ <h3 class='ui-accordion-header ui-helper-reset ui-state-active ui-corner-top'><span class='ui-icon ui-icon-pencil'> </span><%= _("Excerpt")%></h3>
81
+ <div class='ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active'>
82
+ <p><%=_("Excerpts are posts summaries that are shown on your blog homepage only but won’t appear on the post itself")%></p>
83
+ <%= text_area 'article', 'excerpt', {:height => '150', :class => 'large', :rows => '5'} %>
84
+ </div>
80
85
  </div>
81
-
82
- <h3><label class="block"><%= _("Uploads") %></label></h3>
83
- <div class='blue_block'>
84
- Uploads will be displayed as attachments in your RSS feed, but won't appear in your articles.
85
- <ul id='attachments'>
86
- <%= render :partial => 'admin/content/attachment', :locals => { :attachment_num => 1, :hidden => false } -%>
87
- </ul>
88
- </div>
89
-
90
- <h3><label class="block"><%= _("Post settings") %></label></h3>
91
- <div class='blue_block'>
92
- <div>
93
- <label class='float'><%= _("Publish at")%></label>
94
- <p class='input_text_title'>
95
- <%= calendar_date_select 'article', 'published_at' %>
96
- </p>
97
- </div>
98
- <div>
99
- <label class='float' for="article_permalink"><%= _("Permalink") %></label>
100
- <p class='input_text_title' id='permalink'>
101
- <%= text_field 'article', 'permalink', {:class => 'small medium'} %>
102
- </p>
86
+
87
+ <div class='ui-accordion ui-widget ui-helper-reset ui-accordion-icons settings'>
88
+ <h3 class='ui-accordion-header ui-helper-reset ui-state-active ui-corner-top'><span class='ui-icon ui-icon-pencil'> </span><%= _("Uploads")%></h3>
89
+ <div class='ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active'>
90
+ <p>Uploads will be displayed as attachments in your RSS feed, but won't appear in your articles.</p>
91
+
92
+ <ul id='attachments'>
93
+ <%= render :partial => 'admin/content/attachment', :locals => { :attachment_num => 1, :hidden => false } -%>
94
+ </ul>
103
95
  </div>
104
- <div>
96
+ </div>
97
+
98
+ <div class='ui-accordion ui-widget ui-helper-reset ui-accordion-icons settings'>
99
+ <h3 class='ui-accordion-header ui-helper-reset ui-state-active ui-corner-top'><span class='ui-icon ui-icon-pencil'> </span><%= _("Post settings")%></h3>
100
+ <div class='ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active'>
101
+ <div class='setting'>
102
+ <label class='float'><%= _("Publish at")%></label>
103
+ <div class='input_text'>
104
+ <%= calendar_date_select 'article', 'published_at' %>
105
+ </div>
106
+ </div>
107
+ <div class='setting clear'>
108
+ <label class='float' for="article_permalink"><%= _("Permalink") %></label>
109
+ <div class='input_text' id='permalink'>
110
+ <%= text_field 'article', 'permalink', {:class => 'medium'} %>
111
+ </div>
112
+ </div>
113
+ <div class='setting clear'>
105
114
  <label class='float' for="text_filter"><%= _("Article filter")%></label>
106
- <p class='input_text_title'>
115
+ <div class='input_text'>
107
116
  <select name="article[text_filter]" id="text_filter">
108
117
  <%= options_for_select text_filter_options, @article.text_filter %>
109
118
  </select>
110
- </p>
119
+ </div>
111
120
  </div>
112
121
  </div>
113
-
114
122
  </div>