Diff
Modified: trunk/app/helpers/application_helper.rb (3523 => 3524)
--- trunk/app/helpers/application_helper.rb 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/helpers/application_helper.rb 2013-05-01 15:03:41 UTC (rev 3524)
@@ -109,7 +109,7 @@
return link_to(h(title), network_url(network))
end
- def avatar(user_id, size=200, url=""
+ def avatar(user_id, size=200, url="" annotation = nil, image_options = {})
if user_id.kind_of? Fixnum
user = User.find(:first, :select => "id, name", :conditions => ["id = ?", user_id])
return nil unless user
@@ -119,17 +119,18 @@
return nil
end
- if user.avatar?
- img = image_tag avatar_url(user.profile.picture_id, size), :title => h(user.name), :class => 'framed'
- else
- img = null_avatar(size, h(user.name))
- end
-
+ img = image_tag user.avatar? ? avatar_url(user.profile.picture_id, size) : "avatar.png",
+ {:title => h(user.name), :class => 'framed', :size => "#{size}x#{size}"}.merge(image_options)
+
unless url
url = ""
end
+
+ if annotation
+ img = img + " #{annotation}"
+ end
- return link_to(img, url)
+ return link_to(img , url)
end
def avatar_url(picture_id, size=200)
@@ -163,59 +164,36 @@
if !text
text = "Inbox"
end
-
+
+ opts = nil
unless (length = user.messages_unread.length) == 0
- text = "<b>" + text + " (#{length})</b>"
+ text = "#{text} (#{length})"
+ opts = {:style => "font-weight: bold"}
end
- inbox = icon('message', messages_path, nil, nil, text)
+ inbox = icon('message', messages_path, nil, opts, text)
return inbox
end
- def memberships_link(user_id, text=nil)
- if user_id.kind_of? Fixnum
- user = User.find(:first, :select => "id", :conditions => ["id = ?", user_id])
- return nil unless user
- elsif user_id.kind_of? User
- user = user_id
- else
- return nil
- end
-
- if !text
- text = "Memberships"
- end
-
+ def memberships_link(user, text="My Memberships")
+ opts = nil
unless (length = user.networks_membership_requests_pending.length + user.memberships_invited.length) == 0
- text = "<b>" + text + " (#{length})</b>"
+ text = "#{text} (#{length})"
+ opts = {:style => "font-weight: bold"}
end
-
- mships = icon('membership', user_memberships_path(user), nil, nil, text)
-
- return mships
-
+
+ icon('membership', user_memberships_path(user), nil, opts, text)
end
- def friendships_pending_link(user_id)
- if user_id.kind_of? Fixnum
- user = User.find(:first, :select => "id", :conditions => ["id = ?", user_id])
- return nil unless user
- elsif user_id.kind_of? User
- user = user_id
- else
- return nil
- end
-
- fships = icon('friendship', nil, nil, nil, nil) + " Friendships"
-
+ def friendships_pending_link(user, text = "My Friendships")
+ opts = nil
unless (length = user.friendships_pending.length) == 0
- rtn = "<b>" + fships + " (#{length})</b>"
- else
- rtn = fships
+ text = "#{text} (#{length})"
+ opts = {:style => "font-weight: bold"}
end
-
- return link_to(rtn, user_friendships_path(user))
+
+ icon('friendship', user_friendships_path(user), nil, opts, text)
end
def request_membership_link(user_id, network_id)
@@ -686,7 +664,7 @@
return "famfamfam_silk/page_world.png"
when "workflow"
return "redmond_studio/applications_16.png"
- when "policy"
+ when "policy", "admin"
return "famfamfam_silk/key.png"
when "logout"
return "famfamfam_silk/door_out.png"
@@ -760,6 +738,8 @@
return "famfamfam_silk/key_go.png"
when "content"
return "famfamfam_silk/application_side_list.png"
+ when "contributions"
+ return "famfamfam_silk/page_white_stack.png"
else
return Conf.label_icons[method.to_s] if Conf.label_icons[method.to_s]
end
Modified: trunk/app/views/gadgets/_new_object.rhtml (3523 => 3524)
--- trunk/app/views/gadgets/_new_object.rhtml 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/gadgets/_new_object.rhtml 2013-05-01 15:03:41 UTC (rev 3524)
@@ -1,35 +1,22 @@
<script type="text/_javascript_">
function redirectToNew() {
var klass = $("new_object_type").value;
-<% Conf.new_menu.each do |item| %>
+ <% Conf.new_menu.each do |item| %>
if (klass == "<%= item['label'] %>")
location.href = "" item['link'] %>";
-<% end %>
+ <% end %>
}
</script>
-<div class="myexperiment_gadget">
- <div class="header">
- <p>
- New/Upload
- </p>
- </div>
-
- <div class="contents">
- <div id="new_object_form">
- <form return false;">
- <p>
- <select id="new_object_type">
- <% Conf.new_menu.each do |item| %>
- <% next if item['condition'] and !eval(item['condition']) %>
- <option value="<%= item['label'] %>" <%= "selected" if item['controller'] && controller.controller_name.match(item['controller']) %>><%= item['label'] %></option>
- <% end %>
- </select>
- <%= submit_tag "GO" %>
- </p>
- </form>
- </div>
- </div>
-
+<div id="new_object">
+ <form return false;">
+ <select id="new_object_type">
+ <% Conf.new_menu.each do |item| %>
+ <% next if item['condition'] and !eval(item['condition']) %>
+ <option value="<%= item['label'] %>" <%= "selected" if item['controller'] && controller.controller_name.match(item['controller']) %>>New <%= item['label'] %></option>
+ <% end %>
+ </select>
+ <%= submit_tag "GO" %>
+ </form>
</div>
Modified: trunk/app/views/gadgets/_user_favourites.rhtml (3523 => 3524)
--- trunk/app/views/gadgets/_user_favourites.rhtml 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/gadgets/_user_favourites.rhtml 2013-05-01 15:03:41 UTC (rev 3524)
@@ -1,42 +1,19 @@
<% gadget_characters_limit ||= 20 -%>
<% bookmarkables = current_user.bookmarks.collect {|b| b.bookmarkable} %>
-<div class="myexperiment_gadget">
+<div class="header"><%= icon 'favourite', nil, nil, nil, 'Favourites'-%></div>
- <div class="header">
- <p>
- My Favourites<br />
- <small>
- <%= link_to(pluralize(current_user.bookmarks.length, "favourite"), currentusers_things_url('favourites')) %>
- </small>
- </p>
- </div>
-
- <div id="myexp_assetmanager_gadget_contents" class="contents">
- <div class="content">
- <% # NOTE: this assumes that only contributables are bookmarkable -%>
- <% aggregate_contributables(bookmarkables).each do |klass, array| %>
- <div>
- <div class="title">
- <%= link_to visible_name(klass.humanize).pluralize,
- currentusers_things_url('favourites') %>
- </div>
- <div class="content">
- <ul class="gadget_list">
- <% array.each do |instance| %>
- <li>
- <%= icon klass.downcase, nil, nil, nil, "" %>
- <%= link_to contributable_name(instance.id, klass, gadget_characters_limit),
- contributable_url(instance.id, klass),
- :alt => contributable_name(instance.id, klass),
- :title => tooltip_title_attrib(contributable_name(instance.id, klass)) %>
- </li>
- <% end %>
- </ul>
- </div>
- </div>
- <% end %>
- </div>
- </div>
-
-</div>
+<ul class="gadget_list">
+ <% bookmarkables.each do |instance| %>
+ <li>
+ <%= icon instance.class.name.downcase,
+ contributable_url(instance.id, instance.class.name),
+ nil, nil, contributable_name(instance.id, instance.class.name, gadget_characters_limit) %>
+ </li>
+ <% end %>
+ <% if bookmarkables.empty? %>
+ <li>
+ <span class="none_text">You have no favourites</span>
+ </li>
+ <% end %>
+</ul>
Modified: trunk/app/views/gadgets/_user_monitor.rhtml (3523 => 3524)
--- trunk/app/views/gadgets/_user_monitor.rhtml 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/gadgets/_user_monitor.rhtml 2013-05-01 15:03:41 UTC (rev 3524)
@@ -1,116 +1,45 @@
-<% if logged_in? %>
-
-<% trunc_length = 22 -%>
-
-<div class="myexperiment_gadget">
-
- <div class="header">
- <center><%= render :partial => "users/avatar", :locals => { :user => current_user, :size => 60 } %></center>
- </div>
-
- <div id="myexp_usermonitor_gadget_contents" class="contents">
- <ul class="gadget_list">
- <li>
- <%= icon "profile", user_url(current_user), nil, nil, " My Profile" %>
- <span style="color: #666666; margin-left: 0.5em;">
- <small>[ <%= link_to "edit", edit_user_profile_path(current_user) -%> ]</small>
- </span>
- </li>
- <li><%= messages_link(current_user, "My Messages") %></li>
- <li><%= memberships_link(current_user, "My Memberships") %></li>
- <li><%= icon "history", user_userhistory_url(current_user), nil, nil, "My History" %></li>
- <li><%= icon "news", home_url, nil, nil, "My News" %></li>
- </ul>
-
- <% if admin? %>
- <hr/>
- <ul class="gadget_list">
- <li><%= icon "announcement", announcements_url, nil, nil, "Manage Announcements" %></li>
- <li><%= icon "usercheck", "/users/check", nil, nil, "Manage Users" %></li>
- </ul>
- <% end %>
-
- <% unless current_user.messages_unread.empty? %>
- <hr/>
- <div>
- <div class="title">
- <%= pluralize(current_user.messages_unread.length, "new message") %>
- </div>
- <div class="content">
- <ul class="gadget_list">
- <% current_user.messages_unread.each do |message| %>
- <li>
- <%= icon "message", message_path(message), nil, nil, "" %>
- <b><%= link_to truncate(h(message.subject), :length => trunc_length), message_path(message), :title => tooltip_title_attrib(h(message.subject)) -%></b>
- </li>
- <% end %>
- </ul>
- </div>
- </div>
- <% end %>
-
- <% unless current_user.friendships_pending.empty? %>
- <hr/>
- <div>
- <div class="title">
- <%= pluralize(current_user.friendships_pending.length, "new friendship request") %>
- </div>
- <div class="content">
- <ul class="gadget_list">
- <% current_user.friendships_pending.each do |friendship| %>
- <li>
- <%= icon "user", user_friendship_path(current_user, friendship), nil, nil, "" %>
- <b><%= link_to truncate(h(friendship.user.name), :length => trunc_length), user_friendship_path(current_user, friendship), :title => tooltip_title_attrib(h(friendship.user.name)) -%></b>
- </li>
- <% end %>
- </ul>
- </div>
- </div>
- <% end %>
-
- <% unless (membership_invites = current_user.memberships_invited).empty? %>
- <hr/>
- <div>
- <div class="title">
- <%= info_icon_with_tooltip("You have been invited to join groups") %>
- <%= pluralize(membership_invites.length, "new group invite") %>
- </div>
- <div class="content">
- <ul class="gadget_list">
- <% membership_invites.each do |membership| %>
- <li>
- <%= icon "membership", user_membership_path(membership.user, membership), nil, nil, "" -%>
- <b><%= link_to truncate("From #{h(membership.network.owner.name)}", :length => trunc_length), user_membership_path(membership.user, membership), :title => tooltip_title_attrib("From #{h(membership.network.owner.name)}") -%></b>
- <span style="margin-left: 20px; display: block;"><small>(for Group: <%= title membership.network_id %>)</small></span>
- </li>
- <% end %>
- </ul>
- </div>
- </div>
- <% end %>
-
- <% unless (membership_requests = current_user.networks_membership_requests_pending(true)).empty? %>
- <hr/>
- <div>
- <div class="title">
- <%= info_icon_with_tooltip("Users are requesting to join your groups") %>
- <%= pluralize(membership_requests.length, "new group request") %>
- </div>
- <div class="content">
- <ul class="gadget_list">
- <% membership_requests.each do |membership| %>
- <li>
- <%= icon "membership", user_membership_path(membership.user, membership), nil, nil, "" -%>
- <b><%= link_to truncate("From #{h(membership.user.name)}", :length => trunc_length), user_membership_path(membership.user, membership), :title => tooltip_title_attrib("From #{h(membership.user.name)}") -%></b>
- <span style="margin-left: 20px; display: block;"><small>(for Group: <%= title membership.network_id %>)</small></span>
- </li>
- <% end %>
- </ul>
- </div>
- </div>
- <% end %>
- </div>
-
+<a id="user_menu_button" false;">
+ <%= image_tag(current_user.avatar? ? avatar_url(current_user.profile.picture_id, 24) : "avatar.png",
+ :size => '24x24', :style => 'vertical-align: middle') %>
+ <%= current_user.name -%>
+ <% if (alerts = current_user.messages_unread.size +
+ current_user.friendships_pending.length +
+ current_user.networks_membership_requests_pending.length +
+ current_user.memberships_invited.length) > 0 %>
+ <span class="unread_message_count">(<%= alerts -%>)</span>
+ <% end %>
+ <%= image_tag("expand_arrow.png", :id => 'expand_user_menu', :style=> 'vertical-align: middle') -%>
+ <%= image_tag("collapse_arrow.png", :id => 'collapse_user_menu', :style=> 'vertical-align: middle; display: none') -%></a>
+<div id="user_menu" style="display: none;">
+ <div class="header"><%= icon 'network', nil, nil, nil, 'Social'-%></div>
+ <ul class="gadget_list">
+ <li><%= icon "profile", user_url(current_user), nil, nil, " My Profile" %></li>
+ <li><%= messages_link(current_user, "My Messages") %></li>
+ <li><%= friendships_pending_link(current_user) %></li>
+ <li><%= memberships_link(current_user) %></li>
+ </ul>
+ <div class="header"><%= icon 'contributions', nil, nil, nil, 'Contributions'-%></div>
+ <ul class="gadget_list">
+ <li><%= icon "workflow", user_workflows_url(current_user), nil, nil, " My Workflows" %>
+ (<%= current_user.workflows.size-%>)
+ </li>
+ <li><%= icon "blob", user_blobs_url(current_user), nil, nil, " My Files" %>
+ (<%= current_user.blobs.size-%>)
+ </li>
+ <li><%= icon "pack", user_packs_url(current_user), nil, nil, " My Packs" %>
+ (<%= current_user.packs.size-%>)
+ </li>
+ </ul>
+ <%= render :partial => 'gadgets/user_favourites' %>
+ <% if admin? %>
+ <div class="header"><%= icon 'admin', nil, nil, nil, 'Administration'-%></div>
+ <ul class="gadget_list">
+ <li><%= icon "announcement", announcements_url, nil, nil, "Manage Announcements" %></li>
+ <li><%= icon "usercheck", "/users/check", nil, nil, "Manage Users" %></li>
+ </ul>
+ <% end %>
+ <div style="border-top: 1px solid #ccc"></div>
+ <ul class="gadget_list">
+ <li><%= signout_link -%></li>
+ </ul>
</div>
-
-<% end %>
Modified: trunk/app/views/layouts/_myexperiment.html.erb (3523 => 3524)
--- trunk/app/views/layouts/_myexperiment.html.erb 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/layouts/_myexperiment.html.erb 2013-05-01 15:03:41 UTC (rev 3524)
@@ -38,18 +38,17 @@
<%= link_to image_tag(Conf.site_logo), "/" %>
<% end %>
</div>
- <div id="myexp_links">
- <div id="site_info_links" class="links">
- <% if @content_for_site_info_links %>
- <%= yield :site_info_links %>
- <% else %>
- <%= render :partial => 'layouts/site_info_links' %>
- <% end %>
- </div>
- <div id="user_links" class="links">
- <%= render :partial => 'layouts/user_links' %>
- </div>
+ <div id="site_info_links" class="links">
+ <% if @content_for_site_info_links %>
+ <%= yield :site_info_links %>
+ <% else %>
+ <%= render :partial => 'layouts/site_info_links' %>
+ <% end %>
</div>
+ <div id="user_links">
+ <%= render :partial => 'layouts/user_links' %>
+ </div>
+ <div style="clear:both"></div>
</div>
<div id="myexp_tabs">
<% if @content_for_tabs %>
@@ -59,6 +58,7 @@
<% end %>
</div>
<div id="myexp_searchbar">
+ <%= render :partial => "gadgets/new_object" %>
<%= render :partial => "layouts/search" %>
</div>
</div>
@@ -69,22 +69,14 @@
<%= yield :body %>
<% else %>
<div id="bd">
- <div id="yui-main">
- <div class="yui-b">
- <div id="myexp_breadcrumbs_bar">
- <%= render :partial => "layouts/breadcrumbs_bar" %>
- </div>
- <div id="myexp_content">
- <%= render :partial => 'layouts/alerts' %>
+ <div id="myexp_breadcrumbs_bar">
+ <%= render :partial => "layouts/breadcrumbs_bar" %>
+ </div>
+ <div id="myexp_content">
+ <%= render :partial => 'layouts/alerts' %>
- <%= yield :layout %>
-
- </div>
- </div>
+ <%= yield :layout %>
</div>
- <div id="myexp_sidebar" class="yui-b">
- <%= render :partial => "layouts/sidebar" %>
- </div>
</div>
<% end %>
Modified: trunk/app/views/layouts/_search.rhtml (3523 => 3524)
--- trunk/app/views/layouts/_search.rhtml 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/layouts/_search.rhtml 2013-05-01 15:03:41 UTC (rev 3524)
@@ -1,5 +1,7 @@
-<% form_tag search_path, :method => :get do %>
- <%= text_field_tag :query, @query ? @query.strip : nil, :style => "padding: 0.1em;" %>
- <%= select_tag :type, options_for_select(Conf.search_categories.collect { |t| [t.capitalize, t] }, @query_type) %>
- <%= submit_tag "Search", :disable_with => "Searching..." %>
-<% end %>
+<div id="search">
+ <% form_tag search_path, :method => :get do %>
+ <%= text_field_tag :query, @query ? @query.strip : nil, :style => "padding: 0.1em;" %>
+ <%= select_tag :type, options_for_select(Conf.search_categories.collect { |t| [t.capitalize, t] }, @query_type) %>
+ <%= submit_tag "Search", :disable_with => "Searching..." %>
+ <% end %>
+</div>
Modified: trunk/app/views/layouts/_site_info_links.rhtml (3523 => 3524)
--- trunk/app/views/layouts/_site_info_links.rhtml 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/layouts/_site_info_links.rhtml 2013-05-01 15:03:41 UTC (rev 3524)
@@ -1,3 +1,3 @@
-<%= link_to "About", "http://wiki.myexperiment.org/", :target => '_blank' %> |
-<%= link_to "Mailing List", "http://lists.nongnu.org/mailman/listinfo/myexperiment-discuss", :target => '_blank' %> |
-<%= link_to "Publications", "http://wiki.myexperiment.org/index.php/Papers", :target => '_blank' %>
\ No newline at end of file
+<%= link_to "About", "http://wiki.myexperiment.org/" %> |
+<%= link_to "Give us Feedback", "/feedback" %> |
+<%= link_to "Publications", "http://wiki.myexperiment.org/index.php/Papers" %>
\ No newline at end of file
Modified: trunk/app/views/layouts/_user_links.rhtml (3523 => 3524)
--- trunk/app/views/layouts/_user_links.rhtml 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/layouts/_user_links.rhtml 2013-05-01 15:03:41 UTC (rev 3524)
@@ -1,8 +1,6 @@
<% if logged_in? -%>
- <%= signout_link -%> |
+ <%= render :partial => 'gadgets/user_monitor' %>
<% else -%>
<%= icon "login", new_session_url, nil, nil, "Log in" -%> |
- <%= icon "user", new_user_url, nil, nil, "Register" -%> |
-<% end %>
-<%= icon "feedback", "/feedback", nil, nil, "Give us Feedback" -%> |
-<%= icon "user-invite", invite_users_path, nil, nil, "Invite" -%>
\ No newline at end of file
+ <%= icon "user", new_user_url, nil, nil, "Register" -%>
+<% end %>
\ No newline at end of file
Modified: trunk/app/views/layouts/skins/elico.html.erb (3523 => 3524)
--- trunk/app/views/layouts/skins/elico.html.erb 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/layouts/skins/elico.html.erb 2013-05-01 15:03:41 UTC (rev 3524)
@@ -14,8 +14,8 @@
</div>
</div>
</div>
- <div style="float: right; font-size: 120%; margin-top: 1.5em">
- e-Laboratory for Interdisciplinary Collaborative Data Mining
+ <div style="float: right; background-color: #fff; border-radius: 3px; padding: 5px;">
+ <%= render :partial => 'layouts/user_links' %>
</div>
<br class="clearer"/>
</div>
@@ -26,9 +26,6 @@
<%= link_to "Mailing List", "http://lists.e-lico.eu/mailman/listinfo/dm-myexperiment", :target => '_blank' %> |
<%= link_to "Publications", "http://www.e-lico.eu/?q=publications", :target => '_blank' %>
</div>
- <div style="float: right;" class="links">
- <%= render :partial => 'layouts/user_links' %>
- </div>
<br class="clearer"/>
</div>
</div>
@@ -40,6 +37,7 @@
<%= render :partial => 'layouts/tab_bar' %>
</div>
<div id="myexp_searchbar">
+ <%= render :partial => "gadgets/new_object" %>
<%= render :partial => "layouts/search" %>
</div>
</div>
Modified: trunk/app/views/users/_listing.rhtml (3523 => 3524)
--- trunk/app/views/users/_listing.rhtml 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/users/_listing.rhtml 2013-05-01 15:03:41 UTC (rev 3524)
@@ -1,97 +1,95 @@
- <td style="width: 100px"><div style="text-align: center; font-weight: bold">Member</div><br /><br /><center><%= contributor(user.id, 'User', true, 60) %></center></td>
- <td class="mid" style="text-align: left; max-width: 370px;">
+<% user = listing %>
- <p style="margin-top:0; padding-top:0; font-weight:bold; font-size: 108%;">
+<div class="resource_list_item">
+
+ <div class="avatar_panel" style="width: 7em">
+ <span class="owner">Member</span>
+ <%= contributor(user.id, "User", true, 80) %>
+ </div>
+
+ <div class="main_panel" style="margin-left: 7.5em">
+
+ <div class="actions">
+ <%= icon "show", user_path(user.id), nil, nil, "View" %>
+ <% if mine? user %>
+ <%= icon "edit", edit_user_path(user), nil, nil, "Edit" %>
+ <% else %>
+ <!-- check if the profile that we are viewing now is a friend of current user -> stored for better performance -->
+ <% this_user_is_friend_of_current_user = (current_user != 0) && current_user.friend?(user.id) %>
+ <% unless !logged_in? || this_user_is_friend_of_current_user || current_user.friendship_pending?(user.id) %>
+ <%= icon "friendship", new_user_friendship_url(:user_id => user.id), nil, nil, "Request Friendship" %>
+ <% end %>
+
+ <%= icon "message", new_message_path(:user_id => user.id), nil, nil, "Message" %>
+
+ <% if logged_in? && this_user_is_friend_of_current_user %>
+ <% master_id, friendship_obj = current_user.friendship_from_self_id_and_friends_id(user.id) %>
+ <%= icon "friend_delete", user_friendship_path(current_user, friendship_obj) + "?return_to=" + currentusers_things_url('friends'), nil, {:confirm => "Are you sure you want to remove this user from your friend list?", :method => :delete}, "Cancel Friendship" %>
+ <% end %>
+ <% end %>
+
+ <% if Authorization.check('destroy', user, current_user) %>
+ <%= icon "destroy", user_path(user) + "?return_to=" + CGI::escape(request.request_uri), nil, {
+ :confirm => "Are you sure you want to delete this user from #{Conf.sitename}?", :method => :delete},
+ "Delete User" %>
+ <% end %>
+ </div>
+
+ <p class="title">
<%= icon "user", nil, nil, nil, '' %>
<%= name user %>
<%= friend_badge(user) %>
<%= admin_badge(user) %>
</p>
-
-<% cache(:controller => 'users_cache', :action ="" 'listing', :id => user.id) do -%>
- <% unless user.created_at.blank? %>
- <p style="font-size: 85%;">
- <b>Joined:</b>
- <%= datetime user.created_at %>
- </p>
- <% end %>
-
- <div class="desc" style="font-size: 85%;">
- <% unless user.profile.body.blank? %>
- <% desc = truncate(strip_html(user.profile.body), :length => 180) %>
- <%= query ? highlight_all(desc, query) : desc %>
- <% else -%>
- <span class="none_text">No description</span>
- <% end %>
- </div>
-
- <% unless user.last_seen_at.blank? %>
- <p style="font-size: 85%;">
- <b>Last active:</b>
- <%= datetime user.last_seen_at %>
- </p>
- <% end %>
-
- <% if user.profile %>
-
- <% separator ="" %>
- <p style="font-size: 85%;">
- <% unless user.profile.website.blank? %>
- <b>Website:</b>
- <%= link_to h(user.profile.website), h(user.profile.website), :rel => "nofollow", :popup => true %>
- <% separator = "|" %>
- <% end %>
-
- <% unless user.profile.email.blank? %>
- <%= separator %>
- <b>Email (public):</b>
- <%= mail_to user.profile.email, nil, { :encode => "hex", :replace_at => " [at] " } %>
- <% end %>
- </p>
-
- <% separator ="" %>
- <p style="font-size: 85%;">
- <% unless user.profile.field_or_industry.blank? %>
- <b>Field/Industry:</b>
- <%= h user.profile.field_or_industry %>
- <% separator = "|" %>
- <% end %>
-
- <% unless user.profile.occupation_or_roles.blank? %>
- <%= separator %>
- <b>Occupation/Role(s):</b>
- <%= h user.profile.occupation_or_roles %>
- <% end %>
- </p>
- <% end %>
-<% end %>
- </td>
+ <% cache(:controller => 'users_cache', :action ="" 'listing', :id => user.id) do -%>
-<td class="actions" style="width: 90px;">
- <%= icon "show", user_path(user.id), nil, nil, "View" %>
- <% if mine? user %>
- <%= icon "edit", edit_user_path(user), nil, nil, "Edit" %>
- <% else %>
- <!-- check if the profile that we are viewing now is a friend of current user -> stored for better performance -->
- <% this_user_is_friend_of_current_user = (current_user != 0) && current_user.friend?(user.id) %>
- <% unless !logged_in? || this_user_is_friend_of_current_user || current_user.friendship_pending?(user.id) %>
- <%= icon "friendship", new_user_friendship_url(:user_id => user.id), nil, nil, "Request Friendship" %>
- <% end %>
+ <p>
+ <b>Joined: </b><%=datetime user.created_at -%>
+ </p>
- <%= icon "message", new_message_path(:user_id => user.id), nil, nil, "Message" %>
+ <div class="desc">
+ <% unless user.profile.body.blank? -%>
+ <% desc = truncate(strip_html(user.profile.body), :length => 400) -%>
+ <%= query ? highlight_all(desc, query) : desc -%>
+ <% else -%>
+ <span class="none_text">No description</span>
+ <% end -%>
+ </div>
- <% if logged_in? && this_user_is_friend_of_current_user %>
- <% master_id, friendship_obj = current_user.friendship_from_self_id_and_friends_id(user.id) %>
- <%= icon "friend_delete", user_friendship_path(current_user, friendship_obj) + "?return_to=" + currentusers_things_url('friends'), nil, {:confirm => "Are you sure you want to remove this user from your friend list?", :method => :delete}, "Cancel Friendship" %>
- <% end %>
- <% end %>
+ <% unless user.last_seen_at.blank? %>
+ <p>
+ <b>Last active:</b><%= datetime user.last_seen_at %>
+ </p>
+ <% end %>
- <% if Authorization.check('destroy', user, current_user) %>
- <%= icon "destroy", user_path(user) + "?return_to=" + CGI::escape(request.request_uri), nil, {
- :confirm => "Are you sure you want to remove this user?", :method => :delete},
- "Delete User" %>
- <% end %>
+ <% if user.profile %>
+ <% separator ="" %>
+ <p>
+ <% unless user.profile.website.blank? %>
+ <b>Website:</b><%= link_to h(user.profile.website), h(user.profile.website), :rel => "nofollow", :popup => true %>
+ <% separator = "|" %>
+ <% end %>
-</td>
+ <% unless user.profile.email.blank? %>
+ <%= separator %>
+ <b>Email (public):</b><%= mail_to user.profile.email, nil, { :encode => "hex", :replace_at => " [at] " } %>
+ <% end %>
+ </p>
+ <% separator ="" %>
+ <p>
+ <% unless user.profile.field_or_industry.blank? %>
+ <b>Field/Industry:</b><%= h user.profile.field_or_industry %>
+ <% separator = "|" %>
+ <% end %>
+
+ <% unless user.profile.occupation_or_roles.blank? %>
+ <%= separator %>
+ <b>Occupation/Role(s):</b><%= h user.profile.occupation_or_roles %>
+ <% end %>
+ </p>
+ <% end %>
+ <% end %>
+ </div>
+</div>
Modified: trunk/app/views/users/_table.rhtml (3523 => 3524)
--- trunk/app/views/users/_table.rhtml 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/users/_table.rhtml 2013-05-01 15:03:41 UTC (rev 3524)
@@ -1,15 +1,3 @@
<% query ||= false -%>
-<% unless collection.empty? %>
- <table class="alt_table">
- <% odd_row = false -%>
- <% for user in collection %>
- <% if user.activated? %>
- <tr class="<%= (odd_row = !odd_row) ? "odd_row" : "even_row" %>">
- <%= render :partial => "users/listing", :locals => { :user => user, :query => query } %>
- </tr>
- <% end %>
- <% end %>
- </table>
-<% end %>
-
+<%= render :partial => "users/listing", :locals => { :query => query }, :collection => collection %>
Modified: trunk/app/views/users/show.rhtml (3523 => 3524)
--- trunk/app/views/users/show.rhtml 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/users/show.rhtml 2013-05-01 15:03:41 UTC (rev 3524)
@@ -57,11 +57,13 @@
<li><%= icon('edit', edit_user_profile_path(@user), nil, nil, 'Edit Profile') %></li>
<% end %>
<li><%= icon('history', user_userhistory_path(@user), nil, nil, 'View My History')%></li>
+ <li><%= memberships_link(current_user, "My Memberships") %></li>
+ <li><%= icon('network', user_friendships_path(@user), nil, nil, 'My Friendships')%></li>
<% end %>
<% if Authorization.check('destroy', @user, current_user) %>
<li><%= icon "destroy", user_path(@user), nil, {
- :confirm => "Are you sure you want to remove this user?", :method => :delete},
+ :confirm => "Are you sure you want to delete this user from #{Conf.sitename}?", :method => :delete},
"Delete User" %></li>
<% end %>
</ul>
Modified: trunk/app/views/workflows/_workflow_file_selection_form.rhtml (3523 => 3524)
--- trunk/app/views/workflows/_workflow_file_selection_form.rhtml 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/app/views/workflows/_workflow_file_selection_form.rhtml 2013-05-01 15:03:41 UTC (rev 3524)
@@ -1,5 +1,5 @@
<div class="box_form" style="width: 600px; text-align: center;">
<p style="text-align: center;">
- <input id="workflow_file" name="workflow[file]" size="70" type="file"/>
+ <input id="workflow_file" name="workflow[file]" size="60" type="file"/>
</p>
</div>
\ No newline at end of file
Added: trunk/public/images/collapse_arrow.png
(Binary files differ)
Property changes on: trunk/public/images/collapse_arrow.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/public/images/expand_arrow.png
(Binary files differ)
Property changes on: trunk/public/images/expand_arrow.png
___________________________________________________________________
Added: svn:mime-type
Modified: trunk/public/_javascript_s/application.js (3523 => 3524)
--- trunk/public/_javascript_s/application.js 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/public/_javascript_s/application.js 2013-05-01 15:03:41 UTC (rev 3524)
@@ -20,3 +20,22 @@
}
}
+document.observe("dom:loaded", function() {
+ $(document).observe('click', function(e) {
+ $('user_menu').hide();
+ $('expand_user_menu').show();
+ $('collapse_user_menu').hide();
+ });
+
+
+ $('user_menu_button').observe('click',function(e) {
+ e.stopPropagation();
+ $('user_menu').toggle();
+ $('expand_user_menu').toggle();
+ $('collapse_user_menu').toggle();
+ });
+
+ $('user_menu').observe('click',function(e) {
+ e.stopPropagation();
+ });
+});
\ No newline at end of file
Modified: trunk/public/stylesheets/biovel.css (3523 => 3524)
--- trunk/public/stylesheets/biovel.css 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/public/stylesheets/biovel.css 2013-05-01 15:03:41 UTC (rev 3524)
@@ -18,6 +18,10 @@
background-image: url('/images/sidebar_alpha.png');
}
+.logo {
+ width: 640px;
+}
+
.logo a {
color: #333;
}#
@@ -38,7 +42,7 @@
}
#myexp_header {
- margin: 0 0.5em;
+ margin-bottom: 0;
}
#site_info_links {
Modified: trunk/public/stylesheets/gadgets.css (3523 => 3524)
--- trunk/public/stylesheets/gadgets.css 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/public/stylesheets/gadgets.css 2013-05-01 15:03:41 UTC (rev 3524)
@@ -9,20 +9,20 @@
margin: 0;
}
-.myexperiment_gadget ul.gadget_list {
+ul.gadget_list {
list-style: none;
padding-left: 0;
- margin: 0.3em;
+ margin: 1em;
}
-.myexperiment_gadget ul.gadget_list li {
+ul.gadget_list li {
list-style: none;
padding: 0;
margin: 0;
font-size: 93%;
}
-.myexperiment_gadget ul.gadget_list li * {
+ul.gadget_list li * {
vertical-align: middle;
}
Modified: trunk/public/stylesheets/styles.css (3523 => 3524)
--- trunk/public/stylesheets/styles.css 2013-04-30 08:59:16 UTC (rev 3523)
+++ trunk/public/stylesheets/styles.css 2013-05-01 15:03:41 UTC (rev 3524)
@@ -128,12 +128,13 @@
#myexp_header {
padding-top: 1em;
- margin: 0 0.5em 1em 0.5em;
- overflow: auto;
+ margin-bottom: 1em;
}
.logo {
float: left;
+ width: 290px;
+ padding-left: 10px;
}
.links {
@@ -141,20 +142,13 @@
font-weight: bold;
}
-#myexp_links
-{
- float: right;
- font-size: 93%;
-}
-
#site_info_links {
- text-align: left;
float: left;
padding-top: 6px;
- margin-right: 100px;
+ text-align: center;
+ width: 350px;
}
-
#user_links {
text-align: right;
float: right;
@@ -180,15 +174,21 @@
border-radius: 22px 22px 0px 0px;
}
+#myexp_searchbar:after {
+ visibility: hidden;
+ display: block;
+ content: "";
+ clear: both;
+ height: 0;
+}
+
+
#myexp_searchbar * {
vertical-align: middle;
}
#myexp_content {
- padding-right: 1em;
- padding-left: 0.5em;
- margin-top: 1em;
- margin-bottom: 3em;
+ padding: 1em 1em 3em 0.5em;
}
#myexp_sidebar {
@@ -200,7 +200,6 @@
/* Begin Footer styles */
#ft {
- margin-top: 2em;
border: 0px dotted #999999;
border-width: 1px 0 1px 0;
color: #333333;
@@ -298,6 +297,7 @@
border: 1px solid #CCCCCC;
padding: 2px;
background-color: #FFFFFF;
+ vertical-align: middle;
}
.framed_nospace {
@@ -2017,7 +2017,6 @@
/* pivot */
.pivot {
- width: 737px;
margin: 0;
}
@@ -2422,3 +2421,42 @@
background-color: #f44;
margin-top: 0;
}
+
+#user_menu {
+ position: absolute;
+ border: 1px solid #ccc;
+ background-color: white;
+ text-align: left;
+}
+
+#user_menu a{
+ display: inline-block;
+ color: #000099;
+}
+
+#user_menu_button:hover {
+ cursor: pointer;
+ text-decoration: none;
+}
+
+span.unread_message_count {
+ font-weight: bold;
+}
+
+#search {
+ float: left;
+ margin-right: 3em;
+}
+
+#new_object {
+ float: left;
+ margin-left: 30px;
+ width: 270px;
+ text-align: left;
+}
+
+#user_menu div.header {
+ background-color: #CCDDFF;
+ color: #444444;
+ font-weight: bold;
+}
\ No newline at end of file