myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2151] branches/apace: various changes on license


From: noreply
Subject: [myexperiment-hackers] [2151] branches/apace: various changes on licenses
Date: Tue, 31 Mar 2009 10:03:28 -0400 (EDT)

Revision
2151
Author
dgc
Date
2009-03-31 10:03:28 -0400 (Tue, 31 Mar 2009)

Log Message

various changes on licenses

Modified Paths

Removed Paths

Diff

Deleted: branches/apace/app/views/algorithms/_blob.rhtml (2150 => 2151)


--- branches/apace/app/views/algorithms/_blob.rhtml	2009-03-30 21:16:39 UTC (rev 2150)
+++ branches/apace/app/views/algorithms/_blob.rhtml	2009-03-31 14:03:28 UTC (rev 2151)
@@ -1,33 +0,0 @@
-<center>
-	<table width="320" class="contributable">
-	  <tr>
-	    <td>
-	      <p>
-	        <strong>File name:</strong><br/> 
-	        <%=h algorithm.local_name %>
-	      </p>
-	      
-	      <p>
-	        <strong>File type:</strong><br />
-	        <%=h algorithm.content_type %>
-	      </p>
-	      
-	      <p>
-	        <strong>Downloaded:</strong> <%=pluralize algorithm.contribution.downloads_count, "time" %>
-	      </p>
-	    </td>
-	    <td>
-	      <strong>Uploader:</strong><br/>
-	      <%= contributor(algorithm.contribution.contributor_id, algorithm.contribution.contributor_type, true, 60) %>
-	    </td>
-	  </tr>
-	  <tr>
-	    <td colspan="2">
-	      <% if Authorization.is_authorized?('download', nil, algorithm, current_user) %><%= icon "download", download_file_path(algorithm) %> <% end %>
-	      <% if Authorization.is_authorized?('show', nil, algorithm, current_user) %><%= icon "show", file_path(algorithm), nil, nil, "View" %> <% end %>
-	      <% if logged_in? and Authorization.is_authorized?('edit', nil, algorithm, current_user) %><%= icon "edit", edit_file_path(algorithm) %> <% end %>
-	      <% if logged_in? and algorithm.owner?(current_user) %><%= icon "destroy", file_path(algorithm), nil, :confirm => 'Are you sure?', :method => :delete %><% end %>
-	    </td>
-	  </tr>
-	</table>
-</center>

Modified: branches/apace/app/views/algorithms/_license.rhtml (2150 => 2151)


--- branches/apace/app/views/algorithms/_license.rhtml	2009-03-30 21:16:39 UTC (rev 2150)
+++ branches/apace/app/views/algorithms/_license.rhtml	2009-03-31 14:03:28 UTC (rev 2151)
@@ -1,4 +1,4 @@
-<% case (algorithm.license.to_s); when "by-nd" %>
+<% case (contributable.license.to_s); when "by-nd" %>
 
 <!--
 
@@ -6,14 +6,14 @@
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <Work rdf:about="">
-   <dc:title><%= algorithm.title %></dc:title>
-   <dc:date><%= algorithm.created_at %></dc:date>
-   <dc:description><%= algorithm.description_html %></dc:description>
+   <dc:title><%= contributable.title %></dc:title>
+   <dc:date><%= contributable.created_at %></dc:date>
+   <dc:description><%= contributable.description_html %></dc:description>
    <dc:creator><Agent>
-      <dc:title><%= contributor(algorithm.contribution.contributor_id, algorithm.contribution.contributor_type, link=false) %></dc:title>
+      <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
    </Agent></dc:creator>
    <dc:rights><Agent>
-      <dc:title><%= contributor(algorithm.contribution.contributor_id, algorithm.contribution.contributor_type, link=false) %></dc:title>
+      <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
    </Agent></dc:rights>
    <dc:type rdf:resource="http://purl.org/dc/dcmitype/Data" />
    <dc:source rdf:resource="http://www.myexperiment.org<%= request.request_uri %>"/>
@@ -40,14 +40,14 @@
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <Work rdf:about="">
-   <dc:title><%= algorithm.title %></dc:title>
-   <dc:date><%= algorithm.created_at %></dc:date>
-   <dc:description><%= algorithm.description_html %></dc:description>
+   <dc:title><%= contributable.title %></dc:title>
+   <dc:date><%= contributable.created_at %></dc:date>
+   <dc:description><%= contributable.description_html %></dc:description>
    <dc:creator><Agent>
-      <dc:title><%= contributor(algorithm.contribution.contributor_id, algorithm.contribution.contributor_type, link=false) %></dc:title>
+      <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
    </Agent></dc:creator>
    <dc:rights><Agent>
-      <dc:title><%= contributor(algorithm.contribution.contributor_id, algorithm.contribution.contributor_type, link=false) %></dc:title>
+      <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
    </Agent></dc:rights>
    <dc:type rdf:resource="http://purl.org/dc/dcmitype/Data" />
    <dc:source rdf:resource="http://www.myexperiment.org<%= request.request_uri %>"/>
@@ -75,14 +75,14 @@
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <Work rdf:about="">
-   <dc:title><%= algorithm.title %></dc:title>
-   <dc:date><%= algorithm.created_at %></dc:date>
-   <dc:description><%= algorithm.description_html %></dc:description>
+   <dc:title><%= contributable.title %></dc:title>
+   <dc:date><%= contributable.created_at %></dc:date>
+   <dc:description><%= contributable.description_html %></dc:description>
    <dc:creator><Agent>
-      <dc:title><%= contributor(algorithm.contribution.contributor_id, algorithm.contribution.contributor_type, link=false) %></dc:title>
+      <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
    </Agent></dc:creator>
    <dc:rights><Agent>
-      <dc:title><%= contributor(algorithm.contribution.contributor_id, algorithm.contribution.contributor_type, link=false) %></dc:title>
+      <dc:title><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false) %></dc:title>
    </Agent></dc:rights>
    <dc:type rdf:resource="http://purl.org/dc/dcmitype/Data" />
    <dc:source rdf:resource="http://www.myexperiment.org<%= request.request_uri %>"/>
@@ -104,5 +104,5 @@
 <% end %>
 
 <p>
-  All versions of this File are licensed under the <%= license_link algorithm.license.to_s %>.
+  This Algorithm is licensed under the <%= license_link contributable.license.to_s %>.
 </p>

Modified: branches/apace/app/views/algorithms/_license_form.rhtml (2150 => 2151)


--- branches/apace/app/views/algorithms/_license_form.rhtml	2009-03-30 21:16:39 UTC (rev 2150)
+++ branches/apace/app/views/algorithms/_license_form.rhtml	2009-03-31 14:03:28 UTC (rev 2151)
@@ -44,7 +44,7 @@
             	<tbody>
             		<tr>
 						<td style="vertical-align: top; text-align: center;">
-			                <input id="algorithm_license_bysa" <%= 'checked="checked"' if (license == 'by-sa') %> name="contributable[license]" type="radio" value="by-sa"/>
+			                <input <%= 'checked="checked"' if (license == 'by-sa') %> name="contributable[license]" type="radio" value="by-sa"/>
 						</td>
 						<td style="vertical-align: top; text-align: left;">
 			                <p style="padding: 0; margin: 0;">
@@ -57,7 +57,7 @@
             		</tr>
 					<tr>
 						<td style="vertical-align: top; text-align: center;">
-                			<input id="algorithm_license_by" <%= 'checked="checked"' if (license == 'by') %> name="contributable[license]" type="radio" value="by"/>
+                			<input <%= 'checked="checked"' if (license == 'by') %> name="contributable[license]" type="radio" value="by"/>
 						</td>
 						<td style="vertical-align: top; text-align: left;">	
             				<p style="padding: 0; margin: 0;">
@@ -69,7 +69,7 @@
             		</tr>
 					<tr>
 						<td style="vertical-align: top; text-align: center;">
-                			<input id="algorithm_license_bynd" <%= 'checked="checked"' if (license == 'by-nd') %> name="contributable[license]" type="radio" value="by-nd"/>
+                			<input <%= 'checked="checked"' if (license == 'by-nd') %> name="contributable[license]" type="radio" value="by-nd"/>
 						</td>
 						<td style="vertical-align: top; text-align: left;">
             				<p style="padding: 0; margin: 0;">

Modified: branches/apace/app/views/algorithms/_table.rhtml (2150 => 2151)


--- branches/apace/app/views/algorithms/_table.rhtml	2009-03-30 21:16:39 UTC (rev 2150)
+++ branches/apace/app/views/algorithms/_table.rhtml	2009-03-31 14:03:28 UTC (rev 2151)
@@ -3,35 +3,35 @@
 <% unless collection.empty? %>
 
 <table class="alt_table">
-	<% for algorithm in collection %>
+	<% for contributable in collection %>
 		<% # If only one item in collection, check if 'show' permission is available (eg: if this partial was called from contributions/table) -%>
 		<% if collection.size == 1 -%>
-			<% show ||= Authorization.is_authorized?('show', nil, algorithm, current_user) -%>
+			<% show ||= Authorization.is_authorized?('show', nil, contributable, current_user) -%>
 		<% else -%>
-			<% show = Authorization.is_authorized?('show', nil, algorithm, current_user) -%>
+			<% show = Authorization.is_authorized?('show', nil, contributable, current_user) -%>
 		<% end -%>
 	  <% if show -%>
 			<tr class="<%= (odd_row = !odd_row) ? "odd_row" : "even_row" %>">
-				<% cache(:controller => 'files_cache', :action ="" 'listing', :id => algorithm.id) do -%>
+				<% cache(:controller => 'files_cache', :action ="" 'listing', :id => contributable.id) do -%>
 					<td style="width: 100px;">
 						<p style="margin-top:0; padding-top:0; text-align: center;"><b>Uploader:</b></p>
-						<center><%= contributor(algorithm.contribution.contributor_id, algorithm.contribution.contributor_type, true, 60) %></center>
+						<center><%= contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, true, 60) %></center>
 					</td>
 					<td style="text-align: left;">
 						<p class="title">
 							<%= icon "algorithm", nil, nil, nil, '' %>
-							<% title = contributable_name(algorithm.id, 'Blob') %>
-							<%=link_to(query ? highlight_all(title, query) : title, algorithm_path(algorithm)) %>
+							<% title = contributable_name(contributable.id, 'Blob') %>
+							<%=link_to(query ? highlight_all(title, query) : title, algorithm_path(contributable)) %>
 						</p>
 						
 						<p style="font-size: 85%; margin-top: 0; padding-top: 0;">
-							<b>Created:</b> <%=datetime algorithm.contribution.created_at, false %>
-							<% unless algorithm.contribution.created_at == algorithm.contribution.updated_at %>
-								|	<b>Last updated:</b> <%=datetime algorithm.contribution.updated_at, false %>
+							<b>Created:</b> <%=datetime contributable.contribution.created_at, false %>
+							<% unless contributable.contribution.created_at == contributable.contribution.updated_at %>
+								|	<b>Last updated:</b> <%=datetime contributable.contribution.updated_at, false %>
 							<% end %>
 						</p>
 						
-						<% unless (creditors = algorithm.creditors).empty? %>
+						<% unless (creditors = contributable.creditors).empty? %>
 							<p style="font-size:85%;">
 							<b>Credits:</b>
 							<% creditors.each do |c| %>
@@ -44,7 +44,7 @@
 							<% end %>
 							</p>
 						<% end %>
-						<% unless (attributors = algorithm.attributors).empty? %>
+						<% unless (attributors = contributable.attributors).empty? %>
 							<p style="font-size:85%;">
 							<b>Attributions:</b>
 							<% attributors.each do |a| %>
@@ -60,11 +60,11 @@
 							</p>
 						<% end %>
 						
-						<p style="font-size:85%;"><b>License: </b><%= license_link algorithm.license.to_s %></p>
+						<p style="font-size:85%;"><b>License: </b><%= license_link contributable.license.to_s %></p>
 						
 						<div class="desc" style="font-size: 85%;">
-							<% if algorithm.description and algorithm.description.length > 0 %>
-					  		<% desc = truncate(strip_html(algorithm.description), 500) %>
+							<% if contributable.description and contributable.description.length > 0 %>
+					  		<% desc = truncate(strip_html(contributable.description), 500) %>
 					    	<%= query ? highlight_all(desc, query) : desc %>
 						  <% else -%>
 								<span class="none_text">No description</span>	
@@ -72,13 +72,13 @@
 						</div>
 						
 						<p style="font-size: 85%;">
-							<a href="" algorithm_path(algorithm) + '#ratings' -%>"><b>Rating: </b><%= number_with_precision(algorithm.rating, 1) %> / 5 (<%= pluralize algorithm.ratings_count, 'rating' %>)</a> |
-							<a href="" algorithm_path(algorithm) + '#comments' -%>"><b>Comments: </b><%= algorithm.comments_count %></a> |
-							<b>Viewed internally:</b> <%= pluralize Viewing.total_site_viewings_count_for_contribution(algorithm.contribution.id), "time" %>
+							<a href="" algorithm_path(contributable) + '#ratings' -%>"><b>Rating: </b><%= number_with_precision(contributable.rating, 1) %> / 5 (<%= pluralize contributable.ratings_count, 'rating' %>)</a> |
+							<a href="" algorithm_path(contributable) + '#comments' -%>"><b>Comments: </b><%= contributable.comments_count %></a> |
+							<b>Viewed internally:</b> <%= pluralize Viewing.total_site_viewings_count_for_contribution(contributable.contribution.id), "time" %>
 						</p>
 						
-						<% unless (tags = algorithm.tags).empty? %>
-							<a href="" algorithm_path(algorithm) + '#tags' -%>"><p style="font-size: 85%;"><b>Tags:</b></p></a>
+						<% unless (tags = contributable.tags).empty? %>
+							<a href="" algorithm_path(contributable) + '#tags' -%>"><p style="font-size: 85%;"><b>Tags:</b></p></a>
 							<div style="display:inline;" class="tags_onesize"><%= tag_cloud_from_collection tags, true %></div>
 						<% else %>
 							<p style="font-size: 85%;"><i>This File has no tags!</i></p>
@@ -87,8 +87,8 @@
 				<% end %>
 					
 					<td class="actions" style="width: 80px;">
-				    <%= icon "show", algorithm_path(algorithm), nil, nil, "View" %>
-				    <% if mine?(algorithm) %><%= icon "manage", edit_file_path(algorithm), nil, nil, "Manage" %><% end %>
+				    <%= icon "show", algorithm_path(contributable), nil, nil, "View" %>
+				    <% if mine?(contributable) %><%= icon "manage", edit_file_path(contributable), nil, nil, "Manage" %><% end %>
 				  </td>
 			</tr>
 		<% end %>

Modified: branches/apace/config/routes.rb (2150 => 2151)


--- branches/apace/config/routes.rb	2009-03-30 21:16:39 UTC (rev 2150)
+++ branches/apace/config/routes.rb	2009-03-31 14:03:28 UTC (rev 2151)
@@ -98,6 +98,18 @@
                  :tag => :post } do |algorithm|
   end
 
+  # applications
+  map.resources :applications, 
+    :collection => { :all => :get, :search => :get }, 
+    :member => { :statistics => :get,
+                 :favourite => :post,
+                 :favourite_delete => :delete,
+                 :comment => :post, 
+                 :comment_delete => :delete, 
+                 :rate => :post, 
+                 :tag => :post } do |application|
+  end
+
   # files (downloadable)
   map.resources :files, 
     :controller => :blobs, 

reply via email to

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