Added some localization

This commit is contained in:
2013-01-20 10:16:50 -05:00
parent a9a4cd892f
commit edb1ea204f
8 changed files with 220 additions and 15 deletions

View File

@@ -10,7 +10,7 @@ class Ability
can :read, Forum, :state => true, :category => { :state => true }
can :read, Topic, :forum => { :state => true, :category => { :state => true } }
can :read, Post, :topic => { :forum => { :state => true, :category => { :state => true } } }
can :update, Post, :user_id => user.id, :topic => { :locked => false }
can :destroy, [Topic,Post], :user_id => user.id, :topic => { :locked => false }

View File

@@ -16,6 +16,6 @@ class User < ActiveRecord::Base
has_many :posts, :dependent => :destroy
def admin?
true if self.username == 'admin'
self.is_admin
end
end

View File

@@ -1,6 +1,7 @@
<div class="module" style="padding:15px 25px 0px 25px;">
<div style="float:left; width:50%; height:330px; padding-right:10px;">
<h1>Welcome to Horses</h1>
<h1><%= t :welcome_header%></h1>
<p><%= t :welcome_msg %></p>
<%= devise_error_messages! %>
</div>
<div style="float:right; width:45%; padding-left:30px; border-left:1px solid #e2e2e2;">

View File

@@ -19,7 +19,8 @@
<div class="module" style="padding:15px 25px 0px 25px;">
<div style="float:left; width:50%; height:210px; padding-right:10px;">
<h1>Welcome to Horses</h1>
<h1><%= t :welcome_header %></h1>
<p><%= t :welcome_msg %></p>
</div>
<div style="float:right; width:45%; height:195px; padding-left:30px; border-left:1px solid #e2e2e2;">
<%= form_for("user", :url => user_session_path) do |f| %>

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title><%= content_for?(:title) ? yield(:title) : "Horses" %></title>
<title><%= content_for?(:title) ? yield(:title) : (t :name) %></title>
<%= stylesheet_link_tag "application", "forum-monster" %>
<%= csrf_meta_tag %>
<%= yield(:head) %>
@@ -9,9 +9,9 @@
<body>
<div id="header">
<div id="logo">
<%= image_tag "rails.png" %>
<h1>Horses</h1>
A forum about Horses
<%= image_tag "rails.png" %>
<h1><%= t :name %></h1>
<%= t :description %>
<div class="clear"></div>
</div>
<div id="menu_wrapper">