Permalink
Browse files

adding option for newsletter to UI

  • Loading branch information...
1 parent 9f2a507 commit 320e3bd4434694af3e7c3f4de1633ae90028a9c1 @3point2 3point2 committed Apr 8, 2012
Showing with 23 additions and 13 deletions.
  1. +2 −1 app/models/person.rb
  2. +17 −12 app/views/people/edit.html.erb
  3. +1 −0 config/locales/en.yml
  4. +1 −0 config/locales/es.yml
  5. +1 −0 config/locales/fr.yml
  6. +1 −0 config/locales/gr.yml
View
@@ -60,7 +60,8 @@ class Person < ActiveRecord::Base
:accept_agreement,
:language,
:openid_identifier,
- :sponsor
+ :sponsor,
+ :broadcast_emails
index do
name
@@ -6,7 +6,7 @@
<h3><%= t('people.edit.personal_details') %></h3>
<%= error_messages_for :person %>
-
+
<% form_for @person do |f| %>
<div class="form_row">
@@ -29,7 +29,7 @@
<span class="categoryAdd"><%= link_to t('people.edit.add_new_category'), new_category_path %></span>
<%= render :partial => "shared/select_categories", :locals => { :model_name => 'person' } %>
</div>
-
+
<div class="form_row full">
<label for="person_neighborhoods"><%= t('people.edit.neighborhood') %>
</label>
@@ -52,18 +52,18 @@
<label for="person_email"><%= t('people.edit.email') %></label>
<%= f.text_field :email, :maxlength => Person::MAX_EMAIL %>
</div>
-
+
<%- if global_prefs.email_notifications? -%>
-
+
<br />
-
+
<h3><%= t('people.edit.email_notification_preferences') %></h3>
-
+
<p>
- <%= t('people.edit.email_notification_note') %>
+ <%= t('people.edit.email_notification_note') %>
</p>
-
-
+
+
<div class="form_row">
<p>
<label for="message_notifications"
@@ -75,11 +75,16 @@
class="checkbox"><%= t('people.edit.wall_comments') %></label>
<%= f.check_box :wall_comment_notifications %>
</p>
+ <p>
+ <label for="broadcast_emails"
+ class="checkbox"><%= t('people.edit.broadcast_emails') %></label>
+ <%= f.check_box :broadcast_emails %>
+ </p>
</div>
<%- end -%>
-
+
<br />
-
+
<div class="form_row">
<%= f.submit t('button_update'), :class => "button" %>
<%= f.submit "Preview", :id => "preview", :class => "button" %>
@@ -90,7 +95,7 @@
<br />
<h3><%= t('people.edit.photos') %></h3>
-
+
<% if @person.photos.empty? %>
<%= image_tag @person.thumbnail %>
<% else %>
View
@@ -276,6 +276,7 @@ en:
messages: "Messages:"
wall_comments: "Wall comments:"
forum_posts: "Forum posts:"
+ broadcast_emails: "Newsletter:"
photos: "Photos"
add_a_photo: "Add a photo"
addresses: "Addresses"
View
@@ -276,6 +276,7 @@ es:
messages: "Mensajes:"
wall_comments: "Pared de comentarios:"
forum_posts: "Foro publicaciones:"
+ broadcast_emails: "Newsletter:"
photos: "Fotos"
add_a_photo: "Agrege una foto"
addresses: "Direcciones"
View
@@ -331,6 +331,7 @@ fr:
messages: "Messages"
wall_comments: "Commentaires"
forum_posts: "Les entrées du forum"
+ broadcast_emails: "Newsletter:"
photos: "Photos"
add_a_photo: "Ajoutez une photo"
adresses: "Les adresses"
View
@@ -390,6 +390,7 @@ gr:
messages: "Μηνύματα:"
wall_comments: "Σχόλια τοίχου:"
forum_posts: "Δημοσιεύσεις του φόρουμ:"
+ broadcast_emails: "Newsletter:"
photos: "Φωτογραφίες"
add_a_photo: "Προσθήκη φωτογραφίας"
addresses: "Διευθύνσεις"

0 comments on commit 320e3bd

Please sign in to comment.