public
Fork of trevorturk/el-dorado
Description: Localized version of El Dorado using Gibberish. Dutch language included.
Homepage: http://almosteffortless.com/eldorado/
Clone URL: git://github.com/jxl/el-dorado.git
Search Repo:
Revert "localized login message, no longer a setting"
jxl (author)
Sun May 04 09:32:58 -0700 2008
commit  8805875551925b2ddd9eab8fbab041980472a520
tree    1a70b2a47b37777b53d0a1ef8c7f79b5325294a9
parent  2fc30ca3b478b4b00ce85ca6d852c4a2bdc978da
...
12
13
14
 
15
16
17
18
...
26
27
28
 
29
30
31
32
33
34
35
 
36
37
38
...
12
13
14
15
16
17
18
19
...
27
28
29
30
31
32
33
34
35
36
 
37
38
39
40
0
@@ -12,6 +12,7 @@
0
 # favicon :string(255)
0
 # time_zone :string(255) default("UTC")
0
 # private :boolean(1)
0
+# login_message :string(255) default("You are not logged in")
0
 #
0
 
0
 class Setting < ActiveRecord::Base
0
0
@@ -26,13 +27,14 @@
0
   TITLE = 'El Dorado'
0
   TAGLINE = 'A full-stack community web application written in Ruby/Rails'
0
   FOOTER = '<p style="text-align:right;margin:0;">Powered by <a href="http://almosteffortless.com/eldorado/">El Dorado</a> | <a href="http://almosteffortless.com">&aelig;</a></p>'
0
+ LOGIN_MESSAGE = 'You are not logged in'
0
   
0
   def theme
0
     read_attribute(:theme) # not sure why this is needed, but tests are failing without it
0
   end
0
   
0
   def self.defaults
0
- Setting.new(:title => TITLE, :tagline => TAGLINE, :footer => FOOTER).save
0
+ Setting.new(:title => TITLE, :tagline => TAGLINE, :footer => FOOTER, :login_message => LOGIN_MESSAGE).save
0
   end
0
   
0
   def to_s
...
7
8
9
 
 
10
11
12
...
7
8
9
10
11
12
13
14
0
@@ -7,6 +7,8 @@
0
       <p><%= f.text_field :title, :style => "width:66%" %></p>
0
       <p class="label"><label for="setting_tagline"><%= 'Tagline'[:tagline] %></label></p>
0
       <p><%= f.text_field :tagline, :style => "width:66%" %></p>
0
+ <p class="label"><label for="setting_login_message"><%= 'Login Message'[:login_message] %></label></p>
0
+ <p><%= f.text_field :login_message, :style => "width:66%;" %></p>
0
       <p class="label"><label for="setting_announcement"><%= 'Announcement'[:announcement] %></label></p>
0
       <p><%= f.text_area :announcement, :rows => '3', :style => "width:66%;" %></p>
0
       <p class="label"><label for="setting_footer"><%= 'Footer'[:footer] %></label></p>
...
4
5
6
7
 
8
9
10
...
4
5
6
 
7
8
9
10
0
@@ -4,7 +4,7 @@
0
       <%= 'Logged in as'[:logged_in_as] %> <b><%= link_to h(current_user.login), current_user %></b> |
0
       <%= 'Last visit'[:last_visit_was] %> <%= time_ago_or_time_stamp(session[:online_at]) %>
0
     <% else %>
0
- <%= "You are not logged in."[:not_logged_in] %>
0
+ <%= @settings.login_message %>
0
     <% end %>
0
   </p>
0
   <p class="nav-right">
...
1
2
3
4
5
6
7
8
9
...
 
 
 
 
 
 
 
 
 
0
@@ -1,10 +1 @@
0
-class RemoveLoginMessageFromSettings < ActiveRecord::Migration
0
- def self.up
0
- remove_column :settings, :login_message
0
- end
0
-
0
- def self.down
0
- add_column :settings, :login_message
0
- end
0
-end
...
21
22
23
 
24
25
26
27
28
 
...
21
22
23
24
25
26
27
28
29
30
0
@@ -21,9 +21,11 @@
0
   title: 'El Dorado'
0
   time_zone: 'US/Central'
0
   private: false
0
+ login_message: 'You are not logged in'
0
 private:
0
   id: 2
0
   title: 'El Dorado'
0
   time_zone: 'US/Central'
0
   private: true
0
+ login_message: 'You are not logged in'

Comments

    No one has commented yet.