Modified: branches/wf4ever/app/views/packs/_breadcrumbs.rhtml (3352 => 3353)
--- branches/wf4ever/app/views/packs/_breadcrumbs.rhtml 2013-01-25 11:34:15 UTC (rev 3352)
+++ branches/wf4ever/app/views/packs/_breadcrumbs.rhtml 2013-01-25 11:35:27 UTC (rev 3353)
@@ -1,30 +1,32 @@
<li><%= link_to 'Packs', packs_path %></li>
+<% title = @title; title ||= 'Untitled' %>
+
<% case controller.action_name.to_s; when "show" %>
- <li><%= h(@pack.title) %></li>
+ <li><%= h(title) %></li>
<% when "new" %>
<li>New Pack</li>
<% when "edit" %>
- <li><%= link_to "#{h(@pack.title)}", pack_path(@pack) %></li>
+ <li><%= link_to "#{h(title)}", pack_path(@pack) %></li>
<li>Manage</li>
<% when "new_item" %>
- <li><%= link_to "#{h(@pack.title)}", pack_path(@pack) %></li>
+ <li><%= link_to "#{h(title)}", pack_path(@pack) %></li>
<li>Add New Item</li>
<% when "edit_item" %>
- <li><%= link_to "#{h(@pack.title)}", pack_path(@pack) %></li>
+ <li><%= link_to "#{h(title)}", pack_path(@pack) %></li>
<li>Edit Item Entry</li>
<% when "all" %>
<li>All Packs</li>
<% when "search" %>
<li>Search Results</li>
<% when "edit_annotations" %>
- <li><%= link_to "#{h(@pack.title)}", pack_path(@pack) %></li>
+ <li><%= link_to "#{h(title)}", pack_path(@pack) %></li>
<li>Edit</li>
<% when "resource_show" %>
- <li><%= link_to "#{h(@pack.title)}", pack_path(@pack) %></li>
+ <li><%= link_to "#{h(title)}", pack_path(@pack) %></li>
<li><%=h @manifest_name -%></li>
<% when "edit_resource_annotations" %>
- <li><%= link_to "#{h(@pack.title)}", pack_path(@pack) %></li>
+ <li><%= link_to "#{h(title)}", pack_path(@pack) %></li>
<li><%= link_to h(@manifest_name), pack_resource_path(@pack, params[:resource_path]) -%></li>
<li>Edit</li>
<% end %>
Modified: branches/wf4ever/app/views/packs/show.rhtml (3352 => 3353)
--- branches/wf4ever/app/views/packs/show.rhtml 2013-01-25 11:34:15 UTC (rev 3352)
+++ branches/wf4ever/app/views/packs/show.rhtml 2013-01-25 11:35:27 UTC (rev 3353)
@@ -1,10 +1,16 @@
<% t "#{contributable_name(@pack.id, 'Pack')} (#{h @pack.contributor_name})" -%>
+<% @title = @annotations.query([RDF::URI.parse(@pack.ro_uri), RDF::DC.title, nil]).objects.first if @pack.ro_uri; @title = @title.to_s if @title; @title ||= @pack.title %>
+<% @description_html = @annotations.query([RDF::URI.parse(@pack.ro_uri), RDF::DC.description, nil]).objects.first if @pack.ro_uri; @description_html = h(@description_html) if @description_html; @description_html ||= @pack.description_html %>
+
<% if @authorised_to_edit %>
<ul class="sectionIcons">
<% if mine?(@pack) -%>
<li><%= icon('manage', edit_pack_path(@pack), nil, nil, 'Manage Pack') -%></li>
<% end -%>
+ <% if Authorization.check("edit", @pack, current_user) && @pack.ro_uri %>
+ <li><%= icon('edit', edit_annotations_pack_path(@pack), nil, nil, "Edit Annotations") %></li>
+ <% end %>
<% if Authorization.check("destroy", @pack, current_user) %>
<li><%= icon('destroy', pack_path(@pack), nil, { :confirm => 'This deletes the Pack and all metadata such as tags and comments, BUT does not delete the actual items pointed to in the Pack. Are you sure you would like to delete this Pack?', :method => :delete }, 'Delete Pack') %></li>
<% end %>
@@ -40,7 +46,7 @@
<div class="contribution_version_inner_box">
<p>
<b>Title:</b>
- <span class="title"><%=h @pack.title %></span>
+ <span class="title"><%=h @title %></span>
</p>
<% if @pack.ro_uri %>
@@ -59,14 +65,10 @@
Description
</h3>
- <% unless @pack.description.blank? %>
+ <% unless @description_html.blank? %>
<div class="contribution_description">
- <%= @pack.description_html %>
+ <%= @description_html %>
</div>
- <% if mine?(@pack) %>
- <br/>
- <p style="text-align: right; color: #666666;">[ <%= link_to "edit", edit_pack_path(@pack) %> ]</p>
- <% end %>
<% else %>
<p class="none_text">
Not set