Diff
Modified: branches/event_logging/app/helpers/application_helper.rb (1983 => 1984)
--- branches/event_logging/app/helpers/application_helper.rb 2008-11-18 14:45:01 UTC (rev 1983)
+++ branches/event_logging/app/helpers/application_helper.rb 2008-11-18 15:12:49 UTC (rev 1984)
@@ -1364,9 +1364,9 @@
:action ="" thing)
end
- def view_privileges_notice
+ def view_privileges_notice(extra_html="")
content_tag(:p,
- view_privileges_text,
+ extra_html + view_privileges_text,
:class => "box_currentuser_specific",
:style => "font-size: 93%; font-weight: bold; color: #333333; padding: 0.3em 0.5em;")
end
Modified: branches/event_logging/app/views/blobs/show.rhtml (1983 => 1984)
--- branches/event_logging/app/views/blobs/show.rhtml 2008-11-18 14:45:01 UTC (rev 1983)
+++ branches/event_logging/app/views/blobs/show.rhtml 2008-11-18 15:12:49 UTC (rev 1984)
@@ -142,9 +142,14 @@
<a name="news"></a>
<div class="tabContainer">
- <div class="tabTitle"><%= feed_icon_tag("\"#{contributable_name_from_instance(@blob)}\" File news", formatted_news_file_path(@blob, :rss)) -%> News</div>
+ <div class="tabTitle">News</div>
<div class="tabContent">
- <% benchmark "File page news feed" do %>
+ <p class="box_current_user_news_feed_info" style="margin-bottom: 0.5em;">
+ <%= feed_icon_tag("\"#{contributable_name_from_instance(@blob)}\" File news", formatted_news_file_path(@blob, :rss), "float: right;") -%>
+ This news feed provides latest events (including tags, comments and ratings) and status updates for this file.
+ </p>
+
+ <% benchmark "File page news feed" do %>
<% viewer_id = (logged_in? ? current_user.id : "public") -%>
<% cache_timeout({ :controller => 'news', :action ="" 'file', :id => @blob.id, :viewer => viewer_id } , NEWS_CACHE_TIMEOUT.seconds.from_now ) do -%>
<%= render :partial => "layouts/news", :locals => { :collection => news(@blob, true, Time.now, Time.now-DEFAULT_CONTRIBUTABLE_NEWS_TIMEFRAME, DEFAULT_CONTRIBUTABLE_NEWS_COUNT, current_user) } %>
Modified: branches/event_logging/app/views/networks/show.rhtml (1983 => 1984)
--- branches/event_logging/app/views/networks/show.rhtml 2008-11-18 14:45:01 UTC (rev 1983)
+++ branches/event_logging/app/views/networks/show.rhtml 2008-11-18 15:12:49 UTC (rev 1984)
@@ -148,9 +148,14 @@
<a name="news"></a>
<div class="tabContainer">
- <div class="tabTitle"><%= feed_icon_tag("\"address@hidden" Group public news", formatted_news_group_path(@network, :rss)) -%> News</div>
+ <div class="tabTitle">News</div>
<div class="tabContent">
- <% benchmark "Group page news feed" do %>
+ <p class="box_current_user_news_feed_info" style="margin-bottom: 0.5em;">
+ <%= feed_icon_tag("\"address@hidden" Group public news", formatted_news_group_path(@network, :rss), "float: right;") -%>
+ This feed provides latest events for this group - including new members, group announcements and items that were recently shared with the group.
+ </p>
+
+ <% benchmark "Group page news feed" do %>
<% viewer_id = (logged_in? ? current_user.id : "public") -%>
<% cache_timeout({ :controller => 'news', :action ="" 'network_profile', :id => @network.id, :viewer => viewer_id } , NEWS_CACHE_TIMEOUT.seconds.from_now ) do -%>
<%= render :partial => "layouts/news", :locals => { :collection => news(@network, true, Time.now, Time.now-DEFAULT_GROUP_NEWS_TIMEFRAME, DEFAULT_GROUP_NEWS_COUNT, current_user) } %>
@@ -161,10 +166,10 @@
<a name="shared_items"></a>
<div class="tabContainer">
- <div class="tabTitle"><%= feed_icon_tag("\"address@hidden" Group shared items", formatted_shared_items_group_path(@network, :rss)) -%> Shared Items (<%= @shared_items.length -%>)</div>
+ <div class="tabTitle">Shared Items (<%= @shared_items.length -%>)</div>
<div class="tabContent">
<% unless @shared_items.empty? %>
- <%= view_privileges_notice %>
+ <%= view_privileges_notice(feed_icon_tag("\"address@hidden" Group shared items", formatted_shared_items_group_path(@network, :rss), "float: right;")) %>
<%= render :partial => "contributions/table", :locals => { :collection => @shared_items } %>
<% else %>
<p class="none_text">No items have been shared with this Group yet.</p>
Modified: branches/event_logging/app/views/packs/show.rhtml (1983 => 1984)
--- branches/event_logging/app/views/packs/show.rhtml 2008-11-18 14:45:01 UTC (rev 1983)
+++ branches/event_logging/app/views/packs/show.rhtml 2008-11-18 15:12:49 UTC (rev 1984)
@@ -156,9 +156,14 @@
<a name="news"></a>
<div class="tabContainer">
- <div class="tabTitle"><%= feed_icon_tag("\"#{contributable_name_from_instance(@pack)}\" Pack news", formatted_news_pack_path(@pack, :rss)) -%> News</div>
+ <div class="tabTitle">News</div>
<div class="tabContent">
- <% benchmark "Pack page news feed" do %>
+ <p class="box_current_user_news_feed_info" style="margin-bottom: 0.5em;">
+ <%= feed_icon_tag("\"#{contributable_name_from_instance(@pack)}\" Pack news", formatted_news_pack_path(@pack, :rss), "float: right;") -%>
+ This news feed provides latest events (including tags, comments and ratings) and status updates for this pack.
+ </p>
+
+ <% benchmark "Pack page news feed" do %>
<% viewer_id = (logged_in? ? current_user.id : "public") -%>
<% cache_timeout({ :controller => 'news', :action ="" 'pack', :id => @pack.id, :viewer => viewer_id } , NEWS_CACHE_TIMEOUT.seconds.from_now ) do -%>
<%= render :partial => "layouts/news", :locals => { :collection => news(@pack, true, Time.now, Time.now-DEFAULT_CONTRIBUTABLE_NEWS_TIMEFRAME, DEFAULT_CONTRIBUTABLE_NEWS_COUNT, current_user) } %>
Modified: branches/event_logging/app/views/users/show.rhtml (1983 => 1984)
--- branches/event_logging/app/views/users/show.rhtml 2008-11-18 14:45:01 UTC (rev 1983)
+++ branches/event_logging/app/views/users/show.rhtml 2008-11-18 15:12:49 UTC (rev 1984)
@@ -81,6 +81,7 @@
<% end %>
<% else %>
<h1>
+ <%= feed_icon_tag("address@hidden's public news", formatted_news_user_path(@user, :rss), "float: right;") -%>
<%= if @user.profile then flag_icon(@user.profile.location_country, @user.profile.location) end %>
User: <%=h @user.name %>
<%= friend_badge(@user) %>
@@ -355,7 +356,26 @@
<% tabnav :user do %>
<% case @tab; when "News" %>
- <% benchmark "User profile page news feed" do %>
+ <div class="box_current_user_news_feed_info">
+ <% displayed_user = ((mine? @user) ? "you" : @user.name) -%>
+ <% displayed_pronoun = ((mine? @user) ? "your" : "their") -%>
+ <p>
+ <%= feed_icon_tag("address@hidden's public news", formatted_news_user_path(@user, :rss), "float: right; margin-left: 0.4em;") -%>
+ This is a public news feed, it shows all actions made by <%= displayed_user -%>,
+ <%= displayed_pronoun -%> friends and members of the groups where <%= displayed_user -%>
+ <%= displayed_user == "you" ? "are" : "is" -%> admin or member of. News about items
+ that are favourited or uploaded by <%= displayed_user -%> are also included.
+ </p>
+ <% if mine? @user -%>
+ <p>
+ Note: all your privacy settings are maintained - only authorised users will see
+ news entries containing private items.
+ </p>
+ <% end -%>
+ </div>
+ <br/>
+
+ <% benchmark "User profile page news feed" do %>
<% viewer_id = (logged_in? ? current_user.id : "public") -%>
<% cache_timeout({ :controller => 'news', :action ="" 'user_profile', :id => @user.id, :viewer => viewer_id } , NEWS_CACHE_TIMEOUT.seconds.from_now ) do -%>
<%= render :partial => "layouts/news", :locals => { :collection => news(@user, true, Time.now, Time.now-DEFAULT_USER_NEWS_TIMEFRAME, DEFAULT_USER_NEWS_COUNT, current_user) } %>
@@ -363,13 +383,22 @@
<% end %>
<% when "My Activity" %>
- <% benchmark "User profile 'My Activity' news feed" do %>
- <% viewer_id = (logged_in? ? current_user.id : "public") -%>
- <% # this is only visible to the owner of the profile, so only a single viewer ever exists -%>
- <% cache_timeout({ :controller => 'news', :action ="" 'user_activity', :id => @user.id } , NEWS_CACHE_TIMEOUT.seconds.from_now ) do -%>
- <%= render :partial => "layouts/news", :locals => { :collection => news(@user, true, Time.now, Time.now-DEFAULT_USER_NEWS_TIMEFRAME, DEFAULT_USER_NEWS_COUNT, current_user, true) } %>
- <% end %>
- <% end %>
+ <% # this is only visible to the logged in owner of the profile, but extra check is of no harm -%>
+ <% if mine? @user -%>
+ <p class="box_current_user_news_feed_info">
+ This news feed is only visible to you and contains the latest events initiated by yourself.
+ </p>
+
+ <% benchmark "User profile 'My Activity' news feed" do %>
+ <% viewer_id = (logged_in? ? current_user.id : "public") -%>
+ <% # this is only visible to the owner of the profile, so only a single viewer ever exists -%>
+ <% cache_timeout({ :controller => 'news', :action ="" 'user_activity', :id => @user.id } , NEWS_CACHE_TIMEOUT.seconds.from_now ) do -%>
+ <%= render :partial => "layouts/news", :locals => { :collection => news(@user, true, Time.now, Time.now-DEFAULT_USER_NEWS_TIMEFRAME, DEFAULT_USER_NEWS_COUNT, current_user, true) } %>
+ <% end %>
+ <% end %>
+ <% else -%>
+ You are not authorised to view this content.
+ <% end -%>
<% when "Friends" %>
Modified: branches/event_logging/app/views/workflows/show.rhtml (1983 => 1984)
--- branches/event_logging/app/views/workflows/show.rhtml 2008-11-18 14:45:01 UTC (rev 1983)
+++ branches/event_logging/app/views/workflows/show.rhtml 2008-11-18 15:12:49 UTC (rev 1984)
@@ -305,9 +305,14 @@
<a name="news"></a>
<div class="tabContainer">
- <div class="tabTitle"><%= feed_icon_tag("\"#{contributable_name_from_instance(@workflow)}\" Workflow news", formatted_news_workflow_path(@workflow, :rss)) -%> News</div>
+ <div class="tabTitle">News</div>
<div class="tabContent">
- <% benchmark "Workflow page news feed" do %>
+ <p class="box_current_user_news_feed_info" style="margin-bottom: 0.5em;">
+ <%= feed_icon_tag("\"#{contributable_name_from_instance(@workflow)}\" Workflow news", formatted_news_workflow_path(@workflow, :rss), "float: right;") -%>
+ This news feed provides latest events (including tags, comments and ratings) and status updates for this workflow.
+ </p>
+
+ <% benchmark "Workflow page news feed" do %>
<% viewer_id = (logged_in? ? current_user.id : "public") -%>
<% cache_timeout({ :controller => 'news', :action ="" 'workflow', :id => @workflow.id, :viewer => viewer_id } , NEWS_CACHE_TIMEOUT.seconds.from_now ) do -%>
<%= render :partial => "layouts/news", :locals => { :collection => news(@workflow, true, Time.now, Time.now-DEFAULT_CONTRIBUTABLE_NEWS_TIMEFRAME, DEFAULT_CONTRIBUTABLE_NEWS_COUNT, current_user) } %>
Modified: branches/event_logging/public/stylesheets/styles.css (1983 => 1984)
--- branches/event_logging/public/stylesheets/styles.css 2008-11-18 14:45:01 UTC (rev 1983)
+++ branches/event_logging/public/stylesheets/styles.css 2008-11-18 15:12:49 UTC (rev 1984)
@@ -1533,6 +1533,19 @@
line-height: 1.4;
}
+.box_current_user_news_feed_info {
+ border: 1px solid #99CCFF;
+ background-color: #EEF6FF;
+ padding: 0.3em 0.5em;
+ font-size: 93%;
+ font-weight: bold;
+ color: #333333;
+}
+
+.box_current_user_news_feed_info * {
+ vertical-align: middle;
+}
+
.none_text {
font-style: italic;
color: #666666;