social_stream 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile +5 -1
- data/README.rdoc +2 -2
- data/app/controllers/api_controller.rb +2 -1
- data/app/controllers/contacts_controller.rb +25 -2
- data/app/controllers/groups_controller.rb +12 -2
- data/app/controllers/notifications_controller.rb +72 -0
- data/app/controllers/permissions_controller.rb +10 -0
- data/app/controllers/relation/customs_controller.rb +8 -0
- data/app/controllers/spheres_controller.rb +12 -0
- data/app/helpers/contacts_helper.rb +24 -0
- data/app/helpers/location_helper.rb +26 -12
- data/app/helpers/notifications_helper.rb +23 -0
- data/app/helpers/permissions_helper.rb +16 -0
- data/app/helpers/profiles_helper.rb +31 -0
- data/app/helpers/subjects_helper.rb +0 -83
- data/app/helpers/toolbar_helper.rb +83 -0
- data/app/models/activity.rb +43 -36
- data/app/models/actor.rb +71 -14
- data/app/models/contact.rb +121 -0
- data/app/models/group.rb +3 -3
- data/app/models/permission.rb +33 -2
- data/app/models/relation.rb +1 -1
- data/app/models/relation/custom.rb +12 -1
- data/app/models/relation/public.rb +1 -1
- data/app/models/sphere.rb +3 -1
- data/app/models/tie.rb +35 -18
- data/app/views/activities/_walls.html.erb +2 -2
- data/app/views/api/activity_atom_feed.atom.builder +38 -38
- data/app/views/avatars/index.html.erb +12 -40
- data/app/views/comments/_new.html.erb +9 -8
- data/app/views/contacts/_contact.html.erb +20 -0
- data/app/views/contacts/_edit.html.erb +76 -0
- data/app/views/contacts/_form.html.erb +72 -0
- data/app/views/contacts/_index.html.erb +1 -1
- data/app/views/{ties → contacts}/_pendings.html.erb +3 -3
- data/app/views/{ties → contacts}/_suggestions.html.erb +5 -5
- data/app/views/contacts/_suggestions_and_pendings.html.erb +6 -0
- data/app/views/contacts/edit.html.erb +5 -0
- data/app/views/contacts/index.html.erb +1 -1
- data/app/views/contacts/new.html.erb +5 -0
- data/app/views/conversations/_conversation.html.erb +1 -1
- data/app/views/conversations/_index.html.erb +0 -5
- data/app/views/conversations/_show.html.erb +1 -2
- data/app/views/conversations/index.html.erb +4 -0
- data/app/views/conversations/index.js.erb +1 -0
- data/app/views/frontpage/index.html.erb +2 -3
- data/app/views/groups/_index.html.erb +5 -1
- data/app/views/groups/_new.html.erb +4 -3
- data/app/views/groups/_sidebar_index.html.erb +3 -10
- data/app/views/groups/_sidebar_show.html.erb +1 -9
- data/app/views/groups/index.html.erb +6 -8
- data/app/views/groups/show.html.erb +11 -4
- data/app/views/home/_sidebar.html.erb +1 -15
- data/app/views/home/index.html.erb +3 -2
- data/app/views/layouts/_account.html.erb +1 -1
- data/app/views/layouts/_flash.html.erb +5 -0
- data/app/views/layouts/_footer.html.erb +5 -4
- data/app/views/layouts/_representation.html.erb +5 -12
- data/app/views/layouts/application.html.erb +23 -20
- data/app/views/layouts/frontpage.html.erb +22 -10
- data/app/views/location/_location.html.erb +1 -1
- data/app/views/messages/_new.html.erb +0 -2
- data/app/views/notification_mailer/new_notification_email.html.erb +21 -0
- data/app/views/notification_mailer/new_notification_email.text.erb +11 -0
- data/app/views/notifications/_index.html.erb +21 -0
- data/app/views/notifications/_notification.html.erb +47 -0
- data/app/views/notifications/_show.html.erb +3 -0
- data/app/views/notifications/activities/_follow_body.html.erb +2 -0
- data/app/views/notifications/activities/_follow_subject.html.erb +2 -0
- data/app/views/notifications/activities/_like_body.html.erb +5 -0
- data/app/views/notifications/activities/_like_object_body.html.erb +2 -0
- data/app/views/notifications/activities/_like_object_subject.html.erb +2 -0
- data/app/views/notifications/activities/_like_subject.html.erb +5 -0
- data/app/views/notifications/activities/_like_subject_body.html.erb +1 -0
- data/app/views/notifications/activities/_like_subject_subject.html.erb +2 -0
- data/app/views/notifications/activities/_make-friend_body.html.erb +3 -0
- data/app/views/notifications/activities/_make-friend_subject.html.erb +2 -0
- data/app/views/notifications/activities/_post_body.html.erb +2 -0
- data/app/views/notifications/activities/_post_subject.html.erb +1 -0
- data/app/views/notifications/activities/_update_body.html.erb +1 -0
- data/app/views/notifications/activities/_update_subject.html.erb +1 -0
- data/app/views/notifications/index.html.erb +19 -0
- data/app/views/notifications/index.js.erb +8 -0
- data/app/views/notifications/show.html.erb +5 -0
- data/app/views/permissions/_index.html.erb +39 -0
- data/app/views/permissions/index.js.erb +10 -0
- data/app/views/profiles/_contact.html.erb +81 -0
- data/app/views/profiles/_experience.html.erb +22 -0
- data/app/views/profiles/_personal.html.erb +74 -0
- data/app/views/profiles/_profile.html.erb +12 -181
- data/app/views/profiles/_tags.html.erb +22 -0
- data/app/views/profiles/edit.html.erb +0 -14
- data/app/views/profiles/show.html.erb +14 -0
- data/app/views/profiles/update.js.erb +2 -28
- data/app/views/relation/customs/_form.html.erb +29 -0
- data/app/views/relation/customs/_index.html.erb +30 -0
- data/app/views/relation/customs/_list.html.erb +36 -0
- data/app/views/relation/customs/create.js.erb +20 -0
- data/app/views/relation/customs/index.js.erb +2 -0
- data/app/views/relation/customs/update.js.erb +6 -0
- data/app/views/spheres/_form.html.erb +28 -0
- data/app/views/spheres/_jquery.erb +130 -0
- data/app/views/spheres/_list.html.erb +19 -0
- data/app/views/spheres/create.js.erb +20 -0
- data/app/views/spheres/index.html.erb +74 -0
- data/app/views/ties/_edit.html.erb +1 -33
- data/app/views/toolbar/_home.html.erb +9 -0
- data/app/views/{subjects/_toolbar_home_menu.html.erb → toolbar/_home_menu.html.erb} +1 -1
- data/app/views/{subjects/_toolbar_home_menu_options.html.erb → toolbar/_home_menu_options.html.erb} +7 -3
- data/app/views/{subjects/_toolbar_home_menu_options_subjects.html.erb → toolbar/_home_menu_options_subjects.html.erb} +0 -0
- data/app/views/{subjects/_toolbar_logo.html.erb → toolbar/_logo.html.erb} +1 -1
- data/app/views/{subjects/_toolbar_message_menu.html.erb → toolbar/_message_menu.html.erb} +0 -0
- data/app/views/toolbar/_notifications_menu.html.erb +3 -0
- data/app/views/{subjects/_toolbar_profile.html.erb → toolbar/_profile.html.erb} +2 -2
- data/app/views/toolbar/_profile_menu.html.erb +15 -0
- data/app/views/toolbar/_profile_menu_basic_options.html.erb +5 -0
- data/app/views/toolbar/_profile_menu_tie_options.html.erb +35 -0
- data/app/views/users/_index.html.erb +1 -1
- data/app/views/users/_sidebar_index.html.erb +1 -6
- data/app/views/users/index.html.erb +3 -3
- data/app/views/users/show.html.erb +12 -2
- data/config/locales/en.yml +106 -79
- data/config/routes.rb +19 -5
- data/lib/generators/social_stream/templates/initializer.rb +2 -2
- data/lib/generators/social_stream/templates/migration.rb +3 -1
- data/lib/generators/social_stream/templates/public/images/HTML5.png +0 -0
- data/lib/generators/social_stream/templates/public/images/HTML5_Semantics.png +0 -0
- data/lib/generators/social_stream/templates/public/images/HTML5_Styling.png +0 -0
- data/lib/generators/social_stream/templates/public/images/Jcrop.gif +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/btn_notification.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/btn_notification_delete.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/error.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/info.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/success.png +0 -0
- data/lib/generators/social_stream/templates/public/images/btn/warning.png +0 -0
- data/lib/generators/social_stream/templates/public/images/cancel.png +0 -0
- data/lib/generators/social_stream/templates/public/images/html5-badge-h-css3-semantics.png +0 -0
- data/lib/generators/social_stream/templates/public/images/icon_checkbox.png +0 -0
- data/lib/generators/social_stream/templates/public/images/logos/actor/remote_subject.png +0 -0
- data/lib/generators/social_stream/templates/public/images/logos/actor/remote_user.png +0 -0
- data/lib/generators/social_stream/templates/public/images/logos/representation/group.png +0 -0
- data/lib/generators/social_stream/templates/public/images/logos/representation/user.png +0 -0
- data/lib/generators/social_stream/templates/public/images/pbar-ani.gif +0 -0
- data/lib/generators/social_stream/templates/public/javascripts/jquery.fileupload-ui.js +259 -0
- data/lib/generators/social_stream/templates/public/javascripts/jquery.fileupload.js +475 -0
- data/lib/generators/social_stream/templates/public/javascripts/jquery.form.js +815 -0
- data/lib/generators/social_stream/templates/public/javascripts/jquery.ui.mouse.js +156 -0
- data/lib/generators/social_stream/templates/public/javascripts/jquery.ui.slider.js +684 -0
- data/lib/generators/social_stream/templates/public/javascripts/jquery.ui.widget.js +236 -0
- data/lib/generators/social_stream/templates/public/javascripts/ui.checkbox.js +309 -0
- data/lib/generators/social_stream/templates/public/stylesheets/default/base.css +13 -12
- data/lib/generators/social_stream/templates/public/stylesheets/default/contacts.css +88 -0
- data/lib/generators/social_stream/templates/public/stylesheets/default/footer.css +1 -0
- data/lib/generators/social_stream/templates/public/stylesheets/default/header.css +5 -3
- data/lib/generators/social_stream/templates/public/stylesheets/default/home.css +1 -1
- data/lib/generators/social_stream/templates/public/stylesheets/default/images/loading.gif +0 -0
- data/lib/generators/social_stream/templates/public/stylesheets/default/jquery.fileupload-ui.css +73 -0
- data/lib/generators/social_stream/templates/public/stylesheets/default/jquery.ui.slider.css +24 -0
- data/lib/generators/social_stream/templates/public/stylesheets/default/jquery.ui.slidertheme.css +32 -0
- data/lib/generators/social_stream/templates/public/stylesheets/default/messages.css +4 -0
- data/lib/generators/social_stream/templates/public/stylesheets/default/spheres.css +226 -0
- data/lib/generators/social_stream/templates/relations.yml +12 -12
- data/lib/social_stream.rb +2 -1
- data/lib/social_stream/ability.rb +5 -4
- data/lib/social_stream/controllers/helpers.rb +19 -0
- data/lib/social_stream/models/object.rb +3 -1
- data/lib/social_stream/models/subject.rb +19 -6
- data/lib/social_stream/rails.rb +23 -1
- data/lib/social_stream/test_helpers/controllers.rb +1 -1
- data/lib/social_stream/version.rb +1 -1
- data/lib/tasks/db/populate.rake +6 -9
- data/social_stream.gemspec +7 -4
- data/spec/controllers/comments_controller_spec.rb +1 -1
- data/spec/controllers/contacts_controller_spec.rb +23 -0
- data/spec/controllers/groups_controller_spec.rb +12 -1
- data/spec/controllers/permissions_controller_spec.rb +48 -0
- data/spec/controllers/posts_controller_spec.rb +4 -4
- data/spec/controllers/relation_customs_controller_spec.rb +130 -0
- data/spec/controllers/representations_spec.rb +74 -0
- data/spec/controllers/spheres_controller_spec.rb +108 -0
- data/spec/dummy/config/initializers/mailboxer.rb +8 -0
- data/spec/dummy/config/initializers/social_stream.rb +2 -2
- data/spec/dummy/config/relations.yml +12 -12
- data/spec/factories/relation_custom.rb +4 -0
- data/spec/factories/sphere.rb +5 -0
- data/spec/factories/tie.rb +4 -4
- data/spec/models/activity_spec.rb +58 -38
- data/spec/models/actor_spec.rb +1 -1
- data/spec/models/group_spec.rb +12 -0
- data/spec/models/like_spec.rb +68 -0
- data/spec/models/profile_spec.rb +2 -1
- data/spec/models/relation_custom_spec.rb +14 -0
- data/spec/models/tie_spec.rb +26 -2
- metadata +195 -94
- data/app/controllers/avatars_controller.rb +0 -51
- data/app/controllers/representations_controller.rb +0 -19
- data/app/controllers/ties_controller.rb +0 -22
- data/app/helpers/ties_helper.rb +0 -37
- data/app/models/avatar.rb +0 -91
- data/app/models/representation.rb +0 -35
- data/app/views/avatars/_form.html.erb +0 -12
- data/app/views/avatars/_precrop.html.erb +0 -66
- data/app/views/avatars/edit.html.erb +0 -6
- data/app/views/avatars/new.html.erb +0 -32
- data/app/views/avatars/show.html.erb +0 -5
- data/app/views/groups/_location.html.erb +0 -3
- data/app/views/groups/_logo.html.erb +0 -5
- data/app/views/home/_location.html.erb +0 -3
- data/app/views/subjects/_toolbar_home.html.erb +0 -9
- data/app/views/subjects/_toolbar_profile_menu.html.erb +0 -12
- data/app/views/subjects/_toolbar_profile_menu_basic_options.html.erb +0 -13
- data/app/views/subjects/_toolbar_profile_menu_tie_options.html.erb +0 -41
- data/app/views/ties/_new.html.erb +0 -64
- data/app/views/ties/_tie.html.erb +0 -23
- data/app/views/ties/new.html.erb +0 -1
- data/app/views/users/_location.html.erb +0 -3
- data/lib/generators/social_stream/templates/public/images/w3c_css.png +0 -0
- data/lib/generators/social_stream/templates/public/images/w3c_xhtml.png +0 -0
- data/lib/generators/social_stream/templates/public/javascripts/addContact.js +0 -100
- data/lib/generators/social_stream/templates/public/stylesheets/default/addContact.css +0 -29
- data/spec/controllers/representations_controller_spec.rb +0 -51
- data/spec/controllers/ties_controller_spec.rb +0 -19
- data/spec/models/representation_spec.rb +0 -16
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
<!-- HTML5 DOCTYPE -->
|
2
|
+
<!DOCTYPE html>
|
2
3
|
<html lang="en">
|
3
4
|
<head>
|
4
|
-
<meta
|
5
|
+
<meta charset="utf-8">
|
5
6
|
<title><%= yield(:title).empty? ? t('socialstream') : yield(:title)%></title>
|
6
|
-
<meta name="keywords" content="
|
7
|
-
<meta name="description" content= <%= yield(:description).empty? ?
|
8
|
-
|
7
|
+
<meta name="keywords" content="<%= t('profile.tags.default') %><%= yield(:keywords) %>" >
|
8
|
+
<meta name="description" content= "<%= yield(:description).empty? ? t('frontpage.main_title') : yield(:description) %>" >
|
9
9
|
<%= stylesheet_link_tag "base", "header","home","footer",
|
10
10
|
:media => "screen, projection" %>
|
11
11
|
<%= javascript_include_tag 'jquery.min', 'jquery-ui.min','rails', 'jquery.livequery', 'ui.dropdownchecklist'%>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<%= csrf_meta_tag %>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<script type="text/javascript"
|
20
|
+
<script type="text/javascript">
|
21
21
|
$(document).ready(function() {
|
22
22
|
<%= yield :javascript %>
|
23
23
|
})
|
@@ -25,31 +25,34 @@
|
|
25
25
|
</head>
|
26
26
|
<body>
|
27
27
|
<div id="wrapper">
|
28
|
-
|
28
|
+
<header><%= render :partial => "layouts/header" %></header>
|
29
29
|
<div id="wrapper_body">
|
30
|
-
<
|
30
|
+
<nav id="toolbar">
|
31
31
|
<div id="toolbarContent" class="block">
|
32
32
|
<div class="space_center">
|
33
33
|
</div>
|
34
34
|
<%= yield :toolbar %>
|
35
35
|
</div>
|
36
|
+
</nav>
|
37
|
+
<div id= "center_body">
|
38
|
+
<div id="map_location">
|
39
|
+
<%= yield :location %>
|
40
|
+
</div>
|
41
|
+
<div id="flash">
|
42
|
+
<%= render :partial => "layouts/flash", :locals => {:flash => flash} %>
|
43
|
+
</div>
|
44
|
+
<section id="content">
|
45
|
+
<%= yield %>
|
46
|
+
</section>
|
36
47
|
</div>
|
37
|
-
<
|
38
|
-
<% flash.each do |name, msg| %>
|
39
|
-
<div class="<%= name %>">
|
40
|
-
<%= msg %>
|
41
|
-
</div>
|
42
|
-
<% end %>
|
43
|
-
<%= yield %>
|
44
|
-
</div>
|
45
|
-
<div id="sidebar">
|
48
|
+
<aside id="sidebar">
|
46
49
|
<div id="sidebarContent">
|
47
|
-
<%=
|
50
|
+
<%= yield :sidebar %>
|
48
51
|
</div>
|
49
|
-
</
|
52
|
+
</aside>
|
50
53
|
<div class="space_center white"></div>
|
51
54
|
</div>
|
52
|
-
|
55
|
+
<footer><%= render :partial => "layouts/footer" %></footer>
|
53
56
|
</div>
|
54
57
|
</body>
|
55
58
|
</html>
|
@@ -1,8 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<!-- HTML5 DOCTYPE -->
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<html lang="en">
|
3
4
|
<head>
|
4
|
-
<meta
|
5
|
+
<meta charset="utf-8">
|
5
6
|
<title><%= yield(:title).empty? ? t('socialstream') : yield(:title)%></title>
|
7
|
+
<meta name="keywords" content="<%= yield(:keywords).empty? ? t('profile.tags.default') : yield(:keywords) %>" >
|
8
|
+
<meta name="description" content= "<%= yield(:description).empty? ? "Home" : yield(:description) %>" >
|
6
9
|
<%= stylesheet_link_tag "header","frontpage", "base", "footer",
|
7
10
|
:media => "screen, projection" %>
|
8
11
|
<%= javascript_include_tag 'jquery', 'jquery.livequery' %>
|
@@ -10,7 +13,7 @@
|
|
10
13
|
<% if protect_against_forgery? %>
|
11
14
|
<%= csrf_meta_tag %>
|
12
15
|
<% end %>
|
13
|
-
<script type="text/javascript"
|
16
|
+
<script type="text/javascript" >
|
14
17
|
$(document).ready(function() {
|
15
18
|
<%= yield :javascript%>
|
16
19
|
});
|
@@ -19,12 +22,21 @@
|
|
19
22
|
</head>
|
20
23
|
<body>
|
21
24
|
<div id="wrapper">
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
<header>
|
26
|
+
<%= render :partial => "frontpage/header" %>
|
27
|
+
</header>
|
28
|
+
<section>
|
29
|
+
<div id="flash">
|
30
|
+
<%= render :partial => "layouts/flash", :locals => {:flash => flash} %>
|
31
|
+
</div>
|
32
|
+
<div id="wrapper_body">
|
33
|
+
<%= yield %>
|
34
|
+
</div>
|
35
|
+
<%= render :partial => "frontpage/sponsor" %>
|
36
|
+
</section>
|
37
|
+
<footer>
|
38
|
+
<%= render :partial => "layouts/footer" %>
|
39
|
+
</footer>
|
28
40
|
</div>
|
29
41
|
</body>
|
30
42
|
</html>
|
@@ -1,10 +1,8 @@
|
|
1
|
-
|
2
1
|
<%= location(
|
3
2
|
link_to(image_tag("btn/new.png", :class => "menu_icon")+t('message.other'), conversations_path,:remote => true),
|
4
3
|
link_to(image_tag("btn/message_new.png", :class => "menu_icon")+ t('message.new'), new_message_path, :remote => true)
|
5
4
|
) %>
|
6
5
|
|
7
|
-
|
8
6
|
<br class="clearfloat" />
|
9
7
|
<div class="space_center"></div>
|
10
8
|
<div class="space_center"></div>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% self.class.send :include, NotificationsHelper %>
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
<h1>You have a new notification: <%= strip_tags decode_notification @notification.subject,@notification.object %></h1>
|
9
|
+
<p>
|
10
|
+
You have received a new notification:
|
11
|
+
</p>
|
12
|
+
<blockquote>
|
13
|
+
<p>
|
14
|
+
<%= raw decode_notification @notification.body,@notification.object %>
|
15
|
+
</p>
|
16
|
+
</blockquote>
|
17
|
+
<p>
|
18
|
+
Visit <%= link_to root_url,root_url %> and go to your notifications for more info.
|
19
|
+
</p>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% self.class.send :include, NotificationsHelper %>
|
2
|
+
You have a new notification: <%= strip_tags decode_notification @notification.subject,@notification.object %>
|
3
|
+
===============================================
|
4
|
+
|
5
|
+
You have received a new notification:
|
6
|
+
|
7
|
+
-----------------------------------------------
|
8
|
+
<%= strip_tags decode_notification @notification.body,@notification.object %>
|
9
|
+
-----------------------------------------------
|
10
|
+
|
11
|
+
Visit <%= root_url %> and go to your notifications for more info.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
<br class="clearfloat" />
|
3
|
+
<div class="space_center">
|
4
|
+
</div>
|
5
|
+
<div class="space_center"></div>
|
6
|
+
|
7
|
+
<h2><%= t('notification.other') %></h2>
|
8
|
+
|
9
|
+
<div class="read_all">
|
10
|
+
<%= link_to(t('notification.read_all'), update_all_notifications_path(:page => params[:page]),
|
11
|
+
:confirm => t('sure'),:method => :put, :remote => true) %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="conversations">
|
15
|
+
<% @notifications.each do |notification|%>
|
16
|
+
<% read_class = notification.is_unread?(@actor) ? 'unread' : '' %>
|
17
|
+
<%= render :partial => 'notification', :object => notification, :locals => {:read_class => read_class} %>
|
18
|
+
<% end %>
|
19
|
+
<%= will_paginate @notifications %>
|
20
|
+
</div>
|
21
|
+
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<%= div_for(notification, :class => read_class + ' conversation') do %>
|
2
|
+
|
3
|
+
<div class="notification">
|
4
|
+
</div>
|
5
|
+
<div class="sender_photo">
|
6
|
+
<%= link_to image_tag(current_subject.logo.url(:actor),
|
7
|
+
:title => current_subject.name, :alt => current_subject.name),
|
8
|
+
current_subject %>
|
9
|
+
</div>
|
10
|
+
<div class="content_left">
|
11
|
+
<div class="sender_name">
|
12
|
+
<%#= link_to conversation.last_sender.name, conversation.last_sender.subject %>
|
13
|
+
</div>
|
14
|
+
<div class="date">
|
15
|
+
<%= t('time.ago', :time => time_ago_in_words(notification.created_at)) %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<div class="content_right">
|
19
|
+
<div class="subject">
|
20
|
+
<%= raw decode_notification notification.subject,notification.object %>
|
21
|
+
</div>
|
22
|
+
<div class="briefing">
|
23
|
+
<%= raw decode_notification notification.body, notification.object %>
|
24
|
+
</div>
|
25
|
+
<div class="clearfloat">
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<div class="action">
|
29
|
+
<% if notification.is_unread?(current_subject) %>
|
30
|
+
<%= link_to(image_tag('btn/btn_notification_delete.png', :alt => t('notification.read'),
|
31
|
+
:title => t('notification.read')), notification_path(notification, :page => params[:page], :read => "Read"),
|
32
|
+
:method => :put, :remote => true) %>
|
33
|
+
<% else%>
|
34
|
+
<%= link_to(image_tag('btn/btn_notification_delete.png', :alt => t('notification.unread'),
|
35
|
+
:title => t('notification.unread')), notification_path(notification, :page => params[:page], :read => "Unread"),
|
36
|
+
:method => :put, :remote => true) %>
|
37
|
+
<% end%>
|
38
|
+
</div>
|
39
|
+
<div class="action">
|
40
|
+
<%= link_to(image_tag('btn/btn_notification_delete.png', :alt => "Delete", :title => "Delete"),
|
41
|
+
notification_path(notification, :page => params[:page]),
|
42
|
+
:confirm => 'Do you want to delete "' + notification.subject,
|
43
|
+
:method => :delete, :remote => true) %>
|
44
|
+
</div>
|
45
|
+
<div class="clearfloat">
|
46
|
+
</div>
|
47
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
%{sender} is now your fan.
|
@@ -0,0 +1 @@
|
|
1
|
+
%{sender.name} added a %{object.name} in your wall
|
@@ -0,0 +1 @@
|
|
1
|
+
%{sender} updated a %{object} in your wall.
|
@@ -0,0 +1 @@
|
|
1
|
+
%{sender.name} updated a %{object.name} in your wall
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% content_for :title do %>
|
2
|
+
<%= current_subject.name %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :headers do %>
|
6
|
+
<%= stylesheet_link_tag "messages.css", :media => "screen, projection" %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<% content_for :sidebar do %>
|
10
|
+
<%= render :partial => 'home/sidebar' %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= location(
|
14
|
+
link_to(image_tag("btn/btn_notification.png", :class => "menu_icon")+t('notification.other'), notifications_path,:remote => true)
|
15
|
+
) %>
|
16
|
+
|
17
|
+
<% toolbar %>
|
18
|
+
|
19
|
+
<%= render :partial => 'index' %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
$("#content").html("<%=escape_javascript(render :partial => 'index') %>");
|
2
|
+
|
3
|
+
<%= location(link_to(image_tag("btn/btn_notification.png", :class => "menu_icon")+t('notification.other'), notifications_path,:remote => true)) %>
|
4
|
+
|
5
|
+
$('.pagination a').attr('data-remote', 'true');
|
6
|
+
|
7
|
+
|
8
|
+
$("head").append($("<%= escape_javascript(stylesheet_link_tag "messages.css", :media => "screen, projection") %>"));
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<div id="columns_container">
|
2
|
+
|
3
|
+
<div id="permissions_list_block">
|
4
|
+
|
5
|
+
<p class="sectionTitle"><%= raw t('permission.of_relation.choose', :name => h(@relation.name)) %></p>
|
6
|
+
|
7
|
+
<div class="privacy_add_element"></div>
|
8
|
+
|
9
|
+
<table class="tableCheckBoxOptions">
|
10
|
+
<% default_permissions.each do |p| %>
|
11
|
+
<tr>
|
12
|
+
<td>
|
13
|
+
<div contain=<%= dom_id p %> class="checkboxPermissionOptionLeft">
|
14
|
+
<input id=<%= dom_id p %> optionOf="permissions" type="checkbox"/>
|
15
|
+
<label for=<%= dom_id p %>><%= p.description(:brief) %></label>
|
16
|
+
</div>
|
17
|
+
</td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</table>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div id="privacy_rules">
|
24
|
+
<p class="sectionTitle"><%= t 'privacy.rule.title' %></p>
|
25
|
+
|
26
|
+
<%= raw t('privacy.intro', :relation => h(@relation.name)) %>
|
27
|
+
|
28
|
+
<%= semantic_form_for @relation, :remote => true do |f| %>
|
29
|
+
<%= f.input :permissions, :as => :check_boxes, :collection => default_permissions.map{ |p| [p.description(:detailed, @relation), p.id] } %>
|
30
|
+
<%= f.submit t('button.save'), :class => 'button' %>
|
31
|
+
<% end %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<%= javascript_tag do %>
|
36
|
+
$(function() {
|
37
|
+
initPrivacyRules();
|
38
|
+
})
|
39
|
+
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
$('#permissions').html("<%= escape_javascript render(:partial => 'index') %>");
|
2
|
+
$('input[id^="permission"]').checkBox();
|
3
|
+
<% default_permissions.each do |p| %>
|
4
|
+
<% if @relation.permission_ids.include? p.id %>
|
5
|
+
$('input[id="permission_<%= p.id %>"]').checkBox('changeCheckStatus', true);
|
6
|
+
<% else %>
|
7
|
+
$('label[for="relation_custom_permission_ids_' + <%= p.id %> + '"]').parent().hide();
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
10
|
+
$('#permissions').show();
|
@@ -0,0 +1,81 @@
|
|
1
|
+
<div class="space_center"></div>
|
2
|
+
<div class="block" id="contact_info">
|
3
|
+
<div class="header">
|
4
|
+
<div class="header_text">
|
5
|
+
<%=t('profile.contact')%>
|
6
|
+
</div>
|
7
|
+
<% if is_owner? %>
|
8
|
+
<div class="header_icon_right">
|
9
|
+
<%= link_to (image_tag('/images/btn/edit.png')), :controller => :profiles , :action => :edit, :section => "contact_info"%>
|
10
|
+
</div>
|
11
|
+
<%end%>
|
12
|
+
</div>
|
13
|
+
<div class="content">
|
14
|
+
<% if !is_contact_empty?%>
|
15
|
+
<div class="sub-block" >
|
16
|
+
<% if @profile.phone? %>
|
17
|
+
<div class="row">
|
18
|
+
<div class="label">
|
19
|
+
<%=t('profile.phone')%>
|
20
|
+
</div>
|
21
|
+
<div class="field">
|
22
|
+
<%=h @profile.phone %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<%end%>
|
26
|
+
<% if @profile.mobile? %>
|
27
|
+
<div class="row">
|
28
|
+
<div class="label">
|
29
|
+
<%=t('profile.mobile')%>
|
30
|
+
</div>
|
31
|
+
<div class="field">
|
32
|
+
<%=h @profile.mobile %>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<%end%>
|
36
|
+
<% if @profile.fax? %>
|
37
|
+
<div class="row">
|
38
|
+
<div class="label">
|
39
|
+
<%=t('profile.fax')%>
|
40
|
+
</div>
|
41
|
+
<div class="field">
|
42
|
+
<%=h @profile.fax %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
<%end%>
|
46
|
+
<% if @profile.address? %>
|
47
|
+
<div class="row">
|
48
|
+
<div class="label">
|
49
|
+
<%=t('profile.address')%>
|
50
|
+
</div>
|
51
|
+
<div class="field">
|
52
|
+
<%=h @profile.address %>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
<%end%>
|
56
|
+
<% if @profile.website? %>
|
57
|
+
<div class="row">
|
58
|
+
<div class="label">
|
59
|
+
<%=t('profile.website')%>
|
60
|
+
</div>
|
61
|
+
<div class="field">
|
62
|
+
<a href="<%=h @profile.website %>"><%=h @profile.website %></a>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
<%end%>
|
66
|
+
<% if @profile.subject.email? %>
|
67
|
+
<div class="row">
|
68
|
+
<div class="label">
|
69
|
+
<%=t('profile.email')%>:
|
70
|
+
</div>
|
71
|
+
<div class="field">
|
72
|
+
<%=h @profile.subject.email %>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
<%end%>
|
76
|
+
</div>
|
77
|
+
<%elsif is_owner?%>
|
78
|
+
<%=t('profile.empty')%>
|
79
|
+
<%end%>
|
80
|
+
</div>
|
81
|
+
</div>
|