From 0f89ae027cabb0694cb5262f98f8d7d885612229 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 3 Feb 2010 15:18:34 +1000 Subject: [PATCH] Major design revamp. Look at those rounded corners, alternating table rows... woah! --- app/models/message.rb | 3 + .../admin/categories/_category.html.haml | 6 +- app/views/admin/categories/edit.html.haml | 17 +- app/views/admin/categories/index.html.haml | 4 +- app/views/admin/categories/new.html.haml | 2 +- .../admin/configurations/index.html.haml | 7 +- app/views/admin/forums/_forum.html.haml | 2 +- app/views/admin/forums/_forums.html.haml | 2 +- app/views/admin/forums/edit.html.haml | 2 +- app/views/admin/forums/new.html.haml | 2 +- app/views/admin/groups/_form.html.haml | 18 +- app/views/admin/groups/edit.html.haml | 8 +- app/views/admin/groups/index.html.haml | 9 +- app/views/admin/groups/new.html.haml | 2 +- app/views/admin/ips/index.html.haml | 2 +- app/views/admin/permissions/_form.html.haml | 49 +++-- app/views/admin/permissions/index.html.haml | 6 +- app/views/admin/permissions/new.html.haml | 2 +- app/views/admin/ranks/index.html.haml | 8 +- app/views/admin/themes/index.html.haml | 6 +- app/views/admin/users/ban_ip.html.haml | 36 ++-- app/views/admin/users/index.html.haml | 21 +- app/views/edits/index.html.haml | 11 +- app/views/forums/_forum.html.haml | 2 +- app/views/forums/index.html.haml | 4 +- app/views/layouts/application.html.haml | 2 +- app/views/messages/_message.html.haml | 14 +- app/views/messages/index.html.haml | 21 +- app/views/messages/new.html.haml | 8 +- app/views/posts/_form.html.haml | 43 ++-- app/views/posts/_post.html.haml | 96 ++++----- app/views/posts/edit.html.haml | 19 +- app/views/posts/new.html.haml | 2 +- app/views/topics/show.html.haml | 12 +- app/views/users/index.html.haml | 4 +- app/views/users/signup.html.haml | 54 ++--- config/locales/en.rb | 18 +- config/routes.rb | 2 +- db/schema.rb | 4 +- features/edits.feature | 1 + features/support/setup.rb | 2 - public/themes/blue/style.css | 180 +++++++++------- public/themes/blue/style.sass | 203 +++++++++++------- rerun.txt | 1 + 44 files changed, 460 insertions(+), 457 deletions(-) diff --git a/app/models/message.rb b/app/models/message.rb index 09195222..d9a94ab9 100755 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -1,6 +1,9 @@ class Message < ActiveRecord::Base belongs_to :to, :class_name => "User", :foreign_key => :to_id belongs_to :from, :class_name => "User", :foreign_key => :from_id + + # Used for the message view to provide a checkbox. + attr_accessor :selected validates_presence_of :text diff --git a/app/views/admin/categories/_category.html.haml b/app/views/admin/categories/_category.html.haml index c1c011f4..a14a4ccd 100644 --- a/app/views/admin/categories/_category.html.haml +++ b/app/views/admin/categories/_category.html.haml @@ -1,7 +1,7 @@ -%tr +%tr{ :class => stripe } %td.icon - = link_to theme_image_tag("edit.jpg"), edit_admin_category_path(category), :id => "edit_category_#{category.id}" - = link_to theme_image_tag("delete.jpg"), admin_category_path(category), :method => "delete", :confirm => t(:confirm_deletion, :thing => "category") + = link_to theme_image_tag("edit.jpg", :alt => t(:Edit), :title => t(:Edit)), edit_admin_category_path(category), :id => "edit_category_#{category.id}" + = link_to theme_image_tag("delete.jpg", :alt => t(:Delete), :title => t(:Delete)), admin_category_path(category), :method => "delete", :confirm => t(:confirm_deletion, :thing => "category") %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) diff --git a/app/views/admin/categories/edit.html.haml b/app/views/admin/categories/edit.html.haml index b1840aa3..07b97aa2 100644 --- a/app/views/admin/categories/edit.html.haml +++ b/app/views/admin/categories/edit.html.haml @@ -1,16 +1,9 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{link_to(t(:Categories), admin_categories_path)} » #{t(:Editing_a_category)}: #{@category.name} + %span » #{link_to(t(:Categories), admin_categories_path)} » #{t(:Editing, :thing => @category.name)} = error_messages_for :category - form_for [:admin, @category] do |f| - %table.action-box{:cellpadding => "2", :cellspacing => "0", :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) + %h2 + = t(:Editing, :thing => @category.name) + = render :partial => "form", :locals => { :f => f } + = f.submit t(:Update) diff --git a/app/views/admin/categories/index.html.haml b/app/views/admin/categories/index.html.haml index 12abc5da..073b558f 100644 --- a/app/views/admin/categories/index.html.haml +++ b/app/views/admin/categories/index.html.haml @@ -1,6 +1,6 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{t(:Categories)} + %span » #{t(:Categories)} %h2= t(:Categories) = link_to t(:New, :thing => "Category"), new_admin_category_path %table.listing.categories{:cellpadding => "3", :cellspacing => "0", :rules => "groups", :width => "100%"} @@ -17,6 +17,6 @@ - else %thead %tr - %td{:align => "center", :colspan => "3"} + %td{:align => "center", :colspan => "3", :class => "even"} = t(:no_categories) = link_to t(:user_should_create), new_admin_category_path diff --git a/app/views/admin/categories/new.html.haml b/app/views/admin/categories/new.html.haml index 61214d0b..4459439a 100644 --- a/app/views/admin/categories/new.html.haml +++ b/app/views/admin/categories/new.html.haml @@ -1,6 +1,6 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{link_to(t(:Categories), admin_categories_path)} » #{t(:Creating_a_category)} + %span » #{link_to(t(:Categories), admin_categories_path)} » #{t(:Creating_a_category)} = error_messages_for :category - form_for [:admin, @category] do |f| %h2= t(:Creating_a_category) diff --git a/app/views/admin/configurations/index.html.haml b/app/views/admin/configurations/index.html.haml index 43a4b82a..37f14b20 100644 --- a/app/views/admin/configurations/index.html.haml +++ b/app/views/admin/configurations/index.html.haml @@ -1,10 +1,9 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{t(:Configuration_Settings)} + %span » #{t(:Configuration_Settings)} %h2= t(:Configuration_Settings) -= link_to t(:New, :thing => "Group"), new_admin_group_path - form_for :configurations, :url => update_all_admin_configurations_path, :html => { :method => :put } do - %table.list-table{:cellpadding => "2", :cellspacing => "0", :rules => "groups", :width => "100%"} + %table.listing{:cellpadding => "2", :cellspacing => "0", :rules => "groups", :width => "100%"} %thead %tr %td Title @@ -12,7 +11,7 @@ %td Submit %tbody - for configuration in @configurations - %tr + %tr{ :class => stripe} %td.lalign %strong= configuration.title %br diff --git a/app/views/admin/forums/_forum.html.haml b/app/views/admin/forums/_forum.html.haml index 26a2f4be..54ffa432 100644 --- a/app/views/admin/forums/_forum.html.haml +++ b/app/views/admin/forums/_forum.html.haml @@ -1,4 +1,4 @@ -%tr +%tr{ :class => stripe } %td.icon = link_to theme_image_tag("edit.jpg"), edit_admin_forum_path(forum) = link_to theme_image_tag("delete.png"), admin_forum_path(forum), :method => "delete", :confirm => t(:confirm_deletion, :thing => "forum") diff --git a/app/views/admin/forums/_forums.html.haml b/app/views/admin/forums/_forums.html.haml index 772429e4..09f96055 100644 --- a/app/views/admin/forums/_forums.html.haml +++ b/app/views/admin/forums/_forums.html.haml @@ -12,6 +12,6 @@ - else %thead %tr - %td{:align => "center", :colspan => "3"} + %td{:align => "center", :colspan => "3", :class => "even"} = t(:no_forums) = link_to t(:user_should_create), @category.nil? ? new_admin_forum_path : new_admin_category_forum_path(@category) diff --git a/app/views/admin/forums/edit.html.haml b/app/views/admin/forums/edit.html.haml index 3a7ab06f..1ed746ec 100644 --- a/app/views/admin/forums/edit.html.haml +++ b/app/views/admin/forums/edit.html.haml @@ -1,6 +1,6 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{link_to(t(:Forums), admin_forums_path)} » #{t(:Editing_a_forum)}: #{@forum.title} + %span » #{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{:cellpadding => "2", :cellspacing => "0", :width => "100%"} diff --git a/app/views/admin/forums/new.html.haml b/app/views/admin/forums/new.html.haml index 646b318c..8efd7489 100644 --- a/app/views/admin/forums/new.html.haml +++ b/app/views/admin/forums/new.html.haml @@ -1,6 +1,6 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{link_to(t(:Forums), admin_forums_path)} » #{t(:Creating_a_forum)} + %span » #{link_to(t(:Forums), admin_forums_path)} » #{t(:Creating_a_forum)} - if @category = t(:for) = @category.name diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 5430e85f..143b2867 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -1,15 +1,11 @@ -%table.action-box{:cellpadding => "2", :cellspacing => "0", :width => "100%"} - %thead - %tr - %td{:colspan => "6"} - %h2= t(:Editing_a_group) - %tbody - %tr - %td{:colspan => "2"}= f.label :name, t(:Name) - %td{:colspan => "4"}= f.text_field "name" -%table.action-box{:cellpadding => "2", :cellspacing => "0", :width => "100%"} +%p + = f.label :name, t(:Name) + %br + = f.text_field "name" + +%table.listing{:cellpadding => "2", :cellspacing => "0", :width => "100%"} %thead %tr %td{:colspan => "10"} - %h2= t(:Global_Permissions) + %h3= t(:Global_Permissions) = render :partial => "admin/permissions/form" diff --git a/app/views/admin/groups/edit.html.haml b/app/views/admin/groups/edit.html.haml index 648974a3..e9a94d25 100644 --- a/app/views/admin/groups/edit.html.haml +++ b/app/views/admin/groups/edit.html.haml @@ -1,11 +1,7 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{link_to(t(:Groups), admin_groups_path)} » #{t(:Editing_a_group)} + %span » #{link_to(t(:Groups), admin_groups_path)} » #{t(:Editing_a_group)} = error_messages_for :group - form_for [:admin, @group] do |f| = render :partial => "form", :locals => { :f => f } - %table.action-box{:cellpadding => "2", :cellspacing => "0", :width => "100%"} - %tfoot - %tr - %td{:colspan => "6"} - = submit_tag t(:Update) + = submit_tag t(:Update) diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index cfd0051b..955dc918 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -1,9 +1,9 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{t(:Groups)} + %span » #{t(:Groups)} %h2= t(:Groups) = link_to t(:New, :thing => "Group"), new_admin_group_path -%table.list-table{:cellpadding => "2", :cellspacing => "0", :rules => "groups", :width => "100%"} +%table.groups.listing{:cellpadding => "2", :cellspacing => "0", :rules => "groups", :width => "100%"} %thead %tr %td   @@ -12,11 +12,10 @@ %td Members %tbody - for group in @groups - %tr + %tr{ :class => stripe } %td - = link_to theme_image_tag("permissions.jpg", :alt => t(:Permissions), :title => t(:Permissions)), admin_group_permissions_path(group) = link_to theme_image_tag("edit.jpg", :alt => t(:Edit), :title => t(:Edit)), edit_admin_group_path(group) - = link_to theme_image_tag("delete.jpg", :alt => t(:Edit), :title => t(:Edit)), admin_group_path(group), :method => "delete", :confirm => t(:confirm_deletion, :thing => "group") + = link_to theme_image_tag("delete.jpg", :alt => t(:Delete), :title => t(:Delete)), admin_group_path(group), :method => "delete", :confirm => t(:confirm_deletion, :thing => "group") %td= group.name %td= link_to group.owner, admin_user_path(group.owner) unless group.owner.nil? %td= link_to pluralize(group.users.count, "member"), admin_group_users_path(group), :id => "members_for_#{group.identifier}" diff --git a/app/views/admin/groups/new.html.haml b/app/views/admin/groups/new.html.haml index e0de58be..33e4c25a 100644 --- a/app/views/admin/groups/new.html.haml +++ b/app/views/admin/groups/new.html.haml @@ -1,6 +1,6 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{link_to(t(:Groups), admin_groups_path)} » #{t(:Creating_a_group)} + %span » #{link_to(t(:Groups), admin_groups_path)} » #{t(:Creating_a_group)} = error_messages_for :group - form_for [:admin, @group] do |f| %table.action-box{:cellpadding => "2", :cellspacing => "0", :width => "100%"} diff --git a/app/views/admin/ips/index.html.haml b/app/views/admin/ips/index.html.haml index ea6a0c00..d5383154 100644 --- a/app/views/admin/ips/index.html.haml +++ b/app/views/admin/ips/index.html.haml @@ -1,5 +1,5 @@ .breadcrumbs - ""#{link_to t(:Administration_Section), admin_root_path} » #{link_to t(:Users), admin_users_path} » #{link_to @user, admin_user_path(@user)} » #{t(:IPs)} + #{link_to t(:Administration_Section), admin_root_path} » #{link_to t(:Users), admin_users_path} » #{link_to @user, admin_user_path(@user)} » #{t(:IPs)} %h2 = t(:IPs) = t(:for) diff --git a/app/views/admin/permissions/_form.html.haml b/app/views/admin/permissions/_form.html.haml index 9414c0b4..a56e6a1d 100644 --- a/app/views/admin/permissions/_form.html.haml +++ b/app/views/admin/permissions/_form.html.haml @@ -1,42 +1,41 @@ - if params[:type] == "category" %tr - %td= f.label "category_id", t(:Category) - %td{:colspan => "7"}= f.select "category_id", @categories.map { |c| [c.name, c.id] } + %td{:class => stripe }= f.label "category_id", t(:Category) + %td{:class => stripe, :colspan => "9"}= f.select "category_id", @categories.map { |c| [c.name, c.id] } - elsif params[:type] == "forum" %tr - %td= f.label "forum_id", t(:Forum) - %td{:colspan => "7"}= f.select "forum_id", @forums.map { |c| [c.title, c.id] } + %td{:class => stripe }= f.label "forum_id", t(:Forum) + %td{:class => stripe, :colspan => "9"}= f.select "forum_id", @forums.map { |c| [c.title, c.id] } - fields_for @permission do |permission| - ## Global only permissions - - if params[:type] || @permission.new_record? + - if !params[:type] %tr - %td{:colspan => "10"} - %h3 Section Access + %td{:colspan => "10", :class => "header"} + %h3= t(:Section_access) + - sections.in_groups_of(5, false) do |sections| + %tr + - for section in sections + %td{:width => "20px", :class => stripe }= permission.check_box "can_access_#{section}_section" + %td{ :class => stripe }= permission.label "can_access_#{section}_section", t("can_access_#{section}_section?") + - for management in managements[0..2] + = render :partial => "admin/permissions/management", :locals => { :management => management, :permission => permission } + - managements[2..-1].in_groups_of(5, false) do |managements| + %tr + - for management in managements + = render :partial => "admin/permissions/management", :locals => { :management => management, :permission => permission } %tr - - sections.each_with_index do |section, count| - %td{:width => "20px"}= permission.check_box "can_access_#{section}_section" - %td= permission.label "can_access_#{section}_section", t("can_access_#{section}_section?") - = break_row(count) - - managements.each_with_index do |management, count| - %td{:width => "20px"}= permission.check_box "can_manage_#{management}" - %td= permission.label "can_manage_#{management}", t("can_manage_#{management}?") - - ## Magic number "3" is because of 5 columns - the 2 sections = 3 - = break_row(3) - - 4.times do - %td   - %tr - %td{:colspan => "10"} + %td{:colspan => "10", :class => "header"} %h3= t(:Systemwide_Permissions) - global_permissions.each_with_index do |action, count| - %td{:width => "20px"}= permission.check_box action - %td= permission.label action, t("#{action}?") + %td{:width => "20px", :class => stripe }= permission.check_box action + %td{ :class => stripe }= permission.label action, t("#{action}?") = break_row(count) - ## Global or local permissions %tr - %td{:colspan => "10"} + %td{:colspan => "10", :class => "header"} %h3= t(:Forum_Permissions) %tr - forum_permissions.each_with_index do |action, count| - %td{:width => "20px"}= permission.check_box action - %td= permission.label action, t("#{action}?") + %td{ :class => stripe, :width => "20px"}= permission.check_box action + %td{ :class => stripe }= permission.label action, t("#{action}?") = break_row(count) diff --git a/app/views/admin/permissions/index.html.haml b/app/views/admin/permissions/index.html.haml index 864d0dc0..c44a5cc2 100644 --- a/app/views/admin/permissions/index.html.haml +++ b/app/views/admin/permissions/index.html.haml @@ -7,7 +7,7 @@ - if @object.is_a?(Group) %h3= t(:Global_Permissions) = link_to "Edit Global Permissions", edit_admin_group_path(@object) - %table.list-table{:cellpadding => "3", :cellspacing => "0", :rules => "groups", :width => "100%"} + %table.listing{:cellpadding => "3", :cellspacing => "0", :rules => "groups", :width => "100%"} %thead %tr %td= t(:can_see_forum?) @@ -15,7 +15,7 @@ %td= t(:can_reply_to_topics?) %td= t(:can_start_new_topics?) %tbody - %tr + %tr{ :class => "even"} %td= theme_image_tag(@object.permissions.global.can_see_forum?.to_s + ".jpg") %td= theme_image_tag(@object.permissions.global.can_see_category?.to_s + ".jpg") %td= theme_image_tag(@object.permissions.global.can_reply_to_topics?.to_s + ".jpg") @@ -25,7 +25,7 @@ %h3= t(:No_forums_to_assign_specific_permissions_to) %h3= t(:Forum_specific_permissions) = link_to t(:New, :thing => t(:Forum_specific_permissions)), new_admin_group_permission_path(@object, :type => "forum") - %table.list-table{:cellpadding => "3", :cellspacing => "0", :rules => "groups", :width => "100%"} + %table.listing{:cellpadding => "3", :cellspacing => "0", :rules => "groups", :width => "100%"} - if @object.permissions.forums.empty? %thead %tr diff --git a/app/views/admin/permissions/new.html.haml b/app/views/admin/permissions/new.html.haml index f3b0a8e2..7f243a27 100644 --- a/app/views/admin/permissions/new.html.haml +++ b/app/views/admin/permissions/new.html.haml @@ -1,6 +1,6 @@ - form_for [:admin, @object, @permission] do |f| = error_messages_for :permission - %table.action-box{:cellpadding => "2", :cellspacing => "0", :width => "100%"} + %table.listing.permissions{:cellpadding => "2", :cellspacing => "0", :width => "100%"} %thead %tr %td{:colspan => "10"} diff --git a/app/views/admin/ranks/index.html.haml b/app/views/admin/ranks/index.html.haml index 2e3c6bd0..0438284f 100644 --- a/app/views/admin/ranks/index.html.haml +++ b/app/views/admin/ranks/index.html.haml @@ -1,9 +1,9 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{t(:Ranks)} + %span » #{t(:Ranks)} %h2 Ranks = link_to t(:New, :thing => "Rank"), new_admin_rank_path -%table.list-table{:cellpadding => "5", :cellspacing => "0", :rules => "groups", :width => "100%"} +%table.listing.ranks{:cellpadding => "3", :cellspacing => "0", :rules => "groups", :width => "100%"} %thead %tr %td   @@ -13,7 +13,7 @@ %tbody - unless @ranks.empty? - for rank in @ranks - %tr + %tr{ :class => stripe } %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_deletion, :thing => "rank")) @@ -22,7 +22,7 @@ %td= rank.custom ? t(:yes) : t(:no) - else %tr - %td{:colspan => "4"} + %td{:colspan => "4", :align => "center", :class => "even"} %b = t(:no_ranks) = link_to t(:user_should_create), new_admin_rank_path diff --git a/app/views/admin/themes/index.html.haml b/app/views/admin/themes/index.html.haml index 2dae18e2..7b859b21 100644 --- a/app/views/admin/themes/index.html.haml +++ b/app/views/admin/themes/index.html.haml @@ -2,7 +2,7 @@ = link_to t(:Administration_Section) \» #{t(:Themes)} %h2= t(:Themes) -%table.list-table{:cellpadding => "2", :cellspacing => "0", :rules => "groups", :width => "100%"} +%table.listing.themes{:cellpadding => "2", :cellspacing => "0", :rules => "groups", :width => "100%"} %thead %tr %td= t(:Name) @@ -10,13 +10,13 @@ %tbody - unless @themes.empty? - for theme in @themes - %tr + %tr{ :class => stripe } %td= theme.name %td - if theme.is_default? = t(:yes) - else - = link_to t(:make_default), make_default_admin_theme_path(theme), :method => "put" + = link_to t(:Make_default), make_default_admin_theme_path(theme), :method => "put" - else %tr %td{:colspan => "4"}= t(:no_themes) diff --git a/app/views/admin/users/ban_ip.html.haml b/app/views/admin/users/ban_ip.html.haml index 58dd94a2..a20d60c2 100644 --- a/app/views/admin/users/ban_ip.html.haml +++ b/app/views/admin/users/ban_ip.html.haml @@ -1,28 +1,18 @@ - form_for @banned_ip, :url => ban_ip_admin_users_path do |f| = error_messages_for :banned_ip - %table.action-box{:cellpadding => "2", :cellspacing => "0", :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(:Ban_an_ip) + %p + = f.label "ip", t(:IP) + = f.text_field "ip", :value => params[:ip] + = t(:accepts_wildcard) + %p + = f.label "ban_time", t(:Ban_time) + = f.text_field "ban_time" + = observe_field("banned_ip_ban_time", :frequency => 0.5, :url => admin_chronic_path, :with => "duration", :update => "date") + %p + = f.label "reason", t(:Reason) + = f.text_field "reason" + = submit_tag(t(:Ban_this_range)) %h2= t(:Banned_IPs) - unless @banned.empty? %ul diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 54d2ddaa..7c500767 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -1,9 +1,8 @@ .breadcrumbs = link_to t(:Administration_Section), admin_root_path - \» #{t(:Users)} -- if @object - = t(:for) - = "#{@object.class.to_s}: #{@object}" + %span » #{t(:Users)} + - if @object + %span== » #{t(:for)} #{@object.class.to_s}: #{@object} %h2= t(:Users) = will_paginate(@users) - if @object.is_a?(Group) @@ -15,14 +14,14 @@ = text_field_tag :user = submit_tag t(:Add_to_group) :javascript - $("#user").autocomplete("/admin/users/search");%table.list-table{:cellpadding => "2", :cellspacing => "0", :rules => "groups", :width => "100%"} -%table + $("#user").autocomplete("/admin/users/search") +%table.users.listing{:cellpadding => "3", :cellspacing => "0", :rules => "groups", :width => "100%"} %thead %tr %td   %td= t(:Login) %td= t(:Display_Name) - %td= t(:Member_since) + %td= t(:Member_for) %td= t(:Posts) %td= t(:Banned) %td= t(:Banned_until) @@ -31,11 +30,11 @@ %tbody - if @users.empty? - if @object - %tr + %tr{ :class => stripe } %td{:colspan => "9"}= t(:No_users_in, :thing => @object) - else - for user in @users - %tr + %tr{ :class => stripe } %td.icon - if @object.is_a?(Group) = link_to theme_image_tag("remove.jpg", :alt => t(:Remove_user_from_group), :title => t(:Remove_user_from_group)), admin_group_member_path(@object, user), :method => :delete, :confirm => t(:confirm_user_removal_from_group, :group => @object.to_s, :user => user) @@ -43,8 +42,8 @@ = link_to theme_image_tag("edit.jpg", :alt => t(:Edit_user), :title => t(:Delete_user)), edit_admin_user_path(user) = link_to theme_image_tag("ban.jpg", :alt => t(:Ban_user), :title => t(:Ban_user)), ban_admin_user_path(user), :confirm => t(:confirm_user_ban) %td= link_to h(user.login), admin_user_path(user) - %td= link_to h(user.display_name), admin_user_path(user) - %td= user.created_at.strftime date_time_display + %td= link_to h(user.display_name || user.login), admin_user_path(user) + %td= time_ago_in_words(user.created_at) %td= user.posts.count %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(date_time_display) diff --git a/app/views/edits/index.html.haml b/app/views/edits/index.html.haml index 1a05ee41..f9c47abb 100644 --- a/app/views/edits/index.html.haml +++ b/app/views/edits/index.html.haml @@ -1,8 +1,9 @@ .breadcrumbs - = link_to t(:Moderator_Section), moderator_root_path - \» #{t(:Edit_History)} #{t(:for_a_post)} -%h2= t(:Edit_History) -%table.forums{:cellpadding => "0", :cellspacing => "0", :width => "100%"} + == #{breadcrumb(@post.forum)} + » + = link_to(@post.topic.subject, [@post.forum]) +%h2== #{t(:Edit_history_for, :number => @post.number, :subject => @post.topic.subject)} +%table.edits.listing{:cellpadding => "0", :cellspacing => "0", :width => "100%"} %thead %tr %td= t(:Timestamp) @@ -10,7 +11,7 @@ %td IP %tbody - for edit in @edits - %tr + %tr{ :class => stripe } %td= link_to edit.created_at.strftime(date_display + " " + time_display), [@post, edit] %td= edit.user %td= edit.ip diff --git a/app/views/forums/_forum.html.haml b/app/views/forums/_forum.html.haml index 054880da..8a054a74 100644 --- a/app/views/forums/_forum.html.haml +++ b/app/views/forums/_forum.html.haml @@ -1,4 +1,4 @@ -%li{ :class => cycle("odd", "even")} +%li{ :class => stripe } %h2= link_to(h(forum.title), forum_path(forum)) = h(forum.description) - if forum.children.exists? diff --git a/app/views/forums/index.html.haml b/app/views/forums/index.html.haml index 9e4efa81..438f3cf5 100644 --- a/app/views/forums/index.html.haml +++ b/app/views/forums/index.html.haml @@ -19,11 +19,11 @@ - else %li %strong - = t(:no_forums) + = t(:no_forums_for_category) - unless current_user.can?(:manage_forums) = t(:administrator_should_create_forum) - else - = link_to t(:you_should_create_forum), new_admin_forum_path + = link_to t(:you_should_create_forum), new_admin_category_forum_path(category) %br - else = link_to(t(:rBoard), forums_path) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 72081b65..ba252410 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -2,7 +2,7 @@ %html{:lang => "en", "xml:lang" => "en", :xmlns => "http://www.w3.org/1999/xhtml"} %head %title - = @title || params[:action].capitalize + " - " + params[:controller].split("/").map(&:capitalize).join(" - ") + = @title || params[:action].gsub("_", " ").titleize + " - " + params[:controller].split("/").reverse.map(&:capitalize).join(" - ") \- = t(:rBoard) %link{:href => "#{ActionController::Base.relative_url_root}/themes/#{theme.name}/style.css", :rel => "stylesheet"} diff --git a/app/views/messages/_message.html.haml b/app/views/messages/_message.html.haml index 778815d0..691dd7e9 100644 --- a/app/views/messages/_message.html.haml +++ b/app/views/messages/_message.html.haml @@ -1,7 +1,7 @@ -%tr - %td{:align => "center"}= link_to(message.to_read? ? theme_image_tag("old.jpg") : theme_image_tag("new.jpg"), message_path(message)) - %td{:align => "center"}= link_to(theme_image_tag("delete.jpg"), message_path(message), :method => "delete", :confirm => t(:confirm_deletion, :thing => "message")) - %td{:align => "center"}= message.from.login - %td{:align => "center"} - = time_ago_in_words(message.created_at) - = t(:ago) +- link_to message_path(message) do + %li{ :class => message.to_read? ? "read" : "unread" } + - f.fields_for message do |message_fields| + = message_fields.check_box "selected" + %strong== From #{message.from.login} #{time_ago_in_words(message.created_at)} #{t(:ago)} + \- + = truncate(parse_text(message.text.split("\n")[0]), 140) diff --git a/app/views/messages/index.html.haml b/app/views/messages/index.html.haml index a461cc89..97155531 100644 --- a/app/views/messages/index.html.haml +++ b/app/views/messages/index.html.haml @@ -1,17 +1,10 @@ %h2 Inbox = link_to t(:Send_new_message), new_message_path | #{link_to t(:Sent_Messages), sent_messages_path} -%table.messages.listing{:cellpadding => "5", :cellspacing => "0", :rules => "groups", :width => "100%"} - %thead - %tr - %td   - %td   - %td= t(:From) - %td= t(:Time_sent) - %tbody - - unless @messages.empty? - = render :partial => "message", :collection => @messages - - else - %tr - %td{:align => "center", :colspan => "4"} - %b= t(:no_new_messages) +- unless @messages.empty? + - form_for @messages, :url => change_messages_path do |f| + %ul.messages.listing{:cellpadding => "5", :cellspacing => "0", :rules => "groups", :width => "100%"} + = render :partial => @messages, :locals => { :f => f } +- else + %br + %strong= t(:no_new_messages) diff --git a/app/views/messages/new.html.haml b/app/views/messages/new.html.haml index 10df5b03..73197a95 100644 --- a/app/views/messages/new.html.haml +++ b/app/views/messages/new.html.haml @@ -3,16 +3,12 @@ %table.action-box{:cellpadding => "5", :cellspacing => "0", :width => "100%"} %tbody %tr - %td - %b To: + %td= f.label :text, t(:To) %td= f.select "to_id", @users.map { |u| [u.login,u.id] } %tr %td#to{:colspan => "2"} %tr - %td{:valign => "top"} - %b - = t(:To) - \: + %td{:valign => "top"}= f.label :text, t(:Text) %td= f.text_area "text", :cols => 80 %tfoot %tr diff --git a/app/views/posts/_form.html.haml b/app/views/posts/_form.html.haml index 39be0dc4..98ea85b8 100644 --- a/app/views/posts/_form.html.haml +++ b/app/views/posts/_form.html.haml @@ -1,24 +1,19 @@ -%tbody - %tr - %td{:valign => "top"} - = f.label :text, t(:Text) - %td - = f.text_area 'text', :cols => (cols || 70), :rows => (rows || 20) - - if current_user.can?(:edit_posts, @forum) && !@post.new_record? - %tr - %td{:colspan => "2"} - = f.label 'edit_reason', t(:edit_reason) - = f.text_field 'edit_reason' - %tr - %td{:colspan => "2"} - = check_box_tag 'silent_edit' - = label_tag 'silent_edit', t(:Edit_silently?) -%tfoot - %tr - %td{:colspan => "2"} - - if local_assigns[:submit] - = submit_tag(t(local_assigns[:submit].to_sym)) - - elsif @post.new_record? - = submit_tag(t(:Create)) - - else - = submit_tag(t(:Update)) +%p + - if label + = f.label 'text', t(:Text) + %br + = f.text_area 'text', :cols => 140, :rows => 10 +- if current_user.can?(:edit_posts, @forum) && !@post.new_record? + %p + = f.label 'edit_reason', t(:edit_reason) + = f.text_field 'edit_reason' + %p + = check_box_tag 'silent_edit' + = label_tag 'silent_edit', t(:Edit_silently?) +%p + - if local_assigns[:submit] + = submit_tag(t(local_assigns[:submit].to_sym)) + - elsif @post.new_record? + = submit_tag(t(:Create)) + - else + = submit_tag(t(:Update)) diff --git a/app/views/posts/_post.html.haml b/app/views/posts/_post.html.haml index 2d1ecf36..f0b5d4eb 100644 --- a/app/views/posts/_post.html.haml +++ b/app/views/posts/_post.html.haml @@ -1,57 +1,43 @@ -.post{:id => "post_#{post.id}", :class => cycle("odd", "even")} - %table - %tr - %td.user_info{ :valign => "top"} - = link_to(h(post.user), post.user) +.post{:id => "post_#{post.id}", :class => stripe} + = render :partial => "posts/actions", :locals => { :post => post } + + .details + %a{:href => forum_topic_path(post.topic.forum, post.topic) + "/#{(params[:page] || 1)}" + "#post_#{post.id}", :name => "post_#{post.id}"} + \# + = post.number + \- + = time_ago_in_words(post.created_at) + " " + t(:ago) + - unless post.edits.empty? + \- + = link_to pluralize(post.edits.size, "edit"), post_edits_path(post) + - edits = current_user.can?(:see_hidden_edits, @forum) ? post.edits : post.edits.visible + - unless edits.empty? + %span.edit-note + == - #{t(:This_post_was_edited_by)} #{post.editor.login} #{time_ago_in_words(post.updated_at)} #{t(:ago)} + .body + :preserve + #{parse_text(post.text)} + - if post.user.can?(:use_signature, @forum) && !post.user.signature.blank? + %p.signature %br - - if post.user.has_avatar? - = image_tag post.user.avatar(:thumbnail, :class => "user_avatar") - - elsif !post.user.email.blank? - = image_tag("http://www.gravatar.com/avatar.php?gravatar_id=" + Digest::MD5.hexdigest(post.user.email) + "&s=64", :class => "user_avatar") - = post.user.rank + ______________ %br - == #{post.user.posts.count} #{t(:posts)} - %br - == #{t(:Since)} #{post.user.created_at.strftime(date_display)} - %br - == #{post.user.online? ? t(:Online) : t(:Offline)} - %td.actions - - if !post.topic.locked? || (post.topic.locked? && current_user.can?(:edit_locked_topics, @forum)) - - if current_user.can?(:reply, @forum) - = link_to t(:Reply), new_topic_post_path(post.topic) - \/ - = link_to t(:Quote), reply_topic_post_path(post.topic, post) - - if (post.belongs_to?(current_user) && current_user.can?(:edit_own_posts, @forum)) || current_user.can?(:edit_posts, @forum) - \/ - = link_to t(:Edit), edit_topic_post_path(post.topic, post) - - if (post.belongs_to?(current_user) && current_user.can?(:delete_own_posts, @forum)) || current_user.can?(:delete_posts, @forum) - \/ - = link_to t(:Delete), topic_post_path(post.topic, post), :method => "delete", :confirm => t(:confirm_deletion, :thing => "post") - - if current_user.can?(:split_topics, @forum) - \/ - = link_to t(:Split), split_moderator_topic_post_path(post.topic, post) - - else - = t(:topic_locked_or_unlocked, :status => "locked") - %tr - %td{:valign => "top"} - .details - %a{:href => forum_topic_path(post.topic.forum, post.topic) + "/#{(params[:page] || 1)}" + "#post_#{post.id}", :name => "post_#{post.id}"} - \# - = post.number - \- - = time_ago_in_words(post.created_at) + " " + t(:ago) - - unless post.edits.empty? - \- - = link_to pluralize(post.edits.size, "edit"), post_edits_path(post) - .content - = parse_text(post.text) - - if post.user.can?(:use_signature, @forum) && !post.user.signature.blank? - .signature - %br - ______________ - %br - = parse_text(post.user.signature) - - edits = current_user.can?(:see_hidden_edits, @forum) ? post.edits : post.edits.visible - - unless edits.empty? - .edit-note - == #{t(:This_post_was_edited_by)} #{post.editor.login} #{time_ago_in_words(post.updated_at)} #{t(:ago)} + :preserve + #{parse_text(post.user.signature)} + + .user_info + %strong= link_to(h(post.user), post.user) + %br + - if post.user.has_avatar? + = image_tag post.user.avatar(:thumbnail, :class => "user_avatar") + - elsif !post.user.email.blank? + = image_tag("http://www.gravatar.com/avatar.php?gravatar_id=" + Digest::MD5.hexdigest(post.user.email) + "&s=64", :class => "user_avatar") + = post.user.rank + %br + == #{post.user.posts.count} #{t(:posts)} + %br + == #{t(:Since)} #{post.user.created_at.strftime(date_display)} + %br + == #{post.user.online? ? t(:Online) : t(:Offline)} + + \ No newline at end of file diff --git a/app/views/posts/edit.html.haml b/app/views/posts/edit.html.haml index 47872784..dfd1e519 100644 --- a/app/views/posts/edit.html.haml +++ b/app/views/posts/edit.html.haml @@ -1,13 +1,10 @@ = error_messages_for 'post' +%h2 + = t(:Editing_a_reply_in) + = @topic.subject - form_for [@topic, @post] do |f| - = hidden_field_tag("quote", params[:quote]) - %table.action-box{:cellpadding => "2", :cellspacing => "0", :width => "100%"} - %thead - %tr - %td{:colspan => "2"} - %h2 - = t(:Editing_a_reply_in) - = @topic.subject - = render :partial => "form", :locals => { :f => f, :cols => 70, :rows => 20 } -%table.posts{:cellpadding => "5", :cellspacing => "0", :width => "100%"} - = render :collection => @posts + .post + = hidden_field_tag("quote", params[:quote]) + = render :partial => "form", :locals => { :f => f, :cols => 70, :rows => 20, :label => true } +.posts.listing + = render :partial => @posts, :locals => { :show_topic => false } diff --git a/app/views/posts/new.html.haml b/app/views/posts/new.html.haml index 518d4efe..9b17dba2 100644 --- a/app/views/posts/new.html.haml +++ b/app/views/posts/new.html.haml @@ -14,7 +14,7 @@ %td{:valign => "top"} = f.label "text", t(:Post) \: - %td= f.text_area("text", :cols => "80") + %td= f.text_area("text", :cols => "140") %tfoot %tr %td{:colspan => "2"}= submit_tag(t(:Create)) diff --git a/app/views/topics/show.html.haml b/app/views/topics/show.html.haml index f35f912d..b567eae2 100644 --- a/app/views/topics/show.html.haml +++ b/app/views/topics/show.html.haml @@ -15,13 +15,9 @@ .posts.listing = render :partial => @posts, :locals => { :show_topic => false } - if current_user.can?(:reply) - %table#quick-reply{:cellpadding => "2", :cellspacing => "0", :width => "100%"} - %thead - %tr - %td{:colspan => "2"} - %h3= t(:Quick_Reply) - %tbody - - form_for [@topic, @post] do |f| - = render :partial => "posts/form", :locals => { :f => f, :rows => 10, :cols => 70, :submit => "Reply" } + #quick-reply{:cellpadding => "2", :cellspacing => "0", :width => "100%"} + %h3= t(:Quick_Reply) + - form_for [@topic, @post] do |f| + = render :partial => "posts/form", :locals => { :f => f, :rows => 10, :cols => 70, :submit => "Reply", :label => false } = menu_for_topic = pagination diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml index abe1725e..e4843979 100644 --- a/app/views/users/index.html.haml +++ b/app/views/users/index.html.haml @@ -1,6 +1,6 @@ %h2= t(:Users) = will_paginate @users -%table.users.listing{:cellpadding => "2", :cellspacing => "0", :rules => "groups", :width => "100%"} +%table.users.listing{:cellpadding => "2", :cellspacing => "0", :width => "100%"} %thead %tr %td= t(:Login) @@ -18,7 +18,7 @@ %td= user.created_at.strftime(date_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_time.nil? ? t(:Never) : time_ago_in_words(user.ban_time) %td= user.ban_times - if current_user.can?(:manage_users) %td= user.ip diff --git a/app/views/users/signup.html.haml b/app/views/users/signup.html.haml index cc6da3c0..833fa265 100644 --- a/app/views/users/signup.html.haml +++ b/app/views/users/signup.html.haml @@ -1,32 +1,24 @@ = error_messages_for :user -%table.forums{:cellpadding => "2", :cellspacing => "0", :rules => "groups", :width => "100%"} - %thead - %tr - %td{:align => "left", :width => "40%"} - %b= t(:Signup) - %tbody - %tr - %td{:align => "left"} - - form_for :user do |f| - %p - %label{:for => "login"}= t(:Login) - %br - = f.text_field :login - %p - %label{:for => "display_name"}= t(:Display_Name) - %br - = f.text_field :display_name - %p - %label{:for => "email"}= t(:Email) - %br - = f.text_field :email - %p - %label{:for => "password"}= t(:Password) - %br - = f.password_field :password - %p - %label{:for => "password_confirmation"}= t(:Confirm_Password) - %br - = f.password_field :password_confirmation - %p= submit_tag t(:Signup) - %tfoot +%h2= t(:Signup) +- form_for :user do |f| + %p + = f.label :login, t(:Login) + %br + = f.text_field :login + %p + = f.label :display_name, t(:Display_Name) + %br + = f.text_field :display_name + %p + = f.label :email, t(:Email) + %br + = f.text_field :email + %p + = f.label :password, t(:Password) + %br + = f.password_field :password + %p + = f.label :password_confirmation, t(:Confirm_Password) + %br + = f.password_field :password_confirmation + %p= submit_tag t(:Signup) diff --git a/config/locales/en.rb b/config/locales/en.rb index 34412d71..c83d7667 100644 --- a/config/locales/en.rb +++ b/config/locales/en.rb @@ -175,6 +175,7 @@ :can_reply_to_topics? => "Can reply to topics?", :can_see_category? => "Can see category?", :can_see_forum? => "Can see forum?", + :can_see_hidden_edits? => "Can see hidden edits?", :can_send_messages_to_groups? => "Can send messages to groups?", :can_send_multiple_messages? => "Can send multiple messages?", :can_split_topics? => "Can split topics?", @@ -188,6 +189,7 @@ :Changing_your_password => "If you want to change your password fill in the password and password confirmation boxes below. Otherwise, leave them blank.", :Child_of => "Child of", :Closed => "Closed", + :Code => "Code", :Configuration_not_found => "The configuration option {{key}} does not exist.", :Configuration_Settings => "Configuration Settings", :configuration_settings_updated => "The configuration settings were updated.", @@ -223,7 +225,7 @@ :Display_Name => "Display Name", :Do_not_have_a_user_account? => "Don't have a user account?", :Edit => "Edit", - :Editing_a_category => "Editing a category", + :Editing => "Editing {{thing}}", :Editing_a_forum => "Editing a forum", :Editing_a_group => "Editing a group", :Editing_a_permission => "Editing a permission", @@ -233,7 +235,7 @@ :Editing_a_user => "Editing a user", :Editing_moderation_item_for => "Editing moderation item for {{thing}}", :Editing_your_profile => "Editing your profile", - :Edit_History => "Edit History", + :Edit_history_for => "Edit History for post \#{{number}} in {{subject}}", :Edit_Profile => "Edit Profile", :edit_reason => "Edit reason", :Edit_silently? => "Edit silently?", @@ -293,10 +295,10 @@ :Login => "Login", :login => "login", :Logout => "Logout", - :make_default => "make default", + :Make_default => "Make this theme the default", :Master_topic => "Master topic", + :Member_for => "Member for", :Member_List => "Member List", - :Member_since => "Member since", :Merge => "Merge", :Merging => "Merging", :message_does_not_belong_to_you => "That message does not belong to you.", @@ -342,9 +344,10 @@ :No_categories_to_assign_specific_permissions_to => "There are no categories to assign specific permissions to.", :No_category_specific_permissions => "There are no category-specific permissions for this group.", :no_forums => "There are no forums.", + :no_forums_for_category => "There are no forums for this category.", :No_forums_to_assign_specific_permissions_to => "There are no forums to assign specific permissions to.", :No_forum_specific_permissions => "There are no forum-specific permissions for this group.", - :no_new_messages => "no new messages", + :no_new_messages => "You have no new messages.", :no_posts => "There are no posts created by {{by}}", :no_ranks => "There are no ranks.", :no_sent_messages => "no sent messages", @@ -393,6 +396,7 @@ :recent_users => "Users on in the last 15 minutes", :registered_users => "Registered Users", :Remember_me => "Remember me", + :Remove_user_from_group => "Remove user from group", :Replies => "Replies", :replies_count => { :zero => "no replies", :one => "1 reply", :other => "{{count}} replies" }, :Reply => "Reply", @@ -411,6 +415,7 @@ :Search => "Search", :Search_disabled => "Search is disabled", :Search_returned => "Search returned", + :Section_access => "Section access", :See_reports => "See reports", :selected_for_moderation => " selected for moderation", :selection_yielded_no_posts => "Your selection yielded no posts.", @@ -498,13 +503,14 @@ :Views => "Views", :views_count => { :one => "1 view", :zero => "no views", :other => "{{count}} views" }, :Welcome_to_rBoard => "Welcome to rBoard!", - :Welcome_to_rBoard_post => "Welcome to rBoard! Feel free to delete this post, topic and forum.", + :Welcome_to_rBoard_post => "Welcome to rBoard! Feel free to delete this post, topic and forum if you wish. Thank you for using rBoard.", :Why_not => "Why not", :without_stating_a_reason => "without stating a reason", :wrote => "wrote:", :x_new_messages => {:zero => 'No new messages', :one => 'One new message', :other => '{{count}} new messages'}, :Yes => "Yes", :yes => "yes", + :Your_first_topic => "Your first topic", :Your_topic_moderation_queue => "Your topic moderation queue", :you_are_banning_yourself => "You are banning yourself", :you_are_not_allowed_to_read_messages => "You are not allowed to read private messages", diff --git a/config/routes.rb b/config/routes.rb index 4e54c77c..5b783ac8 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -72,7 +72,7 @@ forum.resources :topics, :member => { :lock => :put, :unlock => :put } end - map.resources :messages, :member => { :reply => :get }, :collection => { :sent => :get } + map.resources :messages, :member => { :reply => :get }, :collection => { :sent => :get, :change => :put } map.resources :posts, :member => { :destroy => :any } do |post| post.resources :edits diff --git a/db/schema.rb b/db/schema.rb index 34d71754..24004a00 100755 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,7 +9,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20091221070406) do +ActiveRecord::Schema.define(:version => 20100203045407) do create_table "banned_ips", :force => true do |t| t.string "ip" @@ -174,6 +174,8 @@ t.boolean "can_post_in_closed_forums", :default => false t.boolean "can_see_hidden_edits", :default => false t.boolean "can_silently_edit", :default => false + t.boolean "can_manage_permissions", :default => false + t.boolean "can_manage_reports", :default => false end add_index "permissions", ["category_id"], :name => "index_permissions_on_category_id" diff --git a/features/edits.feature b/features/edits.feature index a46f2737..9cb916fb 100644 --- a/features/edits.feature +++ b/features/edits.feature @@ -12,6 +12,7 @@ Feature: Edits When I follow "Public Forum" And I follow "Default topic" And I follow "Edit" + Then show me the page And I fill in "Text" with "Something other than the norm." And I press "Update" Then I should see "This post was edited by administrator less than a minute ago" diff --git a/features/support/setup.rb b/features/support/setup.rb index c210c6aa..eca56c57 100644 --- a/features/support/setup.rb +++ b/features/support/setup.rb @@ -3,5 +3,3 @@ Group.delete_all Permission.delete_all User.delete_all - -setup_user_base diff --git a/public/themes/blue/style.css b/public/themes/blue/style.css index a0d7f42a..980d1e3a 100644 --- a/public/themes/blue/style.css +++ b/public/themes/blue/style.css @@ -15,6 +15,10 @@ h3 { img { border: 0 none; } +form p label { + float: left; + width: 10em; } + #logged-in-as { font-size: 82%; margin: 0px; @@ -77,6 +81,8 @@ img { .breadcrumbs { color: #84bef0; margin-top: .8em; } + .breadcrumbs span { + color: black; } #moderated_topics_count { font-size: 9pt; } @@ -101,15 +107,41 @@ img { .icon { width: 80px; } -.listing { +.listing .odd { + background: #DBEAFF; } +.listing .even { + background: white; } +.listing .header { + border: 0px; } + +table.listing thead tr td { + font-weight: bold; + border-right: 1px solid #B5C8DF; + border-bottom: 1px solid #9CACC0; + border-top: 1px solid #9CACC0; + padding: 10px; + background: #CDE1FF; } +table.listing thead tr td:first-child { + border-left: 1px solid #B5C8DF; } +table.listing tbody tr td { + padding: 5px; } +table.listing tbody tr:last-child td { + border-bottom: 1px solid #9CACC0; } +table.listing tbody tr td:first-child { + border-left: 1px solid #B5C8DF; } +table.listing tbody tr td:last-child { + border-right: 1px solid #B5C8DF; } +table.listing tbody tr td { + border-right: 1px solid #B5C8DF; + border-bottom: 1px solid #B5C8DF; } + +ul.listing { list-style-type: none; padding: 0px; margin: 0px; } - .listing li { + ul.listing li { border-bottom: 1px solid #84AFD3; padding: 3px; } - .listing .odd { - background: #DBEAFF; } .forums { list-style-type: none; } @@ -125,31 +157,11 @@ img { .topics input, .topics .status { float: left; } -.category { - padding: 5px; } - -.forum, .info-box, .list-table, .category { - border: 1px solid #84AFD3; } - -.forums td, .forum td, .list-table td { - padding: 5px; } - -.forums thead, .forum thead, .info-box thead, .post thead, .action-box thead, .list-table thead { - background: #aad8ff none repeat-x scroll 0; - font-weight: bold; } - -.forums tbody td, .list-table tbody td { +.messages .read { + background: #85c7ff; } +.messages .unread { background: white; } -.forum tfoot { - background: #C1E2FE none repeat scroll 0; } - .forum tfoot input { - background: #DBEEFD none repeat scroll 0; - border: 1px solid #48769D; - font-size: 10pt; - letter-spacing: -1px; - margin: 2px; } - .button { display: inline-block; padding-top: 7px; @@ -176,17 +188,69 @@ img { .post { margin-bottom: 1.5em; border: 1px #84afd3 solid; - background: #e1f1ff; } - .post .actions { - background: red; } + background: #e1f1ff; + margin: 0.5em auto; + overflow: auto; + -moz-border-radius: 5px; } + .post div, .post pre { + padding: 5px; } + .post pre { + background: white; + border: 1px solid black; + -moz-border-radius: 5px; + line-height: 0.75em; + overflow: auto; + text-align: left; } .post .user_info { - width: 20%; - float: left; - background: red; } + width: 18%; } + .post .body { + float: right; + clear: both; + border-left: 1px dotted #84afd3; + width: 78%; + min-height: 10.5em; } + .post .details { + border-bottom: 1px dotted #84afd3; } + .post .actions { + float: right; } + +form .post { + padding: 5px; } + +#quick-reply { + padding: 5px; + border: 1px #84afd3 solid; + margin: 0.5em auto; + -moz-border-radius: 5px; } + +.messages a { + color: black; } + +ul#navlist { + margin: 0px; + padding: 0; + white-space: nowrap; } + ul#navlist li { + display: inline; + list-style-type: none; } + ul#navlist a { + padding: 3px 10px; } + ul#navlist a:link, ul#navlist a:visited { + color: #336699; + background-color: #b8dcfc; + text-decoration: none; + border: 1px solid #336699; + border-bottom: 0; + -moz-border-radius: 5px; } + ul#navlist a.selected { + border: 2px solid #336699; + border-bottom: 0; + font-weight: bold; } -.post_content { - padding: .5em 0; - clear: both; } +#admin-page, #moderator-page { + background: #b8dcfc; + padding: 5px; + border: 1px solid #336699; } .clear { display: block; @@ -215,22 +279,6 @@ img { text-align: left; width: 90%; } -.CodeRay { - padding: 0; - border-spacing: 0; } - .CodeRay .line_numbers { - width: 40px; - background: #efefef; - padding: 5px; - text-align: center; - border: 1px solid #84AFD3; - border-right: 0; } - .CodeRay .code { - background: white; - border: 1px solid #84AFD3; - border-left: 0; - padding: 20px; } - .term { font-family: Monaco, "Courier New", monospace; font-weight: bold; } @@ -270,33 +318,5 @@ img { .ac_results ul li:hover { background: #DBF8FF; } -ul#navlist { - margin: 2px 2px 2px 0; - padding: 0; - white-space: nowrap; } - ul#navlist li { - display: inline; - list-style-type: none; } - ul#navlist a { - padding: 3px 10px; } - ul#navlist a:link, ul#navlist a:visited { - color: #336699; - background-color: #b8dcfc; - text-decoration: none; - border: 1px solid #336699; - border-bottom: 0; } - ul#navlist a.selected { - border: 2px solid #336699; - border-bottom: 0; - font-weight: bold; } - -#admin-page, #moderator-page { - background: #b8dcfc; - padding: 5px; - border: 1px solid #336699; } - -.list-table td { - text-align: center; } - .lalign { text-align: left !important; } diff --git a/public/themes/blue/style.sass b/public/themes/blue/style.sass index b4db5186..1d3927a3 100644 --- a/public/themes/blue/style.sass +++ b/public/themes/blue/style.sass @@ -15,6 +15,12 @@ h3 img border: 0 none + +form + p + label + float: left + width: 10em #logged-in-as font-size: 82% @@ -79,6 +85,9 @@ img .breadcrumbs color: #84bef0 margin-top: .8em + + span + color: black #moderated_topics_count font-size: 9pt @@ -104,6 +113,50 @@ img width: 80px .listing + .odd + background: #DBEAFF + + .even + background: white + + .header + border: 0px + +table.listing + thead + tr + td + font-weight: bold + border-right: 1px solid #B5C8DF + border-bottom: 1px solid #9CACC0 + border-top: 1px solid #9CACC0 + padding: 10px + background: #CDE1FF + + td:first-child + border-left: 1px solid #B5C8DF + tbody + tr + td + padding: 5px + + tbody + tr:last-child + td + border-bottom: 1px solid #9CACC0 + + tr + td:first-child + border-left: 1px solid #B5C8DF + + td:last-child + border-right: 1px solid #B5C8DF + + td + border-right: 1px solid #B5C8DF + border-bottom: 1px solid #B5C8DF + +ul.listing list-style-type: none padding: 0px margin: 0px @@ -111,9 +164,6 @@ img li border-bottom: 1px solid #84AFD3 padding: 3px - - .odd - background: #DBEAFF .forums list-style-type: none @@ -133,31 +183,12 @@ img input, .status float: left -.category - padding: 5px - -.forum, .info-box, .list-table, .category - border: 1px solid #84AFD3 - -.forums td, .forum td, .list-table td - padding: 5px - -.forums thead, .forum thead, .info-box thead, .post thead, .action-box thead, .list-table thead - background: #aad8ff none repeat-x scroll 0 - font-weight: bold - -.forums tbody td, .list-table tbody td - background: white - -.forum tfoot - background: #C1E2FE none repeat scroll 0 - input - background: #DBEEFD none repeat scroll 0 - border: 1px solid #48769D - font-size: 10pt - letter-spacing: -1px - margin: 2px - +.messages + .read + background: #85c7ff + + .unread + background: white .button display: inline-block @@ -186,18 +217,75 @@ img margin-bottom: 1.5em border: 1px #84afd3 solid background: #e1f1ff + margin: 0.5em auto + overflow: auto + -moz-border-radius: 5px - .actions - background: red + div, pre + padding: 5px + + pre + background: white + border: 1px solid black + -moz-border-radius: 5px + line-height: 0.75em + overflow: auto + text-align: left .user_info - width: 20% - float: left - background: red + width: 18% + + .body + float: right + clear: both + border-left: 1px dotted #84afd3 + width: 78% + min-height: 10.5em + + .details + border-bottom: 1px dotted #84afd3 + + .actions + float: right -.post_content - padding: .5em 0 - clear: both +form .post + padding: 5px + +#quick-reply + padding: 5px + border: 1px #84afd3 solid + margin: 0.5em auto + -moz-border-radius: 5px + +.messages + a + color: black + +ul#navlist + margin: 0px + padding: 0 + white-space: nowrap + li + display: inline + list-style-type: none + a + padding: 3px 10px + &:link, &:visited + color: #336699 + background-color: #b8dcfc + text-decoration: none + border: 1px solid #336699 + border-bottom: 0 + -moz-border-radius: 5px + &.selected + border: 2px solid #336699 + border-bottom: 0 + font-weight: bold + +#admin-page, #moderator-page + background: #b8dcfc + padding: 5px + border: 1px solid #336699 .clear display: block @@ -226,22 +314,6 @@ img text-align: left width: 90% -.CodeRay - padding: 0 - border-spacing: 0 - .line_numbers - width: 40px - background: #efefef - padding: 5px - text-align: center - border: 1px solid #84AFD3 - border-right: 0 - .code - background: white - border: 1px solid #84AFD3 - border-left: 0 - padding: 20px - .term font-family: Monaco, "Courier New", monospace font-weight: bold @@ -282,33 +354,6 @@ img &:hover background: #DBF8FF -ul#navlist - margin: 2px 2px 2px 0 - padding: 0 - white-space: nowrap - li - display: inline - list-style-type: none - a - padding: 3px 10px - &:link, &:visited - color: #336699 - background-color: #b8dcfc - text-decoration: none - border: 1px solid #336699 - border-bottom: 0 - &.selected - border: 2px solid #336699 - border-bottom: 0 - font-weight: bold - -#admin-page, #moderator-page - background: #b8dcfc - padding: 5px - border: 1px solid #336699 - -.list-table td - text-align: center .lalign text-align: left !important diff --git a/rerun.txt b/rerun.txt index e69de29b..8b137891 100644 --- a/rerun.txt +++ b/rerun.txt @@ -0,0 +1 @@ +