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
Got main prefs page working OK
Michael Hartl (author)
Wed Apr 23 15:34:55 -0700 2008
commit  b043a816c8ba337809d672594a4d6cb961112df0
tree    0b420ded65b2132800ae5327b5c2055dc8f32ccc
parent  e334650c4408c280040bf893fb65a3d0cea0972b
...
1
2
3
 
4
5
6
...
74
75
76
77
 
78
79
80
...
111
112
113
114
 
 
115
116
117
...
1
2
3
4
5
6
7
...
75
76
77
 
78
79
80
81
...
112
113
114
 
115
116
117
118
119
0
@@ -1,6 +1,7 @@
0
 class PeopleController < ApplicationController
0
   
0
   skip_before_filter :require_activation, :only => :verify
0
+ skip_before_filter :admin_warning, :only => :show
0
   before_filter :login_required, :only => [ :edit, :update ]
0
   before_filter :correct_user_required, :only => [ :edit, :update ]
0
   before_filter :setup
0
@@ -74,7 +75,7 @@ class PeopleController < ApplicationController
0
       redirect_to home_url
0
     else
0
       verification.person.deactivated = false; verification.person.save!
0
- flash[:success] = "Email verified. Your profile is active!"
0
+ flash[:success] = "Email verified. Your profile is active!"
0
       redirect_to verification.person
0
     end
0
   end
0
@@ -111,7 +112,8 @@ class PeopleController < ApplicationController
0
   
0
   def common_contacts
0
     @person = Person.find(params[:id])
0
- @common_connections = @person.common_connections_with(current_person,params[:page])
0
+ @common_connections = @person.common_connections_with(current_person,
0
+ params[:page])
0
     respond_to do |format|
0
       format.html
0
     end
...
25
26
27
28
 
29
30
31
...
25
26
27
 
28
29
30
31
0
@@ -25,7 +25,7 @@ module ApplicationHelper
0
       people = menu_element("People", admin_people_path)
0
       forums = menu_element(inflect("Forum", Forum.count),
0
                              admin_forums_path)
0
- preferences = menu_element("Preferences", admin_preferences_path)
0
+ preferences = menu_element("Prefs", admin_preferences_path)
0
       [home, people, forums, preferences]
0
     else
0
       [home, people, forum, resources]
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
0
@@ -1,39 +1,50 @@
0
-<h2>Editing preferences</h2>
0
-
0
-<%= error_messages_for :preferences %>
0
-
0
-<% form_for :preferences,
0
- :url => admin_preference_path(@preferences),
0
- :html => { :method => :put } do |f| %>
0
- <div class="form_row">
0
- <b>Email domain</b><br />
0
- <%= f.text_field :domain %>
0
- </div>
0
-
0
- <div class="form_row">
0
- <b>Smtp server</b><br />
0
- <%= f.text_field :smtp_server %>
0
- </div>
0
-
0
- <div class="form_row">
0
- <b>Email notifications</b><br />
0
- <%= f.check_box :email_notifications %>
0
- </div>
0
-
0
- <div class="form_row">
0
- <b>Email verifications</b><br />
0
- <%= f.check_box :email_verifications %>
0
- </div>
0
-
0
- <div class="form_row">
0
- <b>Analytics (will be inserted
0
- just before the <%= h("</body>") %> tag)</b><br />
0
- <%= f.text_area :analytics, :rows => 10 %>
0
- </div>
0
-
0
- <div class="form_row">
0
- <%= f.submit "Update", :class => "button" %>
0
- </div>
0
-<% end %>
0
-
0
-<%= link_to 'Back', admin_preferences_path %>
0
+<%- column_div :type => :primary do -%>
0
+ <h2>Editing preferences</h2>
0
+
0
+ <%= error_messages_for :preferences %>
0
+
0
+ <% form_for :preferences,
0
+ :url => admin_preference_path(@preferences),
0
+ :html => { :method => :put } do |f| %>
0
+ <div class="form_row">
0
+ <label for="domain">Email domain</label>
0
+ <%= f.text_field :domain %>
0
+ </div>
0
+
0
+ <div class="form_row">
0
+ <label for="smtp_server">Smtp server</label>
0
+ <%= f.text_field :smtp_server %>
0
+ </div>
0
+
0
+ <p>Send email when messages, connection requests, etc., are sent</p>
0
+ <div class="form_row">
0
+ <label for="email_notifications"
0
+ class="checkbox">Email notifications</label>
0
+ <%= f.check_box :email_notifications %>
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"
0
+ class="checkbox">Email verifications</label>
0
+ <%= f.check_box :email_verifications %>
0
+ </div>
0
+
0
+ <br />
0
+
0
+ <div class="form_row">
0
+ <label for="analytics">Analytics (will be inserted
0
+ just before the <%= h("</body>") %> tag)</label>
0
+ <%= f.text_area :analytics, :rows => 10 %>
0
+ </div>
0
+
0
+ <div class="form_row">
0
+ <%= f.submit "Update", :class => "button" %>
0
+ </div>
0
+ or <%= link_to "Cancel", admin_preferences_path %>
0
+ <% end %>
0
+
0
+ <%= link_to 'Back', admin_preferences_path %>
0
+<%- end -%>
0
\ No newline at end of file
...
 
 
1
2
3
...
1
2
3
4
5
0
@@ -1,3 +1,5 @@
0
+<h2>Global preferences</h2>
0
+
0
 <p>
0
   <b>Email domain:</b>
0
   <%=h @preferences.domain %>

Comments

    No one has commented yet.