Skip to content
Browse files

All views converted over to haml.

  • Loading branch information...
1 parent f7c22a0 commit 0b44dccdec5903f7832056b7d0698e360cbee443 @radar committed Feb 2, 2009
Showing with 1,801 additions and 1,665 deletions.
  1. +0 −27 app/views/admin/categories/_category.html.erb
  2. +18 −0 app/views/admin/categories/_category.html.haml
  3. +0 −6 app/views/admin/categories/_form.html.erb
  4. +6 −0 app/views/admin/categories/_form.html.haml
  5. +0 −11 app/views/admin/categories/edit.html.erb
  6. +22 −0 app/views/admin/categories/edit.html.haml
  7. +0 −24 app/views/admin/categories/index.html.erb
  8. +26 −0 app/views/admin/categories/index.html.haml
  9. +0 −11 app/views/admin/categories/new.html.erb
  10. +18 −0 app/views/admin/categories/new.html.haml
  11. +0 −4 app/views/admin/categories/show.html.erb
  12. +6 −0 app/views/admin/categories/show.html.haml
  13. +0 −35 app/views/admin/forums/_form.html.erb
  14. +27 −0 app/views/admin/forums/_form.html.haml
  15. +0 −22 app/views/admin/forums/_forum.html.erb
  16. +24 −0 app/views/admin/forums/_forum.html.haml
  17. +0 −24 app/views/admin/forums/_forums.html.erb
  18. +19 −0 app/views/admin/forums/_forums.html.haml
  19. +0 −15 app/views/admin/forums/edit.html.erb
  20. +22 −0 app/views/admin/forums/edit.html.haml
  21. +0 −5 app/views/admin/forums/index.html.erb
  22. +7 −0 app/views/admin/forums/index.html.haml
  23. +0 −12 app/views/admin/forums/new.html.erb
  24. +24 −0 app/views/admin/forums/new.html.haml
  25. +0 −2 app/views/admin/index/index.html.erb
  26. +3 −0 app/views/admin/index/index.html.haml
  27. +0 −23 app/views/admin/ips/index.html.erb
  28. +21 −0 app/views/admin/ips/index.html.haml
  29. +0 −23 app/views/admin/ips/show.html.erb
  30. +29 −0 app/views/admin/ips/show.html.haml
  31. +0 −32 app/views/admin/posts/index.html.erb
  32. +32 −0 app/views/admin/posts/index.html.haml
  33. +0 −20 app/views/admin/ranks/_form.html.erb
  34. +19 −0 app/views/admin/ranks/_form.html.haml
  35. +0 −16 app/views/admin/ranks/edit.html.erb
  36. +19 −0 app/views/admin/ranks/edit.html.haml
  37. +0 −27 app/views/admin/ranks/index.html.erb
  38. +28 −0 app/views/admin/ranks/index.html.haml
  39. +0 −14 app/views/admin/ranks/new.html.erb
  40. +17 −0 app/views/admin/ranks/new.html.haml
  41. +0 −27 app/views/admin/themes/index.html.erb
  42. +27 −0 app/views/admin/themes/index.html.haml
  43. 0 app/views/admin/themes/{new.html.erb → new.html.haml}
  44. +0 −32 app/views/admin/topics/index.html.erb
  45. +33 −0 app/views/admin/topics/index.html.haml
  46. +0 −26 app/views/admin/users/ban.html.erb
  47. +25 −0 app/views/admin/users/ban.html.haml
  48. +0 −50 app/views/admin/users/ban_ip.html.erb
  49. +45 −0 app/views/admin/users/ban_ip.html.haml
  50. +0 −49 app/views/admin/users/edit.html.erb
  51. +45 −0 app/views/admin/users/edit.html.haml
  52. +0 −42 app/views/admin/users/index.html.erb
  53. +42 −0 app/views/admin/users/index.html.haml
  54. +0 −40 app/views/admin/users/show.html.erb
  55. +63 −0 app/views/admin/users/show.html.haml
  56. +0 −22 app/views/forums/_forum.html.erb
  57. +28 −0 app/views/forums/_forum.html.haml
  58. +96 −0 app/views/forums/index.html.haml
  59. +0 −116 app/views/forums/show.html.erb
  60. +98 −0 app/views/forums/show.html.haml
  61. +0 −15 app/views/layouts/admin.html.erb
  62. +19 −0 app/views/layouts/admin.html.haml
  63. +0 −55 app/views/layouts/application.html.erb
  64. +57 −0 app/views/layouts/application.html.haml
  65. +0 −10 app/views/layouts/moderator.html.erb
  66. +8 −0 app/views/layouts/moderator.html.haml
  67. +0 −6 app/views/messages/_message.html.erb
  68. +10 −0 app/views/messages/_message.html.haml
  69. +0 −19 app/views/messages/index.html.erb
  70. +18 −0 app/views/messages/index.html.haml
  71. +0 −16 app/views/messages/new.html.erb
  72. +20 −0 app/views/messages/new.html.haml
  73. +0 −15 app/views/messages/reply.html.erb
  74. +24 −0 app/views/messages/reply.html.haml
  75. +0 −19 app/views/messages/sent.html.erb
  76. +24 −0 app/views/messages/sent.html.haml
  77. +0 −20 app/views/messages/show.html.erb
  78. +19 −0 app/views/messages/show.html.haml
  79. +0 −20 app/views/moderator/edits/index.html.erb
  80. +24 −0 app/views/moderator/edits/index.html.haml
  81. +0 −17 app/views/moderator/edits/show.html.erb
  82. +19 −0 app/views/moderator/edits/show.html.haml
  83. +0 −2 app/views/moderator/index/index.html.erb
  84. +3 −0 app/views/moderator/index/index.html.haml
  85. +0 −13 app/views/moderator/moderations/edit.html.erb
  86. +9 −0 app/views/moderator/moderations/edit.html.haml
  87. +0 −41 app/views/moderator/moderations/index.html.erb
  88. +36 −0 app/views/moderator/moderations/index.html.haml
  89. +0 −44 app/views/moderator/posts/split.html.erb
  90. +53 −0 app/views/moderator/posts/split.html.haml
  91. +0 −21 app/views/moderator/topics/merge.html.erb
  92. +24 −0 app/views/moderator/topics/merge.html.haml
  93. +0 −20 app/views/moderator/topics/move.html.erb
  94. +21 −0 app/views/moderator/topics/move.html.haml
  95. +0 −32 app/views/posts/_form.html.erb
  96. +21 −0 app/views/posts/_form.html.haml
  97. +0 −54 app/views/posts/_post.html.erb
  98. +63 −0 app/views/posts/_post.html.haml
  99. +0 −15 app/views/posts/edit.html.erb
  100. +13 −0 app/views/posts/edit.html.haml
  101. +0 −25 app/views/posts/new.html.erb
  102. +20 −0 app/views/posts/new.html.haml
  103. +0 −11 app/views/search/index.html.erb
  104. +15 −0 app/views/search/index.html.haml
  105. +0 −2 app/views/search/user.html.erb
  106. +2 −0 app/views/search/user.html.haml
  107. +0 −30 app/views/subscriptions/index.html.erb
  108. +30 −0 app/views/subscriptions/index.html.haml
  109. +0 −12 app/views/topics/_buttons.html.erb
  110. +11 −0 app/views/topics/_buttons.html.haml
  111. +0 −20 app/views/topics/_form.html.erb
  112. +18 −0 app/views/topics/_form.html.haml
  113. +0 −33 app/views/topics/_menu.html.erb
  114. +23 −0 app/views/topics/_menu.html.haml
  115. +0 −17 app/views/topics/edit.html.erb
  116. +21 −0 app/views/topics/edit.html.haml
  117. +0 −17 app/views/topics/new.html.erb
  118. +21 −0 app/views/topics/new.html.haml
  119. +0 −26 app/views/topics/show.html.erb
  120. +25 −0 app/views/topics/show.html.haml
  121. +0 −101 app/views/users/edit.html.erb
  122. +62 −0 app/views/users/edit.html.haml
  123. +0 −34 app/views/users/index.html.erb
  124. +26 −0 app/views/users/index.html.haml
  125. +0 −17 app/views/users/ip_is_banned.html.erb
  126. +25 −0 app/views/users/ip_is_banned.html.haml
  127. +0 −26 app/views/users/login.html.erb
  128. +22 −0 app/views/users/login.html.haml
  129. +0 −10 app/views/users/logout.html.erb
  130. +6 −0 app/views/users/logout.html.haml
  131. +0 −37 app/views/users/show.html.erb
  132. +59 −0 app/views/users/show.html.haml
  133. +0 −36 app/views/users/signup.html.erb
  134. +33 −0 app/views/users/signup.html.haml
  135. +8 −0 vendor/plugins/haml/init.rb
View
27 app/views/admin/categories/_category.html.erb
@@ -1,27 +0,0 @@
-<tr>
- <td class='icon'>
- <%= link_to theme_image_tag("edit.jpg"), edit_admin_category_path(category) %>
- <%= link_to theme_image_tag("delete.jpg"), admin_category_path(category), :method => "delete", :confirm => t(:confirm_category_deletion) %>
- </td>
-
- <td style='text-align:left !important'>
- <%= theme_image_tag("extender.jpg", :style => "padding-left:#{depth*20}px") if extender %>
- <%= link_to category.name, admin_category_path(category) %>
- </td>
-
- <td><%= link_to(pluralize(category.forums.count, "forum"), admin_category_path(category)) %></td>
-
- <td>
- <% unless category.first? %>
- <%= link_to theme_image_tag("top.jpg"), move_to_top_admin_category_path(category), :method => :put %>
- <%= link_to theme_image_tag("up.jpg"), move_up_admin_category_path(category), :method => :put %>
- <% end %>
- <%= category.position %>
- <% unless category.last? %>
- <%= link_to theme_image_tag("down.jpg"), move_down_admin_category_path(category), :method => :put %>
- <%= link_to theme_image_tag("bottom.jpg"), move_to_bottom_admin_category_path(category), :method => :put %>
- <% end %>
- </td>
-
-</tr>
-<%= render :partial => category.children.sort_by(&:position), :locals => { :extender => true, :depth => depth+1 } %>
View
18 app/views/admin/categories/_category.html.haml
@@ -0,0 +1,18 @@
+%tr
+ %td.icon
+ = link_to theme_image_tag("edit.jpg"), edit_admin_category_path(category)
+ = link_to theme_image_tag("delete.jpg"), admin_category_path(category), :method => "delete", :confirm => t(:confirm_category_deletion)
+ %td{ :style => "text-align:left !important" }
+ = theme_image_tag("extender.jpg", :style => "padding-left:#{depth*20}px") if extender
+ = link_to category.name, admin_category_path(category)
+ %td
+ = link_to(pluralize(category.forums.count, "forum"), admin_category_path(category))
+ %td
+ - unless category.first?
+ = link_to theme_image_tag("top.jpg"), move_to_top_admin_category_path(category), :method => :put
+ = link_to theme_image_tag("up.jpg"), move_up_admin_category_path(category), :method => :put
+ = category.position
+ - unless category.last?
+ = link_to theme_image_tag("down.jpg"), move_down_admin_category_path(category), :method => :put
+ = link_to theme_image_tag("bottom.jpg"), move_to_bottom_admin_category_path(category), :method => :put
+= render :partial => category.children.sort_by(&:position), :locals => { :extender => true, :depth => depth+1 }
View
6 app/views/admin/categories/_form.html.erb
@@ -1,6 +0,0 @@
-<tbody>
- <tr>
- <td><%= f.label "name" %></td>
- <td><%= f.text_field "name" %></td>
- </tr>
-</tbody>
View
6 app/views/admin/categories/_form.html.haml
@@ -0,0 +1,6 @@
+%tbody
+ %tr
+ %td
+ = f.label "name"
+ %td
+ = f.text_field "name"
View
11 app/views/admin/categories/edit.html.erb
@@ -1,11 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= link_to(t(:Categories), admin_categories_path) %> -> <%= t(:Editing_a_category) %>: <%= @category.name %>
-<%= error_messages_for :category %>
-<% form_for [:admin, @category] do |f| %>
- <table cellspacing='0' cellpadding='2' width='100%' class='action-box'>
- <thead><tr><td colspan='2'><h2><%= t(:Editing_a_category) %>: <%= @category.name %></h2></td></tr></thead>
- <%= render :partial => "form", :locals => { :f => f } %>
- <tfoot>
- <tr><td colspan='2'><%= f.submit t(:Update) %></td></tr>
- </tfoot>
- </table>
-<% end %>
View
22 app/views/admin/categories/edit.html.haml
@@ -0,0 +1,22 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= link_to(t(:Categories), admin_categories_path)
+\->
+= t(:Editing_a_category)
+\:
+= @category.name
+= error_messages_for :category
+- form_for [:admin, @category] do |f|
+%table.action-box{ :cellspacing => "0", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td{ :colspan => "2" }
+ %h2
+ = t(:Editing_a_category)
+ \:
+ = @category.name
+ = render :partial => "form", :locals => { :f => f }
+ %tfoot
+ %tr
+ %td{ :colspan => "2" }
+ = f.submit t(:Update)
View
24 app/views/admin/categories/index.html.erb
@@ -1,24 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= t(:Categories) %>
-<h2><%= t(:Categories) %></h2>
-<%= link_to t(:New_Category), new_admin_category_path %>
-<table cellspacing='0' cellpadding='3' width='100%' class='list-table' rules='groups'>
- <% unless @categories.empty? %>
- <thead>
- <tr>
- <td>&nbsp;</td>
- <td><%= t(:Name) %></td>
- <td><%= t(:Forums) %></td>
- <td><%= t(:Position) %></td>
- </tr>
- </thead>
- <tbody>
- <%= render :partial => @categories, :locals => { :depth => 0, :extender => false } %>
- </tbody>
- <% else %>
- <thead>
- <tr>
- <td colspan='3' align='center'><%= t(:no_categories) %> <%= link_to t(:user_should_create), new_admin_category_path %></td>
- </tr>
- </thead>
- <% end %>
-</table>
View
26 app/views/admin/categories/index.html.haml
@@ -0,0 +1,26 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= t(:Categories)
+%h2
+ = t(:Categories)
+= link_to t(:New_Category), new_admin_category_path
+%table.list-table{ :cellspacing => "0", :rules => "groups", :cellpadding => "3", :width => "100%" }
+ - unless @categories.empty?
+ %thead
+ %tr
+ %td
+ \&nbsp;
+ %td
+ = t(:Name)
+ %td
+ = t(:Forums)
+ %td
+ = t(:Position)
+ %tbody
+ = render :partial => @categories, :locals => { :depth => 0, :extender => false }
+ - else
+ %thead
+ %tr
+ %td{ :align => "center", :colspan => "3" }
+ = t(:no_categories)
+ = link_to t(:user_should_create), new_admin_category_path
View
11 app/views/admin/categories/new.html.erb
@@ -1,11 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= link_to(t(:Categories), admin_categories_path) %> -> <%= t(:Creating_a_category) %>
-<%= error_messages_for :category %>
-<% form_for [:admin, @category] do |f| %>
- <table cellspacing='0' cellpadding='2' width='100%' class='action-box'>
- <thead><tr><td colspan='2'><h2><%= t(:Creating_a_category) %></h2></td></tr></thead>
- <%= render :partial => "form", :locals => { :f => f } %>
- <tfoot>
- <tr><td colspan='2'><%= f.submit t(:Create) %></td></tr>
- </tfoot>
- </table>
-<% end %>
View
18 app/views/admin/categories/new.html.haml
@@ -0,0 +1,18 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= link_to(t(:Categories), admin_categories_path)
+\->
+= t(:Creating_a_category)
+= error_messages_for :category
+- form_for [:admin, @category] do |f|
+ %table.action-box{ :cellspacing => "0", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td{ :colspan => "2" }
+ %h2
+ = t(:Creating_a_category)
+ = render :partial => "form", :locals => { :f => f }
+ %tfoot
+ %tr
+ %td{ :colspan => "2" }
+ = f.submit t(:Create)
View
4 app/views/admin/categories/show.html.erb
@@ -1,4 +0,0 @@
-<h2><%= t(:Forums) %> <%= t(:for) %> <%= @category.name %></h2>
-<%= link_to t(:New_Forum), new_admin_category_forum_path(@category) %>
-
-<%= render :partial => "admin/forums/forums" %>
View
6 app/views/admin/categories/show.html.haml
@@ -0,0 +1,6 @@
+%h2
+ = t(:Forums)
+ = t(:for)
+ = @category.name
+= link_to t(:New_Forum), new_admin_category_forum_path(@category)
+= render :partial => "admin/forums/forums"
View
35 app/views/admin/forums/_form.html.erb
@@ -1,35 +0,0 @@
-<tbody>
- <tr>
- <td><%= f.label :title, t(:Title) %></td>
- <td><%= f.text_field "title" %></td>
- </tr>
-
- <tr>
- <td valign='top'><%= f.label :description, t(:Description) %></td>
- <td><%= f.text_area "description", :cols => 40, :rows => 5 %></td>
- </tr>
-
- <tr>
- <td><%= f.label :is_visible_to_id, t(:Is_visible_to) %></td>
- <td><%= f.select "is_visible_to_id", @user_levels.map { |u| [u.name, u.id] } %></td>
- </tr>
-
- <tr>
- <td><%= f.label :topics_created_by_id, t(:Topics_created_by) %></td>
- <td><%= f.select "topics_created_by_id", @user_levels.map { |u| [u.name, u.id] } %></td>
- </tr>
-
- <% unless @forums.empty? %>
- <tr>
- <td><%= f.label :parent_id, t(:Child_of) %></td>
- <td><%= f.select "parent_id", @forums.map { |forum| [select_display(forum),forum.id] }, :include_blank => true %></td>
- </tr>
- <% end %>
-
- <% unless @category %>
- <tr>
- <td><%= f.label :category_id, t(:Category) %></td>
- <td><%= f.select "category_id", @categories.map { |category| [select_display(category, 'name'), category.id] }, :include_blank => true %></td>
- </tr>
- <% end %>
-</tbody>
View
27 app/views/admin/forums/_form.html.haml
@@ -0,0 +1,27 @@
+%tbody
+ %tr
+ %td= f.label :title, t(:Title)
+ %td= f.text_field "title"
+ %tr
+ %td{ :valign => "top" }= f.label :description, t(:Description)
+ %td= f.text_area "description", :cols => 40, :rows => 5
+ %tr
+ %td= f.label :is_visible_to_id, t(:Is_visible_to)
+ %td= f.select "is_visible_to_id", @user_levels.map { |u| [u.name, u.id] }
+ %tr
+ %td
+ = f.label :topics_created_by_id, t(:Topics_created_by)
+ %td
+ = f.select "topics_created_by_id", @user_levels.map { |u| [u.name, u.id] }
+ - unless @forums.empty?
+ %tr
+ %td
+ = f.label :parent_id, t(:Child_of)
+ %td
+ = f.select "parent_id", @forums.map { |forum| [select_display(forum),forum.id] }, :include_blank => true
+ - unless @category
+ %tr
+ %td
+ = f.label :category_id, t(:Category)
+ %td
+ = f.select "category_id", @categories.map { |category| [select_display(category, 'name'), category.id] }, :include_blank => true
View
22 app/views/admin/forums/_forum.html.erb
@@ -1,22 +0,0 @@
-<tr>
- <td class='icon'><%= link_to theme_image_tag("edit.jpg"), edit_admin_forum_path(forum) %>
- <%= link_to theme_image_tag("delete.jpg"), admin_forum_path(forum), :method => "delete", :confirm => t(:confirm_forum_deletion) %></td>
- <td style='text-align:left !important'> <%= theme_image_tag("extender.jpg", :style => "padding-left:#{depth*20}px") if extender %>
-<%= link_to forum.title, forum_path(forum) %></td>
- <td><%= forum.is_visible_to %></td>
- <td><%= forum.topics_created_by %></td>
- <td><%= forum.topics.size %></td>
- <td><%= forum.posts.size %></td>
- <td>
- <% unless forum.first? %>
- <%= link_to theme_image_tag("top.jpg"), move_to_top_admin_forum_path(forum), :method => :put %>
- <%= link_to theme_image_tag("up.jpg"), move_up_admin_forum_path(forum), :method => :put %>
- <% end %>
- <%= forum.position %>
- <% unless forum.last? %>
- <%= link_to theme_image_tag("down.jpg"), move_down_admin_forum_path(forum), :method => :put %>
- <%= link_to theme_image_tag("bottom.jpg"), move_to_bottom_admin_forum_path(forum), :method => :put %>
- <% end %>
- </td>
-</tr>
-<%= render :partial => forum.children.sort_by(&:position), :locals => { :extender => true, :depth => depth+1 } %>
View
24 app/views/admin/forums/_forum.html.haml
@@ -0,0 +1,24 @@
+%tr
+ %td.icon
+ = link_to theme_image_tag("edit.jpg"), edit_admin_forum_path(forum)
+ = link_to theme_image_tag("delete.jpg"), admin_forum_path(forum), :method => "delete", :confirm => t(:confirm_forum_deletion)
+ %td{ :style => "text-align:left !important" }
+ = theme_image_tag("extender.jpg", :style => "padding-left:#{depth*20}px") if extender
+ = link_to forum.title, forum_path(forum)
+ %td
+ = forum.is_visible_to
+ %td
+ = forum.topics_created_by
+ %td
+ = forum.topics.size
+ %td
+ = forum.posts.size
+ %td
+ - unless forum.first?
+ = link_to theme_image_tag("top.jpg"), move_to_top_admin_forum_path(forum), :method => :put
+ = link_to theme_image_tag("up.jpg"), move_up_admin_forum_path(forum), :method => :put
+ = forum.position
+ - unless forum.last?
+ = link_to theme_image_tag("down.jpg"), move_down_admin_forum_path(forum), :method => :put
+ = link_to theme_image_tag("bottom.jpg"), move_to_bottom_admin_forum_path(forum), :method => :put
+= render :partial => forum.children.sort_by(&:position), :locals => { :extender => true, :depth => depth+1 }
View
24 app/views/admin/forums/_forums.html.erb
@@ -1,24 +0,0 @@
-<table cellspacing='0' cellpadding='3' width='100%' class='list-table' rules='groups'>
- <% unless @forums.empty? %>
- <thead>
- <tr>
- <td>&nbsp;</td>
- <td><%= t(:Title) %></td>
- <td><%= t(:Is_visible_to) %></td>
- <td><%= t(:Creator) %></td>
- <td><%= t(:Topics) %></td>
- <td><%= t(:Posts) %></td>
- <td><%= t(:Position) %></td>
- </tr>
- </thead>
- <tbody>
- <%= render :partial => "admin/forums/forum", :collection => @forums, :locals => { :depth => 0, :extender => false } %>
- </tbody>
- <% else %>
- <thead>
- <tr>
- <td colspan='3' align='center'><%= t(:no_forums) %> <%= link_to t(:user_should_create), @category.nil? ? new_admin_forum_path : new_admin_category_forum_path(@category) %></td>
- </tr>
- </thead>
- <% end %>
-</table>
View
19 app/views/admin/forums/_forums.html.haml
@@ -0,0 +1,19 @@
+%table.list-table{ :cellspacing => "0", :rules => "groups", :cellpadding => "3", :width => "100%" }
+ - unless @forums.empty?
+ %thead
+ %tr
+ %td &nbsp;
+ %td= t(:Title)
+ %td= t(:Is_visible_to)
+ %td= t(:Creator)
+ %td= t(:Topics)
+ %td= t(:Posts)
+ %td= t(:Position)
+ %tbody
+ = render :partial => "admin/forums/forum", :collection => @forums, :locals => { :depth => 0, :extender => false }
+ - else
+ %thead
+ %tr
+ %td{ :align => "center", :colspan => "3" }
+ = t(:no_forums)
+ = link_to t(:user_should_create), @category.nil? ? new_admin_forum_path : new_admin_category_forum_path(@category)
View
15 app/views/admin/forums/edit.html.erb
@@ -1,15 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= link_to(t(:Forums), admin_forums_path) %> -> <%= t(:Editing_a_forum) %>: <%= @forum.title %>
-<%= error_messages_for :forum %>
-<% form_for [:admin, @forum] do |f| %>
- <table cellspacing='0' cellpadding='2' class='action-box' width='100%'>
- <thead>
- <tr>
- <td colspan='2'><h2><%= t(:Editing_a_forum) %>: <%= @forum.title %></h2></td>
- </tr>
- </thead>
- <%= render :partial => "form", :locals => { :f => f } %>
- <tfoot>
- <tr><td colspan='2'><%= submit_tag(t(:Update)) %></td></tr>
- </tfoot>
- </table>
-<% end %>
View
22 app/views/admin/forums/edit.html.haml
@@ -0,0 +1,22 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= link_to(t(:Forums), admin_forums_path)
+\->
+= t(:Editing_a_forum)
+\:
+= @forum.title
+= error_messages_for :forum
+- form_for [:admin, @forum] do |f|
+ %table.action-box{ :cellspacing => "0", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td{ :colspan => "2" }
+ %h2
+ = t(:Editing_a_forum)
+ \:
+ = @forum.title
+ = render :partial => "form", :locals => { :f => f }
+ %tfoot
+ %tr
+ %td{ :colspan => "2" }
+ = submit_tag(t(:Update))
View
5 app/views/admin/forums/index.html.erb
@@ -1,5 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= t(:Forums) %>
-<h2><%= t(:Forums) %></h2>
-<%= link_to t(:New_Forum), new_admin_forum_path %>
-
-<%= render :partial => "forums" %>
View
7 app/views/admin/forums/index.html.haml
@@ -0,0 +1,7 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= t(:Forums)
+%h2
+ = t(:Forums)
+= link_to t(:New_Forum), new_admin_forum_path
+= render :partial => "forums"
View
12 app/views/admin/forums/new.html.erb
@@ -1,12 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= link_to(t(:Forums), admin_forums_path) %> -> <%= t(:Creating_a_forum) %>
-<% if @category %><%= t(:for) %> <%= @category.name %><% end %>
-<%= error_messages_for :forum %>
-<% form_for [:admin, @category, @forum] do |f| %>
- <table cellspacing='0' cellpadding='2' width='100%' class='action-box'>
- <thead><tr><td colspan='2'><h2><%= t(:Creating_a_forum) %> <% if @category %><%= t(:for) %> <%= @category.name %><% end %></h2></td></tr></thead>
- <%= render :partial => "form", :locals => { :f => f } %>
- <tfoot>
- <tr><td colspan='2'><%= submit_tag "Create", :value => t(:Create) %></td></tr>
- </tfoot>
- </table>
-<% end %>
View
24 app/views/admin/forums/new.html.haml
@@ -0,0 +1,24 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= link_to(t(:Forums), admin_forums_path)
+\->
+= t(:Creating_a_forum)
+- if @category
+ = t(:for)
+ = @category.name
+= error_messages_for :forum
+- form_for [:admin, @category, @forum] do |f|
+ %table.action-box{ :cellspacing => "0", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td{ :colspan => "2" }
+ %h2
+ = t(:Creating_a_forum)
+ - if @category
+ = t(:for)
+ = @category.name
+ = render :partial => "form", :locals => { :f => f }
+ %tfoot
+ %tr
+ %td{ :colspan => "2" }
+ = submit_tag "Create", :value => t(:Create)
View
2 app/views/admin/index/index.html.erb
@@ -1,2 +0,0 @@
-<h2><%= t(:admin_section) %></h2>
-<%= t(:please_choose_from_tabs) %>
View
3 app/views/admin/index/index.html.haml
@@ -0,0 +1,3 @@
+%h2
+ = t(:admin_section)
+= t(:please_choose_from_tabs)
View
23 app/views/admin/ips/index.html.erb
@@ -1,23 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= t(:Users) %> -> <%= @user %> -> IPs
-<h2><%= t(:IPs, :for => @user) %></h2>
-<table cellspacing='0' cellpadding='2' class='list-table' width='100%' rules='groups'>
- <thead>
- <tr>
- <td><%= t(:IP) %></td>
- <td><%= t(:Topics) %></td>
- <td><%= t(:Posts) %></td>
-
- </tr>
- </thead>
- <tbody>
- <% for ip in @ips %>
- <tr>
- <td><%= link_to ip.ip, admin_ip_path(ip) %></td>
- <td><%= link_to t(:topics, :count => ip.topics.count), admin_ip_topics_path(ip) %></td>
- <td><%= link_to t(:posts, :count => ip.posts.count), admin_ip_posts_path(ip) %></td>
- </tr>
- <% end %>
- </tbody>
- <tfoot>
- </tfoot>
-</table>
View
21 app/views/admin/ips/index.html.haml
@@ -0,0 +1,21 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= t(:Users)
+\->
+= @user
+\-> IPs
+%h2
+ = t(:IPs, :for => @user)
+%table.list-table{ :cellspacing => "0", :rules => "groups", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td= t(:IP)
+ %td= t(:Topics)
+ %td= t(:Posts)
+ %tbody
+ - for ip in @ips
+ %tr
+ %td= link_to ip.ip, admin_ip_path(ip)
+ %td= link_to t(:topics, :count => ip.topics.count), admin_ip_topics_path(ip)
+ %td= link_to t(:posts, :count => ip.posts.count), admin_ip_posts_path(ip)
+ %tfoot
View
23 app/views/admin/ips/show.html.erb
@@ -1,23 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= t(:IPs) %> -> <%= @ip %>
-<h2><%= @ip %></h2>
-<table cellspacing='0' cellpadding='2' class='list-table' width='100%' rules='groups'>
- <thead>
- <tr>
- <td><%= t(:IP) %></td>
- <td><%= t(:Topics) %></td>
- <td><%= t(:Posts) %></td>
- <td><%= t(:Users) %></td>
-
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><%= link_to @ip.ip, admin_ip_path(@ip) %></td>
- <td><%= link_to t(:topics, :count => ip.topics.count), admin_ip_topics_path(@ip) %></td>
- <td><%= link_to t(:posts, :count => ip.posts.count), admin_ip_posts_path(@ip) %></td>
- <td><%= link_to t(:users, :count => ip.users.count), admin_ip_users_path(@ip) %></td>
- </tr>
- </tbody>
- <tfoot>
- </tfoot>
-</table>
View
29 app/views/admin/ips/show.html.haml
@@ -0,0 +1,29 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= t(:IPs)
+\->
+= @ip
+%h2
+ = @ip
+%table.list-table{ :cellspacing => "0", :rules => "groups", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td
+ = t(:IP)
+ %td
+ = t(:Topics)
+ %td
+ = t(:Posts)
+ %td
+ = t(:Users)
+ %tbody
+ %tr
+ %td
+ = link_to @ip.ip, admin_ip_path(@ip)
+ %td
+ = link_to t(:topics, :count => ip.topics.count), admin_ip_topics_path(@ip)
+ %td
+ = link_to t(:posts, :count => ip.posts.count), admin_ip_posts_path(@ip)
+ %td
+ = link_to t(:users, :count => ip.users.count), admin_ip_users_path(@ip)
+ %tfoot
View
32 app/views/admin/posts/index.html.erb
@@ -1,32 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= t(:IPs) %> -> <%= link_to @ip, admin_ip_path(@ip) %> -> <%= t(:Posts) %>
-<h2><%= t(:Posts) %> <%= t(:for) %> <%= link_to @ip, admin_ip_path(@ip) %></h2>
-<table cellspacing='0' cellpadding='2' class='list-table' width='100%' rules='groups'>
- <thead>
- <tr>
- <td><%= t(:User) %></td>
- <td><%= t(:Text) %></td>
- <td><%= t(:Created_at) %></td>
- <td><%= t(:Topic) %></td>
- <td><%= t(:Forum) %></td>
- </tr>
- </thead>
- <tbody>
- <% unless @posts.empty? %>
- <% for post in @posts %>
- <tr>
- <td><%= link_to post.user, admin_user_path(post.user) %></td>
- <td><%= link_to truncate(post.text, 80), forum_topic_path(post.topic.forum, post.topic) + "#post_#{post.id}" %></td>
- <td><%= post.created_at.strftime(date_time_display) %></td>
- <td><%= link_to post.topic, forum_topic_path(post.topic.forum, post.topic) %></td>
- <td><%= link_to post.topic.forum, forum_path(post.topic.forum) %></td>
- </tr>
- <% end %>
- <% else %>
- <tr>
- <td colspan='4'><%= t(:no_posts, :by => @ip) %></td>
- </tr>
- <% end %>
- </tbody>
- <tfoot>
- </tfoot>
-</table>
View
32 app/views/admin/posts/index.html.haml
@@ -0,0 +1,32 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= t(:IPs)
+\->
+= link_to @ip, admin_ip_path(@ip)
+\->
+= t(:Posts)
+%h2
+ = t(:Posts)
+ = t(:for)
+ = link_to @ip, admin_ip_path(@ip)
+%table.list-table{ :cellspacing => "0", :rules => "groups", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td= t(:User)
+ %td= t(:Text)
+ %td= t(:Created_at)
+ %td= t(:Topic)
+ %td= t(:Forum)
+ %tbody
+ - unless @posts.empty?
+ - for post in @posts
+ %tr
+ %td= link_to post.user, admin_user_path(post.user)
+ %td= link_to truncate(post.text, 80), forum_topic_path(post.topic.forum, post.topic) + "#post_#{post.id}"
+ %td= post.created_at.strftime(date_time_display)
+ %td= link_to post.topic, forum_topic_path(post.topic.forum, post.topic)
+ %td= link_to post.topic.forum, forum_path(post.topic.forum)
+ - else
+ %tr
+ %td{ :colspan => "4" }= t(:no_posts, :by => @ip)
+ %tfoot
View
20 app/views/admin/ranks/_form.html.erb
@@ -1,20 +0,0 @@
-<tbody>
- <tr>
- <td colspan='2' class='errors'><%= error_messages_for :rank %></td>
- </tr>
-
- <tr>
- <td><%= f.label "name", t(:Name) %></td>
- <td><%= f.text_field "name" %></td>
- </tr>
-
- <tr>
- <td><%= f.label "posts_required", t(:Posts_Required) %></td>
- <td><%= f.text_field "posts_required", :size => 3 %></td>
- </tr>
-
- <tr>
- <td><%= f.label "custom", t(:Custom_Rank) %></td>
- <td><%= f.check_box "custom" %></td>
- </tr>
-</tbody>
View
19 app/views/admin/ranks/_form.html.haml
@@ -0,0 +1,19 @@
+%tbody
+ %tr
+ %td.errors{ :colspan => "2" }
+ = error_messages_for :rank
+ %tr
+ %td
+ = f.label "name", t(:Name)
+ %td
+ = f.text_field "name"
+ %tr
+ %td
+ = f.label "posts_required", t(:Posts_Required)
+ %td
+ = f.text_field "posts_required", :size => 3
+ %tr
+ %td
+ = f.label "custom", t(:Custom_Rank)
+ %td
+ = f.check_box "custom"
View
16 app/views/admin/ranks/edit.html.erb
@@ -1,16 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= link_to t(:Ranks), admin_ranks_path %> -> <%= t(:Editing_a_rank) %>: <%= @rank.name %>
-<% form_for [:admin, @rank] do |f| %>
-<table cellspacing='0' cellpadding='5' width='100%' class='action-box'>
- <thead>
- <tr>
- <td colspan='2'><h2><%= t(:Editing_a_rank) %></h2></td>
- </tr>
- </thead>
- <%= render :partial => "form", :locals => { :f => f } %>
- <tfoot>
- <tr>
- <td colspan='2'><%= submit_tag t(:Update) %></td>
- </tr>
- </tfoot>
-</table>
-<% end %>
View
19 app/views/admin/ranks/edit.html.haml
@@ -0,0 +1,19 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= link_to t(:Ranks), admin_ranks_path
+\->
+= t(:Editing_a_rank)
+\:
+= @rank.name
+- form_for [:admin, @rank] do |f|
+ %table.action-box{ :cellspacing => "0", :cellpadding => "5", :width => "100%" }
+ %thead
+ %tr
+ %td{ :colspan => "2" }
+ %h2
+ = t(:Editing_a_rank)
+ = render :partial => "form", :locals => { :f => f }
+ %tfoot
+ %tr
+ %td{ :colspan => "2" }
+ = submit_tag t(:Update)
View
27 app/views/admin/ranks/index.html.erb
@@ -1,27 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= t(:Ranks) %>
-<h2>Ranks</h2>
-<%= link_to t(:New_Rank), new_admin_rank_path %>
-<table cellspacing='0' cellpadding='5' width='100%' class='list-table' rules='groups'>
- <thead>
- <tr>
- <td>&nbsp;</td>
- <td><%= t(:Name) %></td>
- <td><%= t(:Posts_Required) %></td>
- <td><%= t(:Custom_Rank) %></td>
- </tr>
- </thead>
- <tbody>
- <% unless @ranks.empty? %>
- <% for rank in @ranks %>
- <tr>
- <td class='icon'><%= link_to(theme_image_tag("edit.jpg"), edit_admin_rank_path(rank)) %>
- <%= link_to(theme_image_tag("delete.jpg"), admin_rank_path(rank), :method => "delete", :confirm => t(:confirm_rank_deletion)) %></td>
- <td><%= rank.name %></td>
- <td><%= rank.posts_required.nil? ? t(:none) : rank.posts_required %></td>
- <td><%= rank.custom ? t(:yes) : t(:no) %></td></tr>
- <% end %>
- <% else %>
- <tr><td colspan='4'><b><%= t(:no_ranks) %> <%= link_to t(:user_should_create), new_admin_rank_path %></b></td></tr>
- <% end %>
- </tbody>
-</table>
View
28 app/views/admin/ranks/index.html.haml
@@ -0,0 +1,28 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= t(:Ranks)
+%h2
+ Ranks
+= link_to t(:New_Rank), new_admin_rank_path
+%table.list-table{ :cellspacing => "0", :rules => "groups", :cellpadding => "5", :width => "100%" }
+ %thead
+ %tr
+ %td &nbsp;
+ %td= t(:Name)
+ %td= t(:Posts_Required)
+ %td= t(:Custom_Rank)
+ %tbody
+ - unless @ranks.empty?
+ - for rank in @ranks
+ %tr
+ %td.icon
+ = link_to(theme_image_tag("edit.jpg"), edit_admin_rank_path(rank))
+ = link_to(theme_image_tag("delete.jpg"), admin_rank_path(rank), :method => "delete", :confirm => t(:confirm_rank_deletion))
+ %td= rank.name
+ %td= rank.posts_required.nil? ? t(:none) : rank.posts_required
+ %td= rank.custom ? t(:yes) : t(:no)
+ %tr
+ %td{ :colspan => "4" }
+ %b
+ = t(:no_ranks)
+ = link_to t(:user_should_create), new_admin_rank_path
View
14 app/views/admin/ranks/new.html.erb
@@ -1,14 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= link_to t(:Ranks), admin_ranks_path %> -> <%= t(:Creating_a_rank) %>
-<% form_for [:admin, @rank] do |f| %>
- <table cellspacing='0' cellpadding='5' class='action-box' width='100%'>
- <thead>
- <tr>
- <td><h2><%= t(:Creating_a_rank) %></h2></td>
- </tr>
- </thead>
- <%= render :partial => "form", :locals => { :f => f } %>
- <tfoot>
- <tr><td colspan='2'><%= submit_tag "Create" %></td></tr>
- </tfoot>
- </table>
-<% end %>
View
17 app/views/admin/ranks/new.html.haml
@@ -0,0 +1,17 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= link_to t(:Ranks), admin_ranks_path
+\->
+= t(:Creating_a_rank)
+- form_for [:admin, @rank] do |f|
+ %table.action-box{ :cellspacing => "0", :cellpadding => "5", :width => "100%" }
+ %thead
+ %tr
+ %td
+ %h2
+ = t(:Creating_a_rank)
+ = render :partial => "form", :locals => { :f => f }
+ %tfoot
+ %tr
+ %td{ :colspan => "2" }
+ = submit_tag "Create"
View
27 app/views/admin/themes/index.html.erb
@@ -1,27 +0,0 @@
-<%= link_to t(:admin_section) %> -> <%= t(:Themes) %>
-<h2><%= t(:Themes) %></h2>
-<table cellspacing='0' cellpadding='2' class='list-table' width='100%' rules='groups'>
- <thead>
- <tr>
- <td><%= t(:Name) %></td>
- <td><%= t(:Is_default) %></td>
- </tr>
- </thead>
- <tbody>
- <% unless @themes.empty? %>
- <% for theme in @themes %>
- <tr>
- <td><%= theme.name %></td>
- <td><% if theme.is_default? %>
- <%= t(:yes) %>
- <% else %>
- <%= link_to t(:make_default), make_default_admin_theme_path(theme), :method => "put" %>
- <% end %></td>
-
- </tr>
- <% end %>
- <% else %>
- <tr><td colspan='4'><%= t(:no_themes) %></td></tr>
- <% end%>
- </tbody>
-</table>
View
27 app/views/admin/themes/index.html.haml
@@ -0,0 +1,27 @@
+= link_to t(:admin_section)
+\->
+= t(:Themes)
+%h2
+ = t(:Themes)
+%table.list-table{ :cellspacing => "0", :rules => "groups", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td
+ = t(:Name)
+ %td
+ = t(:Is_default)
+ %tbody
+ - unless @themes.empty?
+ - for theme in @themes
+ %tr
+ %td
+ = theme.name
+ %td
+ - if theme.is_default?
+ = t(:yes)
+ - else
+ = link_to t(:make_default), make_default_admin_theme_path(theme), :method => "put"
+ - else
+ %tr
+ %td{ :colspan => "4" }
+ = t(:no_themes)
View
0 app/views/admin/themes/new.html.erb → app/views/admin/themes/new.html.haml 100755 → 100644
File renamed without changes.
View
32 app/views/admin/topics/index.html.erb
@@ -1,32 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= t(:IPs) %> -> <%= link_to @ip, admin_ip_path(@ip) %> -> <%= t(:Topics) %>
-<h2><%= t(:Topics) %> <%= t(:for) %> <%= link_to @ip, admin_ip_path(@ip) %></h2>
-<table cellspacing='0' cellpadding='2' class='list-table' width='100%' rules='groups'>
- <thead>
- <tr>
- <td><%= t(:User) %></td>
- <td><%= t(:Subject) %></td>
- <td><%= t(:Created_at) %></td>
- <td><%= t(:Text) %></td>
- <td><%= t(:Forum) %></td>
- </tr>
- </thead>
- <tbody>
- <% unless @topics.empty? %>
- <% for topic in @topics %>
- <tr>
- <td><%= link_to topic.user, admin_user_path(topic.user) %></td>
- <td><%= link_to topic, forum_topic_path(topic.forum, topic) %></td>
- <td><%= topic.created_at.strftime(date_time_display) %></td>
- <td><%= link_to truncate(topic.posts.first.text, 80), forum_topic_path(post.topic.forum, post.topic) + "#post_#{topic.posts.first.id}" %></td>
- <td><%= link_to topic.forum, forum_path(topic.forum) %></td>
- </tr>
- <% end %>
- <% else %>
- <tr>
- <td colspan='4'><%= t(:no_topics, :by => @ip) %></td>
- </tr>
- <% end %>
- </tbody>
- <tfoot>
- </tfoot>
-</table>
View
33 app/views/admin/topics/index.html.haml
@@ -0,0 +1,33 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= t(:IPs)
+\->
+= link_to @ip, admin_ip_path(@ip)
+\->
+= t(:Topics)
+%h2
+ = t(:Topics)
+ = t(:for)
+ = link_to @ip, admin_ip_path(@ip)
+%table.list-table{ :cellspacing => "0", :rules => "groups", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td= t(:User)
+ %td= t(:Subject)
+ %td= t(:Created_at)
+ %td= t(:Text)
+ %td= t(:Forum)
+ %tbody
+ - unless @topics.empty?
+ - for topic in @topics
+ %tr
+ %td= link_to topic.user, admin_user_path(topic.user)
+ %td= link_to topic, forum_topic_path(topic.forum, topic)
+ %td= topic.created_at.strftime(date_time_display)
+ %td= link_to truncate(topic.posts.first.text, 80), forum_topic_path(post.topic.forum, post.topic) + "#post_#{topic.posts.first.id}"
+ %td= link_to topic.forum, forum_path(topic.forum)
+ - else
+ %tr
+ %td{ :colspan => "4" }
+ = t(:no_topics, :by => @ip)
+ %tfoot
View
26 app/views/admin/users/ban.html.erb
@@ -1,26 +0,0 @@
-<% form_for @user, :url => ban_admin_user_path(@user), :method => "put" do |f| %>
-<table cellspacing='0' cellpadding='2' width='100%' class='action-box'>
- <thead>
- <tr>
- <td colspan='2'><h2><%= t(:banning) %> <%= @user.to_s %></h2></td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><%= f.label "ban_reason", t(:ban_reason) %></td>
- <td><%= f.text_field "ban_reason" %></td>
- </tr>
- <tr>
- <td><%= f.label "ban_time", t(:ban_time) %></td>
- <td>
- <%= f.text_field "ban_time" %>
- <%= observe_field("user_ban_time", :url => admin_chronic_path, :with => "duration", :frequency => 0.5, :update => "date") %>
- <div id='date'></div>
- </td>
- </tr>
- </tbody>
- <tfoot>
- <tr><td colspan='2'><%= submit_tag(t(:ban!)) %></td></tr>
- </tfoot>
-</table>
-<% end %>
View
25 app/views/admin/users/ban.html.haml
@@ -0,0 +1,25 @@
+- form_for @user, :url => ban_admin_user_path(@user), :method => "put" do |f|
+ %table.action-box{ :cellspacing => "0", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td{ :colspan => "2" }
+ %h2
+ = t(:banning)
+ = @user.to_s
+ %tbody
+ %tr
+ %td
+ = f.label "ban_reason", t(:ban_reason)
+ %td
+ = f.text_field "ban_reason"
+ %tr
+ %td
+ = f.label "ban_time", t(:ban_time)
+ %td
+ = f.text_field "ban_time"
+ = observe_field("user_ban_time", :url => admin_chronic_path, :with => "duration", :frequency => 0.5, :update => "date")
+ #date
+ %tfoot
+ %tr
+ %td{ :colspan => "2" }
+ = submit_tag(t(:ban!))
View
50 app/views/admin/users/ban_ip.html.erb
@@ -1,50 +0,0 @@
-<% form_for @banned_ip, :url => ban_ip_admin_users_path do |f| %>
- <%= error_messages_for :banned_ip %>
-
- <table cellspacing='0' cellpadding='2' width='100%' class='action-box'>
- <thead>
- <tr>
- <td colspan='2'><h2><%= t(:Ban_an_ip) %></h2></td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><%= f.label "ip", t(:IP) %></td>
- <td><%= f.text_field "ip", :value => params[:ip] %> <%= t(:accepts_wildcard) %></td>
- </tr>
-
- <tr>
- <td><%= f.label "ban_time", t(:Ban_time) %></td>
- <td><%= f.text_field "ban_time" %>
- <%= observe_field("banned_ip_ban_time", :frequency => 0.5, :url => admin_chronic_path, :with => "duration", :update => "date") %>
- <div id='date'></div>
- </td>
- </tr>
-
- <tr>
- <td><%= f.label "reason", t(:Reason) %></td>
- <td><%= f.text_field "reason" %></td>
- </tr>
-
- </tbody>
- <tfoot>
- <tr>
- <td colspan='2'><%= submit_tag(t(:Ban_this_range)) %></td>
- </tr>
- </tfoot>
- </table>
-
- <h2><%= t(:Banned_IPs)%></h2>
- <% unless @banned.empty? %>
- <ul>
- <% for ip in @banned %>
- <li>
- <%= ip.ip.gsub("[0-9]{1,3}","*") %> - <%= t(:for_the_next) %>- <%= ip.reason %>
- <%= link_to(t(:remove), remove_banned_ip_admin_user_path(ip.id), :confirm => t(:confirm_unban_ip)) %>
- </li>
- <% end %>
- </ul>
- <% else %>
- <%= t(:Nothing_is_banned) %>
- <% end %>
-<% end %>
View
45 app/views/admin/users/ban_ip.html.haml
@@ -0,0 +1,45 @@
+- form_for @banned_ip, :url => ban_ip_admin_users_path do |f|
+ = error_messages_for :banned_ip
+ %table.action-box{ :cellspacing => "0", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td{ :colspan => "2" }
+ %h2
+ = t(:Ban_an_ip)
+ %tbody
+ %tr
+ %td
+ = f.label "ip", t(:IP)
+ %td
+ = f.text_field "ip", :value => params[:ip]
+ = t(:accepts_wildcard)
+ %tr
+ %td
+ = f.label "ban_time", t(:Ban_time)
+ %td
+ = f.text_field "ban_time"
+ = observe_field("banned_ip_ban_time", :frequency => 0.5, :url => admin_chronic_path, :with => "duration", :update => "date")
+ #date
+ %tr
+ %td
+ = f.label "reason", t(:Reason)
+ %td
+ = f.text_field "reason"
+ %tfoot
+ %tr
+ %td{ :colspan => "2" }
+ = submit_tag(t(:Ban_this_range))
+ %h2
+ = t(:Banned_IPs)
+ - unless @banned.empty?
+ %ul
+ - for ip in @banned
+ %li
+ = ip.ip.gsub("[0-9]{1,3}","*")
+ \-
+ = t(:for_the_next)
+ \-
+ = ip.reason
+ = link_to(t(:remove), remove_banned_ip_admin_user_path(ip.id), :confirm => t(:confirm_unban_ip))
+ - else
+ = t(:Nothing_is_banned)
View
49 app/views/admin/users/edit.html.erb
@@ -1,49 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= link_to(t(:users), admin_users_path) %> -> <%= t(:Editing_a_user) %>: <%= @user.login %>
-<% form_for [:admin, @user] do |f| %>
- <table cellspacing='0' cellpadding='2' width='100%' class='action-box'>
- <thead>
- <tr>
- <td colspan='2'><h2><%= t(:Editing_a_user) %>: <%= @user.to_s %></h2></td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><%= f.label "login", t(:login) %></td>
- <td><%= f.text_field "login" %></td>
- </tr>
-
- <tr>
- <td><%= f.label "password", t(:password) %></td>
- <td><%= f.password_field "password", :value => "" %></td>
- </tr>
-
- <tr>
- <td><%= f.label "signature", t(:signature) %></td>
- <td><%= f.text_area "signature", :cols => 80, :rows => 5 %></td>
- </tr>
-
- <tr>
- <td><%= f.label "email", t(:email) %></td>
- <td><%= f.text_field "email" %></td>
- </tr>
-
- <% unless @ranks.empty? %>
- <tr>
- <td><%= f.label "rank_id", t(:custom_rank) %></td>
- <td><%= f.select "rank_id", @ranks.map { |r| [r.name,r.id] }, :include_blank => true %></td>
- </tr>
- <% end %>
-
- <tr>
- <td><%= f.label "user_level_id", t(:user_level) %></td>
- <td><%= f.select "user_level_id", @userlevels.map { |ul| [ul.name,ul.id] }, :selected => @user.user_level_id %></td>
- </tr>
-
- </tbody>
- <tfoot>
- <tr>
- <td colspan='2'><%= submit_tag(t(:Update)) %></td>
- </tr>
- </tfoot>
- </table>
-<% end %>
View
45 app/views/admin/users/edit.html.haml
@@ -0,0 +1,45 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= link_to(t(:users), admin_users_path)
+\->
+= t(:Editing_a_user)
+\:
+= @user.login
+- form_for [:admin, @user] do |f|
+ %table.action-box{ :cellspacing => "0", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td{ :colspan => "2" }
+ %h2
+ = t(:Editing_a_user)
+ \:
+ = @user.to_s
+ %tbody
+ %tr
+ %td= f.label "login", t(:login)
+ %td= f.text_field "login"
+ %tr
+ %td= f.label "password", t(:password)
+ %td= f.password_field "password", :value => ""
+ %tr
+ %td= f.label "signature", t(:signature)
+ %td= f.text_area "signature", :cols => 80, :rows => 5
+ %tr
+ %td= f.label "email", t(:email)
+ %td= f.text_field "email"
+ - unless @ranks.empty?
+ %tr
+ %td
+ = f.label "rank_id", t(:custom_rank)
+ %td
+ = f.select "rank_id", @ranks.map { |r| [r.name,r.id] }, :include_blank => true
+ %tr
+ %td
+ = f.label "user_level_id", t(:user_level)
+ %td
+ = f.select "user_level_id", @userlevels.map { |ul| [ul.name,ul.id] }, :selected => @user.user_level_id
+ %tfoot
+ %tr
+ %td{ :colspan => "2" }
+ = submit_tag(t(:Update))
+
View
42 app/views/admin/users/index.html.erb
@@ -1,42 +0,0 @@
-<%= link_to t(:admin_section), admin_root_path %> -> <%= t(:Users) %>
-<% if @ip %>
- <%= t(:for) %> <%= @ip %>
-<% end %>
-<h2><%= t(:Users) %></h2>
-<table cellspacing='0' cellpadding='2' class='list-table' width='100%' rules='groups'><thead>
- <tr><td>&nbsp;</td>
- <td><%= t(:Login) %></td>
- <td><%= t(:Display_Name) %></td>
- <td><%= t(:Member_since) %></td>
- <td><%= t(:Posts) %></td>
- <td><%= t(:Banned) %></td>
- <td><%= t(:Banned_until)%></td>
- <td><%= t(:Times_banned) %></td>
- <td><%= t(:Last_IP) %></td>
-
- </tr></thead>
- <tbody>
- <% for user in @users %>
- <tr>
- <td class='icon'><%= link_to theme_image_tag("delete.jpg"), admin_user_path(user), :method => :delete, :confirm => t(:confirm_user_deletion) %>
- <%= link_to theme_image_tag("edit.jpg"), edit_admin_user_path(user) %>
- <%= link_to theme_image_tag("ban.jpg"), ban_admin_user_path(user), :confirm => t(:confirm_user_ban) %></td>
- <td><%= link_to user.login, admin_user_path(user) %></td>
- <td><%= link_to user.display_name, admin_user_path(user) %></td>
- <td><%= user.created_at.strftime date_time_display %></td>
- <td><%= user.posts.size %></td>
- <td><%= !user.ban_time.nil? && user.ban_time > Time.now ? t(:Yes) : t(:No) %></td>
- <td><%= user.ban_time.nil? ? t(:Never) : user.ban_time.strftime(:long_ordinal) %></td>
- <td><%= user.ban_times %></td>
- <td>
- <%= user.ip %> <%= link_to theme_image_tag("ban.jpg"), ban_ip_admin_users_path(:ip => user.ip) %>
- <% if !user.ips.empty? %>
- (<%= link_to t(:other_IPs, :count => user.ips.count), admin_user_ips_path(user) %>)
- <% end %>
- </td>
- </tr>
- <% end %>
- </tbody>
- <tfoot>
- </tfoot>
-</table>
View
42 app/views/admin/users/index.html.haml
@@ -0,0 +1,42 @@
+= link_to t(:admin_section), admin_root_path
+\->
+= t(:Users)
+- if @ip
+ = t(:for)
+ = @ip
+%h2
+ = t(:Users)
+%table.list-table{ :cellspacing => "0", :rules => "groups", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td &nbsp;
+ %td= t(:Login)
+ %td= t(:Display_Name)
+ %td= t(:Member_since)
+ %td= t(:Posts)
+ %td= t(:Banned)
+ %td= t(:Banned_until)
+ %td = t(:Times_banned)
+ %td= t(:Last_IP)
+ %tbody
+ - for user in @users
+ %tr
+ %td.icon
+ = link_to theme_image_tag("delete.jpg"), admin_user_path(user), :method => :delete, :confirm => t(:confirm_user_deletion)
+ = link_to theme_image_tag("edit.jpg"), edit_admin_user_path(user)
+ = link_to theme_image_tag("ban.jpg"), ban_admin_user_path(user), :confirm => t(:confirm_user_ban)
+ %td= link_to user.login, admin_user_path(user)
+ %td= link_to user.display_name, admin_user_path(user)
+ %td= user.created_at.strftime date_time_display
+ %td= user.posts.size
+ %td= !user.ban_time.nil? && user.ban_time > Time.now ? t(:Yes) : t(:No)
+ %td= user.ban_time.nil? ? t(:Never) : user.ban_time.strftime(:long_ordinal)
+ %td= user.ban_times
+ %td
+ = user.ip
+ = link_to theme_image_tag("ban.jpg"), ban_ip_admin_users_path(:ip => user.ip)
+ - if !user.ips.empty?
+ (
+ = link_to t(:other_IPs, :count => user.ips.count), admin_user_ips_path(user)
+ )
+ %tfoot
View
40 app/views/admin/users/show.html.erb
@@ -1,40 +0,0 @@
-
-<table cellspacing='0' cellpadding='5' width='100%' class='posts'>
- <tr>
- <td rowspan='2' valign='top' width='4%'><b><%= @user %></b><br />
- <% if @user.admin? %>
- <b><font color='red'><%= t(:Administrator) %></font></b>
- <% elsif @user.moderator? %>
- <b><font color='green'><%= t(:Moderator) %></font></b>
- <% else @user.user? %>
- <b><font color='Blue'><%= t(:User) %></font></b>
- <% end %>
- <br />
-
- <% if @user.has_avatar? %>
- <%= image_tag @user.avatar(:thumb) %>
- <% elsif !@user.email.blank? %>
- <%= image_tag("http://www.gravatar.com/avatar.php?gravatar_id=" + Digest::MD5.hexdigest(@user.email) + "&default=") %><br />
- <% end %>
-
- </td>
- </tr>
- <tr>
- <td></td>
- <td valign='top' colspan='2'>
- <b><%= t(:Date_joined) %></b> <%= @user.created_at.strftime(date_display) %> <br />
- <b><%= t(:Posts) %></b> <%= @user.posts.size %>, <%= t(:about) %> <%= @posts_percentage %>% <%= t(:of_all_posts) %><br />
- <b><%= t(:IP) %></b> <%= @user.ip %><br />
- <b><%= t(:Bans) %></b> <%= @user %> <%= t(:has_been_banned, :times => @user.ban_times) %>. <br />
- <% if !@user.ban_time.nil? && @user.ban_time > Time.now %>
- <h2><%= @user %> <%= t(:is_currently_banned) %></h2>
- <%= t(:user_was_banned_by, :banned_by => @user.banned_by) %> <%= t(:ban_expires_in, :expiry => time_ago_in_words(@user.ban_time)) %>.<br /><br />
- <%= t(:the_reason_was, :reason => @user.ban_reason) %><br /><br />
- <% end %>
- <% unless @user.signature.blank? %><br />
- ____________<br />
- <%= bbcode(@user.signature) %>
- <% end %>
- </td>
- </tr>
-</table>
View
63 app/views/admin/users/show.html.haml
@@ -0,0 +1,63 @@
+%table.posts{ :cellspacing => "0", :cellpadding => "5", :width => "100%" }
+ %tr
+ %td{ :rowspan => "2", :valign => "top", :width => "4%" }
+ %b
+ = @user
+ %br
+ - if @user.admin?
+ %b
+ %font{ :color => "red" }
+ = t(:Administrator)
+ - elsif @user.moderator?
+ %b
+ %font{ :color => "green" }
+ = t(:Moderator)
+ - else @user.user?
+ %b
+ %font{ :color => "Blue" }
+ = t(:User)
+ %br
+ - if @user.has_avatar?
+ = image_tag @user.avatar(:thumb)
+ - elsif !@user.email.blank?
+ = image_tag("http://www.gravatar.com/avatar.php?gravatar_id=" + Digest::MD5.hexdigest(@user.email) + "&default=")
+ %br
+ %tr
+ %td
+ %td{ :valign => "top", :colspan => "2" }
+ %b= t(:Date_joined)
+ = @user.created_at.strftime(date_display)
+ %br
+ %b= t(:Posts)
+ = @user.posts.size
+ ,
+ = t(:about)
+ = @posts_percentage
+ \%
+ = t(:of_all_posts)
+ %br
+ %b= t(:Last_IP)
+ = @user.ip
+ %br
+ %b= t(:Bans)
+ = @user
+ = t(:has_been_banned, :times => @user.ban_times)
+ \.
+ %br
+ - if !@user.ban_time.nil? && @user.ban_time > Time.now
+ %h2
+ = @user
+ = t(:is_currently_banned)
+ = t(:user_was_banned_by, :banned_by => @user.banned_by)
+ = t(:ban_expires_in, :expiry => time_ago_in_words(@user.ban_time))
+ \.
+ %br
+ %br
+ = t(:the_reason_was, :reason => @user.ban_reason)
+ %br
+ %br
+ - unless @user.signature.blank?
+ %br
+ ____________
+ %br
+ = bbcode(@user.signature)
View
22 app/views/forums/_forum.html.erb
@@ -1,22 +0,0 @@
-<tr>
- <td align='left'>
- <h1><%= link_to(h(forum.title), forum_path(forum)) %></h1>
- <%= h(forum.description) %>
- <% if !forum.children.empty? %>
- <br /><%= t(:Subforums) %>: <% forum.children.each do |forum| %> <%= link_to(h(forum.title), forum_path(forum)) %> <% end %>
- <% end %>
- </td>
- <td align='center'><%= forum.topics.size %></td>
- <td align='center'><%= forum.posts.size %></td>
- <td align='right'><% if !forum.last_post.nil? %>
- <%= time_ago_in_words(forum.last_post.created_at) %> <%= t(:ago) %>
- <%= t(:by) %> <%= link_to(h(forum.last_post.user), forum.last_post.user) %>
- <%= t(:in) %> <%= link_to(h(forum.last_post.topic.subject), forum_topic_path(forum,forum.last_post.topic)) %>
- <% if !forum.last_post_forum.nil? %>
- <%= t(:in) %> <%= link_to(h(forum.last_post_forum), forum_path(forum.last_post_forum)) %>
- <% end %>
- <% else %>
- <%= t(:None) %>
- <% end %>
- </td>
-</tr>
View
28 app/views/forums/_forum.html.haml
@@ -0,0 +1,28 @@
+%tr
+ %td{ :align => "left" }
+ %h1
+ = link_to(h(forum.title), forum_path(forum))
+ = h(forum.description)
+ - if !forum.children.empty?
+ %br
+ = t(:Subforums)
+ \:
+ - forum.children.each do |forum|
+ = link_to(h(forum.title), forum_path(forum))
+ %td{ :align => "center" }
+ = forum.topics.size
+ %td{ :align => "center" }
+ = forum.posts.size
+ %td{ :align => "right" }
+ - if !forum.last_post.nil?
+ = time_ago_in_words(forum.last_post.created_at)
+ = t(:ago)
+ = t(:by)
+ = link_to(h(forum.last_post.user), forum.last_post.user)
+ = t(:in)
+ = link_to(h(forum.last_post.topic.subject), forum_topic_path(forum,forum.last_post.topic))
+ - if !forum.last_post_forum.nil?
+ = t(:in)
+ = link_to(h(forum.last_post_forum), forum_path(forum.last_post_forum))
+ - else
+ = t(:None)
View
96 app/views/forums/index.html.haml
@@ -0,0 +1,96 @@
+- if @category.nil? && @categories.empty? && @forums.empty?
+ %table.forums{ :cellspacing => "0", :rules => "groups", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td{ :align => "center" }
+ = t(:no_categories_or_forums)
+ - unless is_admin?
+ = t(:administrator_should_create_category_or_forum)
+ - else
+ = link_to t(:you_should_create_category_or_forum), admin_root_path
+- if @category.nil?
+ - for category in @categories
+ - div_for category do
+ %h2
+ = link_to category.name, [category, :forums]
+ %table.forums{ :cellspacing => "0", :rules => "groups", :cellpadding => "2", :width => "100%" }
+ - unless category.forums.empty?
+ %thead
+ %tr
+ %td{ :align => "left", :width => "40%" }
+ = t(:Forum)
+ %td{ :align => "center", :width => "100px" }
+ = t(:Topics)
+ %td{ :align => "center", :width => "100px" }
+ = t(:Posts)
+ %td{ :align => "right" }
+ = t(:Last_Post)
+ %tbody
+ = render :partial => category.forums
+ - else
+ %thead
+ %tr
+ %td{ :align => "center" }
+ %b
+ = t(:no_forums)
+ - unless is_admin?
+ = t(:administrator_should_create_forum)
+ - else
+ = link_to t(:you_should_create_forum), new_admin_forum_path
+ %br
+- else
+ = link_to(t(:rBoard), forums_path)
+ \->
+ = link_to @category.name, [@category, :forums]
+ %br
+ %h2
+ = @category.name
+- unless @forums.empty?
+ %table.forums{ :cellspacing => "0", :rules => "groups", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td{ :align => "left", :width => "40%" }
+ = t(:Forum)
+ %td{ :align => "center", :width => "100px" }
+ = t(:Topics)
+ %td{ :align => "center", :width => "100px" }
+ = t(:Posts)
+ %td{ :align => "right" }
+ = t(:Last_Post)
+ %tbody
+ = render :partial => @forums
+%br
+- if logged_in?
+ %table.info-box{ :cellspacing => "0", :rules => "groups", :cellpadding => "5", :width => "100%" }
+ %thead
+ %tr
+ %td
+ = t(:forum_statistics)
+ %tbody
+ %tr
+ %td
+ %span.right
+ %b
+ = t(:Posts)
+ \:
+ = @posts
+ %br
+ %b
+ = t(:Topics)
+ \:
+ = @topics
+ %br
+ %b
+ = t(:posts_per_topic)
+ \:
+ = @ppt
+ %br
+ %b
+ = t(:registered_users)
+ \:
+ = @users
+ %br
+ %b
+ = t(:recent_users)
+ \:
+ = @lusers.blank? ? t(:none) : @lusers
View
116 app/views/forums/show.html.erb
@@ -1,116 +0,0 @@
-<% content_for :feed do %>
- <link rel="alternate" type="application/rss+xml" title="<%= @forum.title %> Feed" href="<%= forum_url(@forum, :format => :rss) %>" />
-<% end %>
-
-<%= link_to(t(:rBoard), forums_path) %> -> <%= breadcrumb(@forum) %>
- <% unless @forums.empty? %>
- <h2><%= t(:Subforums) %> <%= @forum.title %></h2>
- <table cellspacing='0' cellpadding='2' class='forums' width='100%' rules='groups'>
- <thead>
- <tr>
- <td align='left' width='40%'><%= t(:Forums) %></td>
- <td align='center' width='100px'><%= t(:Topics) %></td>
- <td align='center' width='100px'><%= t(:Posts) %></td>
- <td align='right'><%= t(:Last_Post) %></td>
- </tr>
- </thead>
- <tbody>
- <%= render :partial => "forum", :collection => @forums %>
- </tbody>
- </table>
- <% end %>
-<br />
-<h2><%= t(:Viewing_forum) %> <%= @forum.title %></h2>
-<%= will_paginate @topics %>
-<% if @forum.topics_creatable_by?(current_user) %>
- <%= link_to(t(:New_Topic), new_forum_topic_path(@forum)) %>
-<% end %>
-<table cellspacing='0' cellpading='0' width='100%' class='forum' rules='groups'>
- <% unless @topics.empty? %>
- <% form_tag moderate_moderator_topics_path do %>
- <thead>
- <tr>
- <% if is_moderator? %>
- <td width='50px'><%= t(:Moderation) %></td>
- <% end %>
- <td>&nbsp;</td>
- <td align='left'><%= t(:Topic) %></td>
- <td align='center'><%= t(:Replies) %></td>
- <td align='center'><%= t(:Views) %></td>
- <td align='center'><%= t(:Author) %></td>
- <td align='right'><%= t(:Last_Post) %></td>
- </tr>
- </thead>
- <tbody>
- <% for topic in @topics %>
- <tr id='topic_<%= topic.id %>'>
- <% if is_moderator? %>
- <td align='center'>
- <% if !topic.moved? %>
- <%= link_to_remote check_box_tag("moderated_topics[]", topic.id, !topic.moderations.for_user(current_user).empty?, :id => "topic_#{topic.id}_moderated"), :url => moderator_topic_moderations_path(topic) %>
- <% else %>
- <%= link_to_remote check_box_tag("moderated_topics[]", topic.moved_to.id, !topic.moved_to.moderations.for_user(current_user).empty?, :id => "topic_#{topic.moved_to.id}_moderated"), :url => moderator_topic_moderations_path(topic.moved_to) %>
- <% end %>
- </td>
- <% end %>
- <td>
- <% if topic.sticky? %>
- <%= theme_image_tag("sticky.jpg") %>
- <% elsif topic.moved? %>
- <%= theme_image_tag("moved.jpg") %>
- <% elsif logged_in? && !current_user.previous_login.nil? && topic.posts.last.created_at > current_user.previous_login && !topic.locked %>
- <%= theme_image_tag("new.jpg") %>
- <% elsif topic.locked? %>
- <%= theme_image_tag("locked.jpg") %>
- <% else %>
- <%= theme_image_tag("old.jpg") %>
- <% end %>
- </td>
- <td class='topic_subject'>
- <b>
- <%= link_to(h(topic.subject), topic.moved? ? forum_topic_path(topic.moved_to.forum, topic.moved_to) : forum_topic_path(topic.forum, topic)) %>
- <%= will_paginate(topic.posts.paginate(:per_page => per_page, :page => 1), :prev_label => nil, :next_label => "", :params => { :controller => "topics", :action => "show", :id => topic.id, :forum_id => @forum.id }) %>
- </b>
- </td>
- <td align='center'><%= (topic.moved? ? topic.moved_to.posts.count : topic.posts.count) - 1 %></td>
- <td align='center'><%= topic.views %></td>
- <td align='center'><%= link_to(h(topic.user), topic.user) %></td>
- <td align='right' width='15%'>
- <% if topic.moved? %>
- -
- <% else %>
- <%= time_ago_in_words(topic.posts.last.created_at) %> <%= t(:ago) %> <%= t(:by) %> <%= link_to h(topic.last_post.user), topic.last_post.user %>
- <% end %>
- </td>
- </tr>
- <% end %>
- </tbody>
- <% if is_admin? %>
- <tfoot>
- <tr>
- <td align='right' colspan='8'>
- <% if is_moderator? %>
- <span id='moderated_topics_count'><% unless @moderated_topics_count.zero? %><%= pluralize(@moderated_topics_count, "topic") %><%= t(:selected_for_moderation) %><% end %></span>
- <% end %>
- <%= render :partial => "topics/buttons" %>
- </td>
- </tr>
- </tfoot>
- <% end %>
- <% end %>
- <% else %>
- <thead>
- <tr>
- <td align='center'>
- <% if @forum.topics_creatable_by?(current_user) %>
- <%= t(:no_topics_for_forum) %> <%= t(:why_not) %> <%= link_to(t(:create_one?), new_forum_topic_path(@forum)) %>
- <% end %>
- </td>
- </tr>
- </thead>
- <% end %>
-</table>
-<% if @forum.topics_creatable_by?(current_user) %>
- <%= link_to(t(:New_Topic), new_forum_topic_path(@forum)) %>
-<% end %>
-<%= will_paginate @topics %>
View
98 app/views/forums/show.html.haml
@@ -0,0 +1,98 @@
+- content_for :feed do
+ %link{ :href => forum_url(@forum, :format =&gt; :rss), :title => "#{@forum.title} Feed", :rel => "alternate", :type => "application/rss+xml" }
+= link_to(t(:rBoard), forums_path)
+\->
+= breadcrumb(@forum)
+- unless @forums.empty?
+ %h2
+ = t(:Subforums)
+ = @forum.title
+ %table.forums{ :cellspacing => "0", :rules => "groups", :cellpadding => "2", :width => "100%" }
+ %thead
+ %tr
+ %td{ :align => "left", :width => "40%" }
+ = t(:Forums)
+ %td{ :align => "center", :width => "100px" }
+ = t(:Topics)
+ %td{ :align => "center", :width => "100px" }
+ = t(:Posts)
+ %td{ :align => "right" }
+ = t(:Last_Post)
+ %tbody
+ = render :partial => "forum", :collection => @forums
+%br
+%h2
+ = t(:Viewing_forum)
+ = @forum.title
+= will_paginate @topics
+- if @forum.topics_creatable_by?(current_user)
+ = link_to(t(:New_Topic), new_forum_topic_path(@forum))
+%table.forum{ :cellspacing => "0", :rules => "groups", :cellpading => "0", :width => "100%" }
+ - unless @topics.empty?
+ - form_tag moderate_moderator_topics_path do
+ %thead
+ %tr
+ - if is_moderator?
+ %td{ :width => "50px" }= t(:Moderation)
+ %td &nbsp;
+ %td{ :align => "left" }= t(:Topic)
+ %td{ :align => "center" }= t(:Replies)
+ %td{ :align => "center" }= t(:Views)
+ %td{ :align => "center" }= t(:Author)
+ %td{ :align => "right" }= t(:Last_Post)
+ %tbody
+ - for topic in @topics
+ %tr{ :id => "topic_#{topic.id}" }
+ - if is_moderator?
+ %td{ :align => "center" }
+ - if !topic.moved?
+ = link_to_remote check_box_tag("moderated_topics[]", topic.id, !topic.moderations.for_user(current_user).empty?, :id => "topic_#{topic.id}_moderated"), :url => moderator_topic_moderations_path(topic)
+ - else
+ = link_to_remote check_box_tag("moderated_topics[]", topic.moved_to.id, !topic.moved_to.moderations.for_user(current_user).empty?, :id => "topic_#{topic.moved_to.id}_moderated"), :url => moderator_topic_moderations_path(topic.moved_to)
+ %td
+ - if topic.sticky?
+ = theme_image_tag("sticky.jpg")
+ - elsif topic.moved?
+ = theme_image_tag("moved.jpg")
+ - elsif logged_in? && !current_user.previous_login.nil? && topic.posts.last.created_at > current_user.previous_login && !topic.locked
+ = theme_image_tag("new.jpg")
+ - elsif topic.locked?
+ = theme_image_tag("locked.jpg")
+ - else
+ = theme_image_tag("old.jpg")
+ %td.topic_subject
+ %b
+ = link_to(h(topic.subject), topic.moved? ? forum_topic_path(topic.moved_to.forum, topic.moved_to) : forum_topic_path(topic.forum, topic))
+ = will_paginate(topic.posts.paginate(:per_page => per_page, :page => 1), :prev_label => nil, :next_label => "", :params => { :controller => "topics", :action => "show", :id => topic.id, :forum_id => @forum.id })
+ %td{ :align => "center" }= (topic.moved? ? topic.moved_to.posts.count : topic.posts.count) - 1
+ %td{ :align => "center" }= topic.views
+ %td{ :align => "center" }= link_to(h(topic.user), topic.user)
+ %td{ :align => "right", :width => "15%" }
+ - if topic.moved?
+ \-
+ - else
+ = time_ago_in_words(topic.posts.last.created_at)
+ = t(:ago)
+ = t(:by)
+ = link_to h(topic.last_post.user), topic.last_post.user
+ - if is_admin?
+ %tfoot
+ %tr
+ %td{ :align => "right", :colspan => "8" }
+ - if is_moderator?
+ %span#moderated_topics_count
+ - unless @moderated_topics_count.zero?
+ = pluralize(@moderated_topics_count, "topic")
+ = t(:selected_for_moderation)
+ = render :partial => "topics/buttons"
+ - else
+ %thead
+ %tr
+ %td{ :align => "center" }
+ - if @forum.topics_creatable_by?(current_user)
+ = t(:no_topics_for_forum)
+ = t(:why_not)
+ = link_to(t(:create_one?), new_forum_topic_path(@forum))
+- if @forum.topics_creatable_by?(current_user)
+ = link_to(t(:New_Topic), new_forum_topic_path(@forum))
+= will_paginate @topics
View
15 app/views/layouts/admin.html.erb
@@ -1,15 +0,0 @@
-<% inside_layout "application" do %>
- <ul id='admin-navlist'>
- <li><%= link_to "Index", admin_root_path, :class => selected("index") %></li>
- <li><%= link_to "Categories", admin_categories_path, :class => selected("categories") %></li>
- <li><%= link_to "Forums", admin_forums_path, :class => selected("forums") %></li>
- <li><%= link_to "Users", admin_users_path, :class => selected("users") %></li>
- <li><%= link_to "Ranks", admin_ranks_path, :class => selected("ranks") %></li>
- <li><%= link_to "Themes", admin_themes_path, :class => selected("themes") %></li>
- <li><%= link_to "IP Banning", ban_ip_admin_users_path, :class => selected("ip_banning") %>
-
- </ul>
- <div id='admin-page'>
- <%= yield %>
- </div>
-<% end %>
View
19 app/views/layouts/admin.html.haml
@@ -0,0 +1,19 @@
+- inside_layout "application" do
+ %ul#admin-navlist
+ %li
+ = link_to "Index", admin_root_path, :class => selected("index")
+ %li
+ = link_to "Categories", admin_categories_path, :class => selected("categories")
+ %li
+ = link_to "Forums", admin_forums_path, :class => selected("forums")
+ %li
+ = link_to "Users", admin_users_path, :class => selected("users")
+ %li
+ = link_to "Ranks", admin_ranks_path, :class => selected("ranks")
+ %li
+ = link_to "Themes", admin_themes_path, :class => selected("themes")
+ %li
+ = link_to "IP Banning", ban_ip_admin_users_path, :class => selected("ip_banning")
+ #admin-page
+ = yield
+
View
55 app/views/layouts/application.html.erb
@@ -1,55 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <head>
- <title>rBoard - <%= params[:controller].capitalize %> - <%= params[:action].capitalize %> </title>
- <link rel='stylesheet' href='/themes/<%= theme.name %>/style.css'>
- <%= stylesheet_link_tag "ultraviolet/lazy" %>
- <%= stylesheet_link_tag "ultraviolet/general" %>
- <%= javascript_include_tag :defaults %>
- <%= yield :feed %>
- </head>
- <body>
- <div align='center'>
- <div class='content'>
- <div class='title-bar'>
- <%= link_to theme_image_tag("logo.jpg", :alt => "logo"), forums_path, :class => "logo" %>
- </div>
- <div class='flash' id='flash' <%= "style='display:none'" if flash[:notice].blank? %>>
- <%= flash[:notice] %>
- </div>
-
-
- <% %>
- <div class='menu-bar'>
- <%= link_to t(:Home), forums_path %> |
- <% unless logged_in? %>
- <%= link_to t(:Login), login_path %> |
- <%= link_to t(:Signup), signup_users_path %>
-
- <% else %>
- Logged in as <%= link_to current_user, current_user %> |
- <%= link_to t(:Edit_Profile), [:edit, current_user] %> |
- <%= link_to t(:Member_List), users_path %> |
- <%= link_to t(:Search), search_path %> |
- <%= link_to t(:x_new_messages, :count => @current_user.unread_messages.size), messages_path %> |
- <%= link_to t(:Subscriptions), subscriptions_path %> |
- <%= link_to t(:Logout), logout_path %>
- <% end %>
- </div>
- <div class='time-now'>
-
- <%= t(:time_now) %> <%= Time.now.strftime(date_time_display) %> </div><br /><br />
- <%= yield %>
- <div align='center'>
- <% if is_moderator? %>
- <%= link_to "Moderator Section", moderator_root_path %>
- <% end %>
-
- <% if is_admin? %>
- | <%= link_to "Administration Section", admin_root_path %>
- <% end %>
- </div>
- </div>
- </body>
-</html>
View
57 app/views/layouts/application.html.haml
@@ -0,0 +1,57 @@
+!!! Strict
+%html{ "xml:lang" => "en", :lang => "en", :xmlns => "http://www.w3.org/1999/xhtml" }
+ %head
+ %title
+ rBoard -
+ = params[:controller].capitalize
+ \-
+ = params[:action].capitalize
+ %link{ :href => "/themes/#{theme.name}/style.css", :rel => "stylesheet" }
+ = stylesheet_link_tag "ultraviolet/lazy"
+ = stylesheet_link_tag "ultraviolet/general"
+ = javascript_include_tag :defaults
+ = yield :feed
+ %body
+ %div{ :align => "center" }
+ .content
+ .title-bar
+ = link_to theme_image_tag("logo.jpg", :alt => "logo"), forums_path, :class => "logo"
+ <div class='flash' id='flash'
+ = "style='display:none'" if flash[:notice].blank?
+ >
+ = flash[:notice]
+ -
+ .menu-bar
+ = link_to t(:Home), forums_path
+ |
+ - unless logged_in?
+ = link_to t(:Login), login_path
+ |
+ = link_to t(:Signup), signup_users_path
+ - else
+ Logged in as
+ = link_to current_user, current_user
+ |
+ = link_to t(:Edit_Profile), [:edit, current_user]
+ |
+ = link_to t(:Member_List), users_path
+ |
+ = link_to t(:Search), search_path
+ |
+ = link_to t(:x_new_messages, :count => @current_user.unread_messages.size), messages_path
+ |
+ = link_to t(:Subscriptions), subscriptions_path
+ |
+ = link_to t(:Logout), logout_path
+ .time-now
+ = t(:time_now)