public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
Added demo to preferences
Michael Hartl (author)
Tue May 20 10:49:10 -0700 2008
commit  6ed5b6c37897bd62ea5fdac47cb6b539697ee6e9
tree    acefb9cb432d96aa5d3c83a383fa2681055ca0d3
parent  ba2f3496e9aac914cb8045415dac330fc81f09ba
...
19
20
21
22
 
23
24
25
...
19
20
21
 
22
23
24
25
0
@@ -19,7 +19,7 @@
0
 class Preference < ActiveRecord::Base
0
   attr_accessible :app_name, :server_name, :domain, :smtp_server,
0
                   :email_notifications, :email_verifications, :analytics,
0
- :about
0
+ :about, :demo
0
 
0
   validates_presence_of :domain, :if => :using_email?
0
   validates_presence_of :smtp_server, :if => :using_email?
...
36
37
38
 
 
 
 
 
 
 
 
 
39
40
41
...
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
0
@@ -36,6 +36,15 @@
0
 
0
     <br />
0
 
0
+ <p>Display a note that the site is just a demonstration</p>
0
+ <div class="form_row">
0
+ <label for="demo"
0
+ class="checkbox">Demo site</label>
0
+ <%= f.check_box :demo %>
0
+ </div>
0
+
0
+ <br />
0
+
0
     <p>Verify email for new registrations using an activation code</p>
0
     <div class="form_row">
0
       <label for="email_verifications"
...
31
32
33
 
 
 
 
 
34
35
36
...
31
32
33
34
35
36
37
38
39
40
41
0
@@ -31,6 +31,11 @@
0
 </p>
0
 
0
 <p>
0
+ <b>Demo site:</b>
0
+ <%=h @preferences.demo %>
0
+</p>
0
+
0
+<p>
0
   <b>About text (nonblank text will lead to an 'about' link):</b>
0
 </p>
0
 <%= display @preferences.about %>
...
46
47
48
 
 
 
 
 
 
49
50
51
...
46
47
48
49
50
51
52
53
54
55
56
57
0
@@ -46,6 +46,12 @@
0
     
0
     <div id="wrap">
0
       <div id="content">
0
+ <%- if global_prefs.demo? -%>
0
+ <p class="error" style="font-weight: bold;">
0
+ This is a demonstration site.
0
+ Data may be modified or removed without warning.
0
+ </p>
0
+ <%- end -%>
0
         <% flash.each do |key, msg| %>
0
           <%= content_tag :p, msg, :class => "flash #{key}" %>
0
         <% end %>

Comments

    No one has commented yet.