myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2319] branches/event_logging/app/views: temporar


From: noreply
Subject: [myexperiment-hackers] [2319] branches/event_logging/app/views: temporarily switched event_logging back to the old home page
Date: Fri, 22 Jan 2010 11:37:49 -0500 (EST)

Revision
2319
Author
dgc
Date
2010-01-22 11:37:49 -0500 (Fri, 22 Jan 2010)

Log Message

temporarily switched event_logging back to the old home page

Modified Paths

Added Paths

Diff

Added: branches/event_logging/app/views/home/_old_announcements.rhtml (0 => 2319)


--- branches/event_logging/app/views/home/_old_announcements.rhtml	                        (rev 0)
+++ branches/event_logging/app/views/home/_old_announcements.rhtml	2010-01-22 16:37:49 UTC (rev 2319)
@@ -0,0 +1,33 @@
+<!-- Site Announcements -->
+<div class="box">
+	<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
+	<div class="title">
+		<%= feed_icon_tag "Site Announcements", formatted_announcements_path(:rss) %>
+		Site Announcements
+	</div>
+	<div class="content">
+		<% cache(:controller => 'home_cache', :action ="" 'announcements') do -%>
+			<% unless (announcements = Announcement.latest).empty? %>
+				<ul class="announcements">
+					<% announcements.each do |a| %>
+						<li>
+							<p class="box_standout" style="font-size: 93%; padding: 0.2em 0.5em; margin: 0.1em 0; font-weight: bold;">
+								<%= link_to h(a.title), announcement_url(a) %>
+							</p>
+							<p style="font-size: 77%; padding-left: 1.5em;"><b><%= datetime a.created_at, false %></b> by <b><%= name a.user %></b></p>
+						</li>
+					<% end %>
+				</ul>
+			<% else %>
+				<p class="none_text">None</p>
+			<% end %>
+		<% end %>
+		<p style="font-size: 77%; text-align: center;">
+			<% if admin? %>
+				[ <%= link_to "New", new_announcement_url %> ]
+			<% end %>
+			[ <%= link_to "See All", announcements_url %> ]
+		</p>
+	</div>
+	<b class="xbottom"><b class="xb5"></b><b class="xb6"></b><b class="xb7"></b><b class="xb1"></b></b>
+</div>

Added: branches/event_logging/app/views/home/_old_latest_comments.rhtml (0 => 2319)


--- branches/event_logging/app/views/home/_old_latest_comments.rhtml	                        (rev 0)
+++ branches/event_logging/app/views/home/_old_latest_comments.rhtml	2010-01-22 16:37:49 UTC (rev 2319)
@@ -0,0 +1,36 @@
+<!-- Latest Comments -->
+<% cache(:controller => 'home_cache', :action ="" 'latest_comments', :id => (logged_in? ? current_user.id : 0)) do -%> 
+<div class="box">
+	<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
+	<div class="title">
+		Latest Comments
+	</div>
+	<div class="content">
+		<% unless (comments = Comment.latest).empty? %>
+			<ul class="list">
+				<% comments.each do |c| %>
+					<% if Authorization.is_authorized?("show", nil, c.commentable, current_user) %>
+						<li>
+							<b><%= c_type = visible_name(c.commentable_type); icon(c.commentable_type.to_s, nil, nil, c_type, c_type) %>:</b>
+							<span><%= c.commentable_type == 'Network' ? title(c.commentable_id) : contributable(c.commentable_id, c.commentable_type) %></span>
+							<br/>
+							<span style="padding-left: 2em;">
+								<b><%= name c.user %></b> said:
+								(<%= timeago_fuzzy c.created_at %>)
+							</span>
+							<div class="box_standout" style="font-size: 85%; margin: 0.4em 2em; padding: 0.2em 0.5em;">
+								<%= truncate(strip_html(white_list(c.comment)), 150) %>
+								<p style="text-align: right;">[ <%= link_to "More", (c.commentable_type == 'Network' ? group_url(c.commentable) + "#comment_#{c.id}" : contributable_url(c.commentable_id, c.commentable_type) + "#comment_#{c.id}") %> ]</p>
+							</div>
+							<br/>
+						</li>
+					<% end %>
+				<% end %>
+			</ul>
+		<% else %>
+			<p class="none_text">None</p>
+		<% end %>
+	</div>
+	<b class="xbottom"><b class="xb5"></b><b class="xb6"></b><b class="xb7"></b><b class="xb1"></b></b>
+</div>
+<% end -%>

Added: branches/event_logging/app/views/home/_old_latest_groups.rhtml (0 => 2319)


--- branches/event_logging/app/views/home/_old_latest_groups.rhtml	                        (rev 0)
+++ branches/event_logging/app/views/home/_old_latest_groups.rhtml	2010-01-22 16:37:49 UTC (rev 2319)
@@ -0,0 +1,28 @@
+<!-- Latest Groups -->
+<% cache(:controller => 'home_cache', :action ="" 'latest_groups', :id => (logged_in? ? current_user.id : 0)) do -%> 
+	<div class="box">
+		<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
+		<div class="title">
+			Latest Groups
+		</div>
+		<div class="content">
+			<% unless (groups = Network.recently_created).empty? %>
+				<ul class="list" style="font-size: 85%;">
+					<% groups.each do |g| %>
+						<% if Authorization.is_authorized?("show", nil, g, current_user) %>
+							<li>
+								<%= icon('network', nil, nil, 'group icon', '') %>
+								<b><%= link_to g.title, group_path(g) %></b> 
+								by <b><%= contributor(g.user_id, 'User') %></b>
+								(<%= timeago_fuzzy g.created_at %>)
+							</li>
+						<% end %>
+					<% end %>
+				</ul>
+			<% else %>
+				<p class="none_text">None</p>
+			<% end %>
+		</div>
+		<b class="xbottom"><b class="xb5"></b><b class="xb6"></b><b class="xb7"></b><b class="xb1"></b></b>
+	</div>
+<% end -%>

Added: branches/event_logging/app/views/home/_old_latest_reviews.rhtml (0 => 2319)


--- branches/event_logging/app/views/home/_old_latest_reviews.rhtml	                        (rev 0)
+++ branches/event_logging/app/views/home/_old_latest_reviews.rhtml	2010-01-22 16:37:49 UTC (rev 2319)
@@ -0,0 +1,48 @@
+<!-- Latest Reviews -->
+<% cache(:controller => 'home_cache', :action ="" 'latest_reviews', :id => (logged_in? ? current_user.id : 0)) do -%> 
+	<div class="box">
+		<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
+		<div class="title">
+			Latest Reviews
+		</div>
+		<div class="content">
+			<% unless (reviews = Review.latest).empty? %>
+				<ul class="list">
+					<% reviews.each do |r| %>
+						<% if Authorization.is_authorized?("show", nil, r.reviewable, current_user) %>
+							<li>
+								<b><%= r_type = visible_name(r.reviewable_type); icon(r.reviewable_type.to_s, nil, nil, r_type, r_type) %>:</b>
+								<span><%= contributable(r.reviewable_id, r.reviewable_type) %></span>
+								<br/>
+								<span style="padding-left: 2em;">
+									Review by 
+									<b><%= name r.user %></b>:
+									(<%= timeago_fuzzy r.created_at %>)
+								</span>
+								<div class="box_standout" style="font-size: 85%; margin: 0.4em 2em; padding: 0.2em 0.5em;">
+									<p>
+										<b><%= link_to h(r.title), review_url(r.reviewable, r) -%></b>
+										<br/>
+										<span style="color: #666666;">
+											<% if (rating = r.associated_rating) -%>
+												Rated: <%= rating.rating -%> out of 5
+											<% else -%>
+												No rating given
+											<% end -%>
+										</span>
+									</p>
+									<%= truncate(strip_html(white_list(r.review)), 150) %>
+									<p style="text-align: right;">[ <%= link_to "More", review_url(r.reviewable, r) -%> ]</p>
+								</div>
+								<br/>
+							</li>
+						<% end %>
+					<% end %>
+				</ul>
+			<% else %>
+				<p class="none_text">None</p>
+			<% end %>
+		</div>
+		<b class="xbottom"><b class="xb5"></b><b class="xb6"></b><b class="xb7"></b><b class="xb1"></b></b>
+	</div>
+<% end -%>

Added: branches/event_logging/app/views/home/_old_latest_tags.rhtml (0 => 2319)


--- branches/event_logging/app/views/home/_old_latest_tags.rhtml	                        (rev 0)
+++ branches/event_logging/app/views/home/_old_latest_tags.rhtml	2010-01-22 16:37:49 UTC (rev 2319)
@@ -0,0 +1,31 @@
+<!-- Latest Tags -->
+<% cache(:controller => 'home_cache', :action ="" 'latest_tags', :id => (logged_in? ? current_user.id : 0)) do -%> 
+	<div class="box">
+		<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
+		<div class="title">
+			Latest Tags
+		</div>
+		<div class="content">
+			<% unless (taggings = Tagging.latest(20)).empty? %>
+				<ul class="list" style="font-size: 85%;">
+					<% taggings.each do |t| %>
+						<% if Authorization.is_authorized?("show", nil, t.taggable, current_user) %>
+							<li>
+								<span class="box_standout" style="padding: 0.1em 0.4em;">
+									<b><%= link_to_tag(t.tag) %></b>
+								</span>
+								&nbsp;&nbsp;on <b><%= c_type = visible_name(t.taggable_type); icon(t.taggable_type.to_s, nil, nil, c_type, '') %></b>
+								<%= t.taggable_type == 'Network' ? title(t.taggable_id) : contributable(t.taggable_id, t.taggable_type) %>
+								by <b><%= contributor(t.user_id, 'User') %></b>
+								(<%= timeago_fuzzy t.created_at %>)
+							</li>
+						<% end %>
+					<% end %>
+				</ul>
+			<% else %>
+				<p class="none_text">None</p>
+			<% end %>
+		</div>
+		<b class="xbottom"><b class="xb5"></b><b class="xb6"></b><b class="xb7"></b><b class="xb1"></b></b>
+	</div>
+<% end -%>

Added: branches/event_logging/app/views/home/_old_new_users.rhtml (0 => 2319)


--- branches/event_logging/app/views/home/_old_new_users.rhtml	                        (rev 0)
+++ branches/event_logging/app/views/home/_old_new_users.rhtml	2010-01-22 16:37:49 UTC (rev 2319)
@@ -0,0 +1,17 @@
+<!-- New Users -->
+<div class="box">
+	<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
+	<div class="title">
+		New Users
+	</div>
+	<div class="content">
+		<% unless (users = User.most_recent(6)).empty? %>
+			<div style="font-size: 93%;">
+				<%= render :partial => "users/hlist", :locals => { :collection => users, :size => 60 } %>
+			</div>
+		<% else %>
+			<p class="none_text">None</p>
+		<% end %>
+	</div>
+	<b class="xbottom"><b class="xb5"></b><b class="xb6"></b><b class="xb7"></b><b class="xb1"></b></b>
+</div>

Added: branches/event_logging/app/views/home/_old_news.rhtml (0 => 2319)


--- branches/event_logging/app/views/home/_old_news.rhtml	                        (rev 0)
+++ branches/event_logging/app/views/home/_old_news.rhtml	2010-01-22 16:37:49 UTC (rev 2319)
@@ -0,0 +1,17 @@
+<!-- News -->
+<div class="box">
+	<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
+	<div class="title">
+		My News
+	</div>
+	<div class="content">
+		<% if logged_in? %>
+			<%= render :partial => "layouts/news", :locals => { :collection => news(current_user, false) } %>
+		<% else %>
+			<p>
+				<b><%= link_to "Log in", new_session_url %> to view your News</b>
+			</p>
+		<% end %>
+	</div>
+	<b class="xbottom"><b class="xb5"></b><b class="xb6"></b><b class="xb7"></b><b class="xb1"></b></b>
+</div>

Added: branches/event_logging/app/views/home/_old_updated_items.rhtml (0 => 2319)


--- branches/event_logging/app/views/home/_old_updated_items.rhtml	                        (rev 0)
+++ branches/event_logging/app/views/home/_old_updated_items.rhtml	2010-01-22 16:37:49 UTC (rev 2319)
@@ -0,0 +1,26 @@
+<!-- Updated Items -->
+	<div class="box">
+		<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
+		<div class="title">
+			Updated Items
+		</div>
+		<div class="content">
+			<% unless (contributions = Contribution.last_updated(15)).empty? %>
+				<ul class="list">
+					<% contributions.each do |c| %>
+						<% if Authorization.is_authorized?("show", nil, c, current_user) %>
+							<li>
+								<b><%= c_type = visible_name(c.contributable_type); icon(c.contributable_type.to_s, nil, nil, c_type, c_type) %>:</b>
+								<%= c.contributable_type == 'Network' ? title(c.contributable_id) : contributable(c.contributable_id, c.contributable_type) %>
+								by <b><%= contributor(c.contributor_id, c.contributor_type) %></b>
+								(<%= timeago_fuzzy c.updated_at %>)
+							</li>
+						<% end %>
+					<% end %>
+				</ul>
+			<% else %>
+				<p class="none_text">None</p>
+			<% end %>
+		</div>
+		<b class="xbottom"><b class="xb5"></b><b class="xb6"></b><b class="xb7"></b><b class="xb1"></b></b>
+	</div>

Modified: branches/event_logging/app/views/home/index.rhtml (2318 => 2319)


--- branches/event_logging/app/views/home/index.rhtml	2010-01-20 13:44:13 UTC (rev 2318)
+++ branches/event_logging/app/views/home/index.rhtml	2010-01-22 16:37:49 UTC (rev 2319)
@@ -1,7 +1,25 @@
 <div id="home_container">
 	
 	<%= render :partial => 'stats' %>
+	<div class="left">
+		<%= render :partial => "old_announcements" %>
+		<%= render :partial => "old_latest_groups" %>
+		<%= render :partial => "old_latest_tags" %>
+	</div>
 	
+	<div class="right">
+		<%= render :partial => "old_news" %>
+		<%= render :partial => "old_updated_items" %>
+		<%= render :partial => "old_new_users" %>
+		<%= render :partial => "old_latest_reviews" %>
+		<%= render :partial => "old_latest_comments" %>
+	</div>
+	
+	<div class="clearer">&nbsp;</div>
+
+  <% if false %>
+	<%= render :partial => 'stats' %>
+	
 	<div id="tabsContainer" class="tabsContainer" style="margin-top: 2em;"></div>
 	
 	<% if logged_in? -%>
@@ -102,5 +120,6 @@
 			<div class="clearer">&nbsp;</div>
 		</div>
 	</div>
+  <% end %>
 	
 </div>

Added: branches/event_logging/app/views/layouts/_old_news.rhtml (0 => 2319)


--- branches/event_logging/app/views/layouts/_old_news.rhtml	                        (rev 0)
+++ branches/event_logging/app/views/layouts/_old_news.rhtml	2010-01-22 16:37:49 UTC (rev 2319)
@@ -0,0 +1,24 @@
+<% unless collection.empty? %>
+  <div class="news_feed_div">
+  <% collection.each do |news_day| %>
+    <p class="news_feed_day_title">
+			<% if news_day[0] > Time.now - 1.day %>
+        Today
+      <% elsif news_day[0] > Time.now - 2.days %>
+        Yesterday
+      <% else %>
+				<%= timeago_fuzzy news_day[0] %>
+      <% end %>
+    </p>
+    <ul class="news_feed_day">
+      <% news_day[1].each do |news_item| %>
+        <li class="news_feed_item">
+          <%= news_item %>
+        </li>
+      <% end %>
+    </ul>
+  <% end %>
+  </div>
+<% else %>
+  <p>No news</p>
+<% end %>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]