myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2236] branches/event_logging: svn merge -r2225:2


From: noreply
Subject: [myexperiment-hackers] [2236] branches/event_logging: svn merge -r2225:2234 svn+ssh://dtm@ rubyforge.org/var/svn/myexperiment/trunk
Date: Wed, 24 Jun 2009 12:18:51 -0400 (EDT)

Revision
2236
Author
dtm
Date
2009-06-24 12:18:50 -0400 (Wed, 24 Jun 2009)

Log Message

svn merge -r2225:2234 svn+ssh://address@hidden/var/svn/myexperiment/trunk

Modified Paths

Added Paths

Diff

Copied: branches/event_logging/app/controllers/license_attributes_controller.rb (from rev 2234, trunk/app/controllers/license_attributes_controller.rb) (0 => 2236)


--- branches/event_logging/app/controllers/license_attributes_controller.rb	                        (rev 0)
+++ branches/event_logging/app/controllers/license_attributes_controller.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,25 @@
+class LicenseAttributesController < ApplicationController
+  before_filter :login_required
+  before_filter :find_license_attribute, : [:index]
+  
+  def destroy
+    @license_attribute = LicenseAttribute.find(params[:id])
+    @license_attribute.destroy
+
+    respond_to do |format|
+      format.html { redirect_to license_url(@license_attribute.license) }
+    end
+  end
+
+  
+  protected
+  
+  def find_license_attribute
+    begin
+      @license_attribute = LicenseAttribute.find(params[:id])
+    rescue ActiveRecord::RecordNotFound
+      error("License Attribute not found", "is invalid")
+    end
+  end
+  
+end

Copied: branches/event_logging/app/controllers/licenses_controller.rb (from rev 2234, trunk/app/controllers/licenses_controller.rb) (0 => 2236)


--- branches/event_logging/app/controllers/licenses_controller.rb	                        (rev 0)
+++ branches/event_logging/app/controllers/licenses_controller.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,90 @@
+class LicensesController < ApplicationController
+  before_filter :check_admin, :except => [:show, :index, :update_license_info]
+  
+  before_filter :find_licenses, : [:index]
+  
+  def index
+    respond_to do |format|
+      format.html # index.rhtml
+    end
+  end
+
+  def show
+    @license = License.find(params[:id])
+  end
+
+  def new
+    @license = License.new
+  end
+
+  def create
+    params[:license][:user_id] = current_user.id
+    @license = License.new(params[:license])
+    if @license.save
+      params[:license_attributes].each do |attrib,aval|
+        @license_attribute = LicenseAttribute.new(:license => @license, :license_option_id => attrib)
+        @license_attribute.save
+      end
+      flash[:notice] = 'License was successfully created.'
+      redirect_to :action ="" 'index'
+    else
+      render :action ="" 'new'
+    end
+  end
+
+  def edit
+    @license = License.find(params[:id])
+  end
+
+  def update
+    @license = License.find(params[:id])
+    @license_attributes = @license.license_attributes
+    for @attrib in @license_attributes do
+      @attrib.destroy
+    end
+    params[:license_attributes].each do |attrib,aval|
+      @license_attribute = LicenseAttribute.new(:license => @license, :license_option_id => attrib)
+      @license_attribute.save
+    end
+    if @license.update_attributes(params[:license])
+      flash[:notice] = 'License was successfully updated.'
+      redirect_to :action ="" 'show', :id => @license
+    else
+      render :action ="" 'edit'
+    end
+  end
+
+  def destroy
+    if (Workflow.find_all_by_license_id(params[:id]).empty? and Blob.find_all_by_license_id(params[:id]).empty? ) 
+     # License.find(params[:id]).destroy
+      flash[:notice] = 'License was successfully deleted.'
+    else
+      flash[:error] = 'License could not be deleted because it is in use.'
+    end
+    redirect_to :action ="" 'index'
+  end
+  
+  def update_license_form
+    license = License.find(params[:license_id])   
+    render(:partial => "licenses/view", :locals => {:license => license})
+  end
+  
+  def update_license_info
+      license = License.find(params[:license_id])
+      render :partial => "licenses/view", :locals => { :license => license }
+  end
+  
+protected
+
+  def check_admin
+    unless admin?
+      flash[:error] = 'Only administrators have access to create, update and delete licenses.'
+      redirect_to :action ="" 'index'
+    end
+  end
+  
+  def find_licenses
+    @licenses = License.find(:all, :order => "title")
+  end
+  
+end

Modified: branches/event_logging/app/controllers/search_controller.rb (2235 => 2236)


--- branches/event_logging/app/controllers/search_controller.rb	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/controllers/search_controller.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -152,23 +152,31 @@
 
       models = categories.map do |category| eval(category.singularize.camelize) end
 
-      @results = User.multi_solr_search(@query, :limit => 100, :models => models).results
-      
-      @total_count = @results.length
+      @total_count = 0
 
       @infos = []
 
       models.each do |model|
 
-        model_results = @results.select do |r| r.instance_of?(model) end
+        model_results = model.find_by_solr(@query, :limit => 10)
+        model_count   = model_results.total
 
-        if (model_results.length > 0)
+        search_type = model.name.downcase.pluralize
+
+        Conf.model_aliases.each do |k,v|
+          search_type = k.downcase.pluralize if model.name == v
+        end
+
+        if (model_results.results.length > 0)
           @infos.push({
+            :search_type => search_type,
             :model       => model,
-            :results     => model_results,
-            :total_count => model.count_by_solr(@query)
+            :results     => model_results.results,
+            :total_count => model_count
           })
         end
+
+        @total_count += model_count
       end
     end
 

Modified: branches/event_logging/app/controllers/workflows_controller.rb (2235 => 2236)


--- branches/event_logging/app/controllers/workflows_controller.rb	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/controllers/workflows_controller.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -262,7 +262,7 @@
     @workflow = Workflow.new
     @workflow.contributor = current_user
     @workflow.last_edited_by = current_user.id
-    @workflow.license = params[:workflow][:license]
+    @workflow.license_id = params[:workflow][:license_id]
     @workflow.content_blob = ContentBlob.new(:data ="" file.read)
     @workflow.file_ext = file.original_filename.split(".").last.downcase
     
@@ -439,7 +439,7 @@
     # remove owner only columns
     unless @workflow.contribution.owner?(current_user)
       if params[:workflow]
-        [:unique_name, :license].each do |column_name|
+        [:unique_name, :license_id].each do |column_name|
           params[:workflow].delete(column_name)
         end
       end

Modified: branches/event_logging/app/helpers/application_helper.rb (2235 => 2236)


--- branches/event_logging/app/helpers/application_helper.rb	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/helpers/application_helper.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -822,6 +822,8 @@
       return "famfamfam_silk/computer_go.png"
     when "register_application"
       return "famfamfam_silk/application_edit.png"
+    when "license"
+      return "famfamfam_silk/text_signature.png"
     else
       return Conf.label_icons[method.to_s] if Conf.label_icons[method.to_s]
     end
@@ -907,14 +909,12 @@
     }
   end
   
-  def license_link(license_type)
-    case license_type.downcase
-    when "by-nd"
-      return '<a rel="Copyright" href="" target="_blank">Creative Commons Attribution-NoDerivs 3.0 License</a>'
-    when "by"
-      return '<a rel="Copyright" href="" target="_blank">Creative Commons Attribution 3.0 License</a>'
-    when "by-sa"
-      return '<a rel="Copyright" href="" target="_blank">Creative Commons Attribution-Share Alike 3.0 License</a>'
+  def license_icon_link(license)
+    case license.unique_name
+    when "by-nd", "by-sa", "by", "by-nc-nd", "by-nc", "by-nc-sa", "GPL", "LGPL"
+      return "<a rel=\"Copyright\" href="" title=\"#{license.title}\"><img src="" /></a>"
+    else
+      return "<a rel=\"Copyright\" href=""
     end
   end
   

Copied: branches/event_logging/app/helpers/license_attributes_helper.rb (from rev 2234, trunk/app/helpers/license_attributes_helper.rb) (0 => 2236)


--- branches/event_logging/app/helpers/license_attributes_helper.rb	                        (rev 0)
+++ branches/event_logging/app/helpers/license_attributes_helper.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,2 @@
+module LicenseAttributesHelper
+end

Copied: branches/event_logging/app/helpers/licenses_helper.rb (from rev 2234, trunk/app/helpers/licenses_helper.rb) (0 => 2236)


--- branches/event_logging/app/helpers/licenses_helper.rb	                        (rev 0)
+++ branches/event_logging/app/helpers/licenses_helper.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,2 @@
+module LicensesHelper
+end

Modified: branches/event_logging/app/models/blob.rb (2235 => 2236)


--- branches/event_logging/app/models/blob.rb	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/models/blob.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -33,12 +33,13 @@
 
   belongs_to :content_blob
   belongs_to :content_type
+  belongs_to :license
+ 
 
   # :dependent => :destroy is not supported in belongs_to in rails 1.2.6
   after_destroy { |b| b.content_blob.destroy }
 
-  validates_inclusion_of :license, :in => [ "by-nd", "by-sa", "by" ]
-  
+  validates_presence_of :license_id
   validates_presence_of :content_blob
   validates_presence_of :content_type
 

Copied: branches/event_logging/app/models/license.rb (from rev 2234, trunk/app/models/license.rb) (0 => 2236)


--- branches/event_logging/app/models/license.rb	                        (rev 0)
+++ branches/event_logging/app/models/license.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,25 @@
+class License < ActiveRecord::Base
+  format_attribute :description
+
+  belongs_to :user
+
+  validates_presence_of :user_id, :title, :url
+  validates_uniqueness_of :title, :url
+  
+  has_many :license_attributes, 
+           :dependent => :destroy
+           
+   #def self.packs_with_contributable(contributable)
+   def self.find_license_options_set(license)
+     if license.id
+      license_id=license.id
+     else
+      license_id="0"
+     end
+     return LicenseOption.find_by_sql("SELECT license_options.title, license_options.id, lic_att.isset FROM license_options LEFT JOIN ( SELECT license_option_id, 1 AS isset FROM license_attributes WHERE license_id = #{license_id}) AS lic_att ON license_options.id = lic_att.license_option_id")
+  end
+  def license_attributes
+     return LicenseAttribute.find_by_sql("SELECT * FROM license_attributes INNER JOIN license_options on license_attributes.license_option_id=license_options.id WHERE license_id = #{self.id}")
+  end
+  
+end

Copied: branches/event_logging/app/models/license_attribute.rb (from rev 2234, trunk/app/models/license_attribute.rb) (0 => 2236)


--- branches/event_logging/app/models/license_attribute.rb	                        (rev 0)
+++ branches/event_logging/app/models/license_attribute.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,6 @@
+class LicenseAttribute < ActiveRecord::Base
+  belongs_to :license
+  belongs_to :license_option
+
+  validates_presence_of :license_option_id, :license_id
+end

Copied: branches/event_logging/app/models/license_option.rb (from rev 2234, trunk/app/models/license_option.rb) (0 => 2236)


--- branches/event_logging/app/models/license_option.rb	                        (rev 0)
+++ branches/event_logging/app/models/license_option.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,8 @@
+class LicenseOption < ActiveRecord::Base
+  format_attribute :description
+
+  belongs_to :user
+
+  validates_presence_of :user_id, :title, :uri, :predicate
+  validates_uniqueness_of :title, :uri
+end

Modified: branches/event_logging/app/models/workflow.rb (2235 => 2236)


--- branches/event_logging/app/models/workflow.rb	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/models/workflow.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -23,8 +23,8 @@
 
   belongs_to :content_blob
   belongs_to :content_type
-
-  
+  belongs_to :license
+    
   # need to destroy the workflow versions and their content blobs to avoid orphaned records
   before_destroy { |w| w.versions.each do |wv|
                         wv.content_blob.destroy if wv.content_blob
@@ -94,7 +94,7 @@
   end
   
   #non_versioned_fields.push("image", "svg", "license", "tag_list") # acts_as_versioned and file_column don't get on
-  non_versioned_columns.push("license", "tag_list", "body_html")
+  non_versioned_columns.push("license_id", "tag_list", "body_html")
   
   acts_as_solr(:fields => [ :title, :body, :tag_list, :contributor_name, :kind, :get_all_search_terms ],
                :boost => "search_boost",
@@ -109,8 +109,7 @@
   validates_presence_of :unique_name
   validates_uniqueness_of :unique_name
   
-  validates_inclusion_of :license, :in => [ "by-nd", "by-sa", "by" ]
-  
+  validates_presence_of :license_id
   validates_presence_of :content_blob
   validates_presence_of :content_type
 

Modified: branches/event_logging/app/views/blobs/_license_form.rhtml (2235 => 2236)


--- branches/event_logging/app/views/blobs/_license_form.rhtml	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/views/blobs/_license_form.rhtml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -1,9 +1,9 @@
-<% if params[:blob] && !params[:blob][:license].blank? %>
-	<% license = params[:blob][:license] %>
+<% if params[:blob] && !params[:blob][:license_id].blank? %>
+	<% @license = License.find(params[:blob][:license_id]) %>
 <% elsif edit %>
-	<% license = @blob.license %>
+	<% @license = License.find(@blob.license_id) %>
 <% else %>
- 	<% license = 'by-sa' %> 
+    <% @license = License.find(2) %>
 <% end %>
 
 <div class="fold">
@@ -12,10 +12,10 @@
       License/Rights
 			<% if edit %>
 				<hr />
-				<small>Current: <%= license_link(license) %></small>
+				<small>Current: <%= @license.title %> (<%= link_to h(@license.url), @license.url %>) </small>
 			<% else %>
 				<hr />
-				<small>Default: people are allowed to build on this File, but must give author(s) credit and give attribution to this File. They must also share under the same conditions. (<%= license_link license %>)</small>
+				<small>Default: <%= @license.title %> (<%= link_to h(@license.url), @license.url %>)</small>
 			<% end %>
     </div>
     <div class="foldContent" style="display: none;">
@@ -27,62 +27,16 @@
             <strong>What license do you want people to adhere to if they download and use this File?</strong>
         </p>
         <div style="padding-left: 1em;">
-            <div style="padding: 0.5em; border: 1px dotted #999999; margin: 1.5em 3em; text-align: center;">
-                <p style="text-align: center;">
-                    <img alt="Science Commons" src="" /></p>
-                <p style="text-align: center;">
-                    Below you can configure what rights people will have with this File, based on
-                    the <a href="" Commons</a>
-                    licenses. Sharing Files and letting others build upon them is a useful contribution
-                    and is highly recommended.</p>
-            </div>
-            <p>
-                When someone downloads this Files, are they allowed to build upon it (such as
-                extend, reuse, repurpose etc)?
-			</p>
-            <table style="border-collapse: collapse; border-spacing: 0;">
-            	<tbody>
-            		<tr>
-						<td style="vertical-align: top; text-align: center;">
-			                <input id="blob_license_bysa" <%= 'checked="checked"' if (license == 'by-sa') %> name="blob[license]" type="radio" value="by-sa"/>
-						</td>
-						<td style="vertical-align: top; text-align: left;">
-			                <p style="padding: 0; margin: 0;">
-			                	Yes, as long as they <strong>give the author(s) credit</strong> and <strong>give attribution to this File</strong>. 
-								They must also <strong>share</strong> the resulting work <strong>under the same conditions</strong>.
-								<br/>
-								- <%= license_link "by-sa" %>
-							</p>
-						</td>
-            		</tr>
-					<tr>
-						<td style="vertical-align: top; text-align: center;">
-                			<input id="blob_license_by" <%= 'checked="checked"' if (license == 'by') %> name="blob[license]" type="radio" value="by"/>
-						</td>
-						<td style="vertical-align: top; text-align: left;">	
-            				<p style="padding: 0; margin: 0;">
-            					Yes, as long as they <strong>give the author(s) credit</strong> and <strong>give attribution to this File</strong>.
-								<br/>
-								- <%= license_link "by" %>
-							</p>
-						</td>
-            		</tr>
-					<tr>
-						<td style="vertical-align: top; text-align: center;">
-                			<input id="blob_license_bynd" <%= 'checked="checked"' if (license == 'by-nd') %> name="blob[license]" type="radio" value="by-nd"/>
-						</td>
-						<td style="vertical-align: top; text-align: left;">
-            				<p style="padding: 0; margin: 0;">
-								No. They may only use the File for reference.
-								<br/>
-								- <%= license_link "by-nd" %>
-							</p>
-						</td>
-            		</tr>
-            	</tbody>
-        	</table>
-                <small>Nothing in these licenses impairs or restricts the author's moral rights.</small></p>
+        
+        <%= collection_select(:blob, :license_id, License.find(:all), :id, :title, {}, 
+              {: remote_function(:update => 'license_info',
+               :url ="" {:controller => 'licenses', :action="" 'update_license_info' },
+               :with => "'license_id=' + escape(value)")}) %>
         </div>
+        <hr/>
+        <div id="license_info" style="padding: 0 20px;">
+          <%= render :partial => "licenses/view", :locals => { :license => @license } %>
+		</div>
     </div>
 </div>
                 

Modified: branches/event_logging/app/views/blobs/_table.rhtml (2235 => 2236)


--- branches/event_logging/app/views/blobs/_table.rhtml	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/views/blobs/_table.rhtml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -61,7 +61,7 @@
 							</p>
 						<% end %>
 						
-						<p style="font-size:85%;"><b>License: </b><%= license_link blob.license.to_s %></p>
+						<p style="font-size:85%;"><b>License: </b><% @license = License.find(blob.license_id) %><%= link_to h(@license.url), license_path(@license) %></p>
 						
 						<div class="desc" style="font-size: 85%;">
 							<% if blob.body and blob.body.length > 0 %>

Modified: branches/event_logging/app/views/contributions/_license_box.rhtml (2235 => 2236)


--- branches/event_logging/app/views/contributions/_license_box.rhtml	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/views/contributions/_license_box.rhtml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -9,117 +9,42 @@
 
 
 <% dc_title = contributable.title %>
-<% dc_description = contributable.respond_to?('description_html') ? contributable.description_html : contributable.body_html %>
+<% dc_description = h(contributable.respond_to?('description_html') ? contributable.description_html : contributable.body_html) %>
 <% dc_date = contributable.created_at %>
 <% dc_creator = contributor(contributable.contribution.contributor_id, contributable.contribution.contributor_type, link=false)  %>
 <% dc_source = Conf.base_uri + request.request_uri %>
 
 
-<% case (contributable.license.to_s); when "by-nd" %>
+<% @license = License.find(contributable.license_id) %>
 
-<!--
+<%=  "<!--
 
-<rdf:RDF xmlns="http://web.resource.org/cc/"
-    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><%= dc_title %></dc:title>
-   <dc:date><%= dc_date %></dc:date>
-   <dc:description><%= dc_description %></dc:description>
+<rdf:RDF xmlns=\"http://creativecommons.org/ns#\"
+    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>#{dc_title}</dc:title>
+   <dc:date>#{dc_date}</dc:date>
+   <dc:description>#{dc_description}</dc:description>
    <dc:creator><Agent>
-      <dc:title><%= dc_creator %></dc:title>
+      <dc:title>#{dc_creator}</dc:title>
    </Agent></dc:creator>
    <dc:rights><Agent>
-      <dc:title><%= dc_creator %></dc:title>
+      <dc:title>#{dc_creator}</dc:title>
    </Agent></dc:rights>
-   <dc:type rdf:resource="http://purl.org/dc/dcmitype/Data" />
-   <dc:source rdf:resource="<%= dc_source -%>"/>
-   <license rdf:resource="http://creativecommons.org/licenses/by-nd/3.0/" />
+   <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/Data\" />
+   <dc:source rdf:resource=\"#{dc_source}\"/>
+   <license rdf:resource=\"address@hidden" />
 </Work>
 
-<License rdf:about="http://creativecommons.org/licenses/by-nd/3.0/">
-   <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
-   <permits rdf:resource="http://web.resource.org/cc/Distribution" />
-   <requires rdf:resource="http://web.resource.org/cc/Notice" />
-   <requires rdf:resource="http://web.resource.org/cc/Attribution" />
-   <prohibits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+<License rdf:about=\"address@hidden">"%>
+<% @license.license_attributes.each do |attrib| %><%= "  <#{attrib.predicate} rdf:resource=\"#{attrib.uri}\" />" %><% end %>
 </License>
 
 </rdf:RDF>
 
 -->
 
-<% when "by-sa" %>
-
-<!--
-
-<rdf:RDF xmlns="http://web.resource.org/cc/"
-    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><%= dc_title %></dc:title>
-   <dc:date><%= dc_date %></dc:date>
-   <dc:description><%= dc_description %></dc:description>
-   <dc:creator><Agent>
-      <dc:title><%= dc_creator %></dc:title>
-   </Agent></dc:creator>
-   <dc:rights><Agent>
-      <dc:title><%= dc_creator %></dc:title>
-   </Agent></dc:rights>
-   <dc:type rdf:resource="http://purl.org/dc/dcmitype/Data" />
-   <dc:source rdf:resource="<%= dc_source -%>"/>
-   <license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
-</Work>
-
-<License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
-   <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
-   <permits rdf:resource="http://web.resource.org/cc/Distribution" />
-   <requires rdf:resource="http://web.resource.org/cc/Notice" />
-   <requires rdf:resource="http://web.resource.org/cc/Attribution" />
-   <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
-   <requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
-</License>
-
-</rdf:RDF>
-
--->
-
-<% when "by" %>
-
-<!--
-
-<rdf:RDF xmlns="http://web.resource.org/cc/"
-    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><%= dc_title %></dc:title>
-   <dc:date><%= dc_date %></dc:date>
-   <dc:description><%= dc_description %></dc:description>
-   <dc:creator><Agent>
-      <dc:title><%= dc_creator %></dc:title>
-   </Agent></dc:creator>
-   <dc:rights><Agent>
-      <dc:title><%= dc_creator %></dc:title>
-   </Agent></dc:rights>
-   <dc:type rdf:resource="http://purl.org/dc/dcmitype/Data" />
-   <dc:source rdf:resource="<%= dc_source -%>"/>
-   <license rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
-</Work>
-
-<License rdf:about="http://creativecommons.org/licenses/by/3.0/">
-   <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
-   <permits rdf:resource="http://web.resource.org/cc/Distribution" />
-   <requires rdf:resource="http://web.resource.org/cc/Notice" />
-   <requires rdf:resource="http://web.resource.org/cc/Attribution" />
-   <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
-</License>
-
-</rdf:RDF>
-
--->
-
-<% end %>
-
   <div class="contribution_currentlicense">
     <p>
       <% if contributable.respond_to?('versions') %>
@@ -127,7 +52,7 @@
       <% else %>
         This <%= visible_name(contributable) -%> is
       <% end %>
-      licensed under the <%= license_link contributable.license.to_s %>.
+      licensed under: <br/><br/><%= license_icon_link(@license) %>
     </p>
   </div>
 	

Modified: branches/event_logging/app/views/packs/show.rhtml (2235 => 2236)


--- branches/event_logging/app/views/packs/show.rhtml	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/views/packs/show.rhtml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -165,7 +165,7 @@
 			
 			<% 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 } , Conf.news.["cache_timeout"].seconds.from_now ) do -%>
+				<% cache_timeout({ :controller => 'news', :action ="" 'pack', :id => @pack.id, :viewer => viewer_id } , Conf.news["cache_timeout"].seconds.from_now ) do -%>
 				  <%= render :partial => "layouts/news", :locals => { :collection => news(@pack, true, Time.now, Time.now-Conf.news["contributable_news"]["timeframe"].days, Conf.news["contributable_news"]["count"], current_user) } %>
 	      <% end -%>
 			<% end %>

Modified: branches/event_logging/app/views/search/show.rhtml (2235 => 2236)


--- branches/event_logging/app/views/search/show.rhtml	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/views/search/show.rhtml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -2,13 +2,8 @@
 
 <%= render :partial => 'extra_search_help' %>
 
-<h1>Search Results</h1>
+<h1>Search results for "<%= h @query -%>"</h1>
 
-<p class="box_standout" style="font-size: 108%; margin-bottom: 1em;">
-  <b>Search keywords: </b>
-  <%= h @query -%>
-</p>
-
 <% if @total_count == 0 %>
 
   <p class="none_text">No search results.</p>
@@ -21,10 +16,22 @@
   <div id="tabsContainer" class="tabsContainer"></div>
 
   <% @infos.each do |info| %>
+
+    <% name  = visible_name(info[:model]).pluralize
+       count = info[:results].length
+       total = info[:total_count] -%>
+
     <div class="tabContainer">
-      <div class="tabTitle"><%= visible_name(info[:model]).pluralize %> (<%= info[:results].length -%><% if info[:results].length < info[:total_count] %> of <%= info[:total_count ] -%><% end %>)</div>
+      <div class="tabTitle"><%= name %> (<%= count -%><% if count < total %> of <%= total -%><% end %>)</div>
       <div class="tabContent">
-          <%= render :partial => "#{info[:model].to_s.underscore.pluralize}/table", :locals => { :collection => info[:results], :query => @query } %>
+
+        <% if count < total %>
+          <p class="box_standout" style="font-size: 108%; margin-bottom: 1em; margin-top: 0.6em;"><b>
+            There are more results than shown here.  <a href="" search_path + "?type=#{info[:search_type]}&query=" + params[:query] -%>">See all <%= name %> results</a> for this query.
+          </b></p>
+        <% end %>
+
+        <%= render :partial => "#{info[:model].to_s.underscore.pluralize}/table", :locals => { :collection => info[:results], :query => @query } %>
       </div>
     </div>
   <% end %>

Modified: branches/event_logging/app/views/workflows/_license_form.rhtml (2235 => 2236)


--- branches/event_logging/app/views/workflows/_license_form.rhtml	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/views/workflows/_license_form.rhtml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -1,90 +1,42 @@
-<% if params[:workflow] && !params[:workflow][:license].blank? %>
-	<% license = params[:workflow][:license] %>
+<% if params[:workflow] && !params[:workflow][:license_id].blank? %>
+	<% @license = License.find(params[:workflow][:license_id]) %>
 <% elsif edit %>
-	<% license = @workflow.license %>
+	<% @license = License.find(@workflow.license_id) %>
 <% else %>
- 	<% license = 'by-sa' %> 
+    <% @license = License.find(2) %>
 <% end %>
 
 <div class="fold">
     <div class="foldTitle">
-        <%= info_icon_with_tooltip("This section allows you to specify the <strong>rights</strong> that people have when they download and use this Workflow, by setting the license. <br/><br/>By default, the license specifies that people are allowed to build on this Workflow as long as they give the original author credit and share their resulting work under the same conditions.") %>
-        License/Rights
-		<% if edit %>
-			<hr />
-			<small>Current: <%= license_link(license) %></small>
-		<% else %>
-			<hr />
-			<small>Default: people are allowed to build on this Workflow, but must give author(s) credit and give attribution to this Workflow. They must also share under the same conditions. (<%= license_link license %>)</small>
-		<% end %>
+      <%= info_icon_with_tooltip("This section allows you to specify the <strong>rights</strong> that people have when they download and use this File, by setting the license. <br/><br/>By default, the license specifies that people are allowed to build on this File as long as they give the original author credit and share their resulting work under the same conditions.") %>
+      License/Rights
+			<% if edit %>
+				<hr />
+				<small>Current: <%= @license.title %> (<%= link_to h(@license.url), @license.url %>) </small>
+			<% else %>
+				<hr />
+				<small>Default: <%= @license.title %> (<%= link_to h(@license.url), @license.url %>)</small>
+			<% end %>
     </div>
     <div class="foldContent" style="display: none;">
         <p class="box_infotext">
-            This section allows you to specify the <strong>rights</strong> that people have when they download and use this Workflow, by setting the license.
+            This section allows you to specify the <strong>rights</strong> that people have when they download and use this File, by setting the license.
         </p>
         <br />
         <p>
-            <strong>What license do you want people to adhere to if they download and use this Workflow?</strong>
+            <strong>What license do you want people to adhere to if they download and use this File?</strong>
         </p>
         <div style="padding-left: 1em;">
-            <div style="padding: 0.5em; border: 1px dotted #999999; margin: 1.5em 3em; text-align: center;">
-                <p style="text-align: center;">
-                    <img alt="Science Commons" src="" /></p>
-                <p style="text-align: center;">
-                    Below you can configure what rights people will have with this Workflow, based on
-                    the <a href="" Commons</a>
-                    licenses. Sharing Workflows and letting others build upon them is a useful contribution
-                    and is highly recommended.</p>
-            </div>
-            <p>
-                When someone downloads this Workflow, are they allowed to build upon it (such as
-                extend, reuse, repurpose etc)?
-						</p>
-            <table style="border-collapse: collapse; border-spacing: 0;">
-            	<tbody>
-            		<tr>
-						<td style="vertical-align: top; text-align: center;">
-			                <input id="workflow_license_bysa" <%= 'checked="checked"' if (license == 'by-sa') %> name="workflow[license]" type="radio" value="by-sa"/>
-						</td>
-						<td style="vertical-align: top; text-align: left;">
-			                <p style="padding: 0; margin: 0;">
-			                	<label for="" as long as they <strong>give the author(s) credit</strong> and <strong>give attribution to this Workflow</strong>. 
-								They must also <strong>share</strong> the resulting work <strong>under the same conditions</strong>.</label>
-								<br/>
-								- <%= license_link "by-sa" %>
-							</p>
-						</td>
-            		</tr>
-					<tr>
-						<td style="vertical-align: top; text-align: center;">
-                			<input id="workflow_license_by" <%= 'checked="checked"' if (license == 'by') %> name="workflow[license]" type="radio" value="by"/>
-						</td>
-						<td style="vertical-align: top; text-align: left;">	
-            				<p style="padding: 0; margin: 0;"><label for=""
-            					Yes, as long as they <strong>give the author(s) credit</strong> and <strong>give attribution to this Workflow</strong>.
-										</label>
-								<br/>
-								- <%= license_link "by" %>
-							</p>
-						</td>
-            		</tr>
-					<tr>
-						<td style="vertical-align: top; text-align: center;">
-                			<input id="workflow_license_bynd" <%= 'checked="checked"' if (license == 'by-nd') %> name="workflow[license]" type="radio" value="by-nd"/>
-						</td>
-						<td style="vertical-align: top; text-align: left;">
-            				<p style="padding: 0; margin: 0;"><label for=""
-								No. They may only use the Workflow for reference.
-								    </label>
-								<br/>
-								- <%= license_link "by-nd" %>
-							</p>
-						</td>
-            		</tr>
-            	</tbody>
-        	</table>
-                <small>Nothing in these licenses impairs or restricts the author's moral rights.</small></p>
+        
+        <%= collection_select(:workflow, :license_id, License.find(:all), :id, :title, {}, 
+              {: remote_function(:update => 'license_info',
+               :url ="" {:controller => 'licenses', :action="" 'update_license_info' },
+               :with => "'license_id=' + escape(value)")}) %>
         </div>
+        <hr/>
+        <div id="license_info" style="padding: 0 20px;">
+          <%= render :partial => "licenses/view", :locals => { :license => @license } %>
+		</div>
     </div>
 </div>
                 

Modified: branches/event_logging/app/views/workflows/_table.rhtml (2235 => 2236)


--- branches/event_logging/app/views/workflows/_table.rhtml	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/app/views/workflows/_table.rhtml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -68,7 +68,7 @@
 					  	</p>
 					  <% end %>
 						
-						<p style="font-size:85%;"><b>License: </b><%= license_link workflow.license.to_s %></p>
+						<p style="font-size:85%;"><b>License: </b><% @license = License.find(workflow.license_id) %><%= link_to h(@license.url), license_path(@license) %></p>
 					  
 						<table style="width: 99%;">
 							<tbody>

Modified: branches/event_logging/config/default_settings.yml (2235 => 2236)


--- branches/event_logging/config/default_settings.yml	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/config/default_settings.yml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -1,4 +1,4 @@
-# myExperiment: config/settings.yml.pre
+# myExperiment: config/default_settings.yml
 #
 # Copyright (c) 2009 University of Manchester and the University of Southampton.
 # See license.txt for details.

Modified: branches/event_logging/config/routes.rb (2235 => 2236)


--- branches/event_logging/config/routes.rb	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/config/routes.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -219,6 +219,9 @@
   map.home_latest_comments_rss 'home/latest_comments.rss', :controller => 'home', :action ="" 'latest_comments_rss', :format => 'rss'
   map.home_latest_reviews_rss 'home/latest_reviews.rss', :controller => 'home', :action ="" 'latest_reviews_rss', :format => 'rss'
 
+  map.resources :licenses
+  map.resources :license_attributes
+
   # Install the default route as the lowest priority.
   map.connect ':controller/:action/:id'
 end

Modified: branches/event_logging/config/tables.xml


(Binary files differ)

Modified: branches/event_logging/db/migrate/076_create_content_types.rb (2235 => 2236)


--- branches/event_logging/db/migrate/076_create_content_types.rb	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/db/migrate/076_create_content_types.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -22,11 +22,16 @@
     # Create ContentType records for workflows with processors
 
     u = User.find_by_username(Conf.admins.first)
+    if (u.blank?)
+    	uid = 1
+    else
+    	uid = u.id
+    end
 
-    taverna_1 = ContentType.create(:title => 'Taverna 1',         :mime_type => 'application/vnd.taverna.scufl+xml',  :user => u)
-    taverna_2 = ContentType.create(:title => 'Taverna 2 beta',    :mime_type => 'application/vnd.taverna.t2flow+xml', :user => u)
-    trident_x = ContentType.create(:title => 'Trident (XOML)',    :mime_type => 'application/xaml+xml',               :user => u)
-    trident_p = ContentType.create(:title => 'Trident (Package)', :mime_type => 'application/octet-stream',           :user => u)
+    taverna_1 = ContentType.create(:title => 'Taverna 1',         :mime_type => 'application/vnd.taverna.scufl+xml',  :user_id => uid)
+    taverna_2 = ContentType.create(:title => 'Taverna 2 beta',    :mime_type => 'application/vnd.taverna.t2flow+xml', :user_id => uid)
+    trident_x = ContentType.create(:title => 'Trident (XOML)',    :mime_type => 'application/xaml+xml',               :user_id => uid)
+    trident_p = ContentType.create(:title => 'Trident (Package)', :mime_type => 'application/octet-stream',           :user_id => uid)
 
     # Create ContentType entries for the existing workflows
 
@@ -57,7 +62,7 @@
         next
       end
 
-      ft = ContentType.create(:user_id => u.id, :title => entry, :mime_type => 'application/octet-stream')
+      ft = ContentType.create(:user_id => uid, :title => entry, :mime_type => 'application/octet-stream')
 
       workflow_type_to_content_type_id[entry] = ft.id
     end
@@ -69,7 +74,7 @@
     Blob.find(:all).map do |b|
       b.attributes["content_type"].strip end.uniq.each do |entry|
       if !blob_type_to_content_type_id[entry]
-        ft = ContentType.create(:user_id => u.id, :mime_type => entry, :title => entry)
+        ft = ContentType.create(:user_id => uid, :mime_type => entry, :title => entry)
 
         blob_type_to_content_type_id[entry] = ft.id
       end

Copied: branches/event_logging/db/migrate/077_create_licenses.rb (from rev 2234, trunk/db/migrate/077_create_licenses.rb) (0 => 2236)


--- branches/event_logging/db/migrate/077_create_licenses.rb	                        (rev 0)
+++ branches/event_logging/db/migrate/077_create_licenses.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,229 @@
+class CreateLicenses < ActiveRecord::Migration
+  def self.up
+    create_table :licenses do |t|
+      t.column :user_id, :integer
+      t.column :unique_name, :string
+      t.column :title, :string
+      t.column :description, :text
+      t.column :description_html, :text
+      t.column :url, :string
+      t.column :created_at, :datetime
+      t.column :updated_at, :datetime
+    end
+    u = User.find_by_username(Conf.admins.first)
+    if (u.blank?)
+        uid = 1
+    else
+        uid=u.id
+    end
+  
+  #by-nd
+  License.create(:user_id => uid, :unique_name => 'by-nd', :title => 'Creative Commons Attribution-No Derivative Works 3.0 Unported License', :description => "<h4>You are free:</h4>
+<ul>
+  <li>to Share &mdash; to copy, distribute and transmit the work</li>
+</ul>
+<h4>Under the following conditions:</h4>
+<ul>
+  <li>Attribution &mdash; You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).</li>
+  <li>No Derivative Works &mdash; You may not alter, transform, or build upon this work.</li>
+</ul>
+<h4>With the understanding that:</h4>
+<ul>
+  <li>Waiver &mdash; Any of the above conditions can be waived if you get permission from the copyright holder.</li>
+  <li>Other Rights &mdash; In no way are any of the following rights affected by the license:
+    <ul>
+      <li>Your fair dealing or fair use rights;</li>
+      <li>The author's moral rights;</li>
+      <li>Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.</li>
+    </ul>
+  </li>
+  <li>Notice &mdash; For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to <a href=''>http://creativecommons.org/licenses/by-nd/3.0/</a>.</li>
+</ul>", :url ="" 'http://creativecommons.org/licenses/by-nd/3.0/')
+ 
+ #by-sa
+ License.create(:user_id => uid, :unique_name => 'by-sa', :title => 'Creative Commons Attribution-Share Alike 3.0 Unported License', :description => "<h4>You are free:</h4>
+<ul>
+  <li>to Share &mdash; to copy, distribute and transmit the work</li>
+  <li>to Remix &mdash; to adapt the work</li>
+</ul>
+<h4>Under the following conditions:</h4>
+<ul>
+  <li>Attribution &mdash; You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).</li>
+  <li>Share Alike &mdash; If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license.</li>
+</ul>
+
+<h4>With the understanding that:</h4>
+<ul>
+  <li>Waiver &mdash; Any of the above conditions can be waived if you get permission from the copyright holder.</li>
+  <li>Other Rights &mdash; In no way are any of the following rights affected by the license:
+    <ul>
+      <li>Your fair dealing or fair use rights;</li>
+      <li>The author's moral rights;</li>
+      <li>Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.</li>
+    </ul>
+  </li>
+  <li>Notice &mdash; For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to <a href=''>http://creativecommons.org/licenses/by-sa/3.0/</a>.</li>
+</ul>", :url ="" 'http://creativecommons.org/licenses/by-sa/3.0/')
+
+#by
+ License.create(:user_id => uid, :unique_name => 'by', :title => 'Creative Commons Attribution 3.0 Unported License', :description => "<h4>You are free:</h4>
+<ul>
+  <li>to Share &mdash; to copy, distribute and transmit the work</li>
+  <li>to Remix &mdash; to adapt the work</li>
+</ul>
+<h4>Under the following conditions:</h4>
+<ul>
+  <li>Attribution &mdash; You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).</li>
+</ul>
+<h4>With the understanding that:</h4>
+<ul>
+  <li>Waiver &mdash; Any of the above conditions can be waived if you get permission from the copyright holder.</li>
+  <li>Other Rights &mdash; In no way are any of the following rights affected by the license:
+    <ul>
+      <li>Your fair dealing or fair use rights;</li>
+      <li>The author's moral rights;</li>
+      <li>Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.</li>
+    </ul>
+  </li>
+  <li>Notice &mdash; For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to <a href=''>http://creativecommons.org/licenses/by/3.0/</a>.</li>
+</ul>", :url ="" 'http://creativecommons.org/licenses/by/3.0/')
+
+
+#by-nc-nd
+ License.create(:user_id => uid, :unique_name => 'by-nc-nd', :title => 'Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License', :description => "<h4>You are free:</h4>
+<ul>
+  <li>to Share &mdash; to copy, distribute and transmit the work</li>
+</ul>
+<h4>Under the following conditions:</h4>
+<ul>
+  <li>Attribution &mdash; You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).</li>
+  <li>Noncommercial &mdash; You may not use this work for commercial purposes.</li>
+  <li>No Derivative Works &mdash; You may not alter, transform, or build upon this work.</li>
+</ul>
+<h4>With the understanding that:</h4>
+<ul>
+  <li>Waiver &mdash; Any of the above conditions can be waived if you get permission from the copyright holder.</li>
+  <li>Other Rights &mdash; In no way are any of the following rights affected by the license:
+    <ul>
+      <li>Your fair dealing or fair use rights;</li>
+      <li>The author's moral rights;</li>
+      <li>Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.</li>
+    </ul>
+  </li>
+  <li>Notice &mdash; For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to <a href=''>http://creativecommons.org/licenses/by-nc-nd/3.0/</a>.</li>
+</ul>", :url ="" 'http://creativecommons.org/licenses/by-nc-nd/3.0/')
+
+#by-nc
+ License.create(:user_id => uid, :unique_name => 'by-nc', :title => 'Creative Commons Attribution-Noncommercial 3.0 Unported License', :description => "<h4>You are free:</h4>
+<ul>
+  <li>to Share &mdash; to copy, distribute and transmit the work</li>
+  <li>to Remix &mdash; to adapt the work</li>
+</ul>
+<h4>Under the following conditions:</h4>
+<ul>
+  <li>Attribution &mdash; You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).</li>
+  <li>Noncommercial &mdash; You may not use this work for commercial purposes.</li>
+</ul>
+<h4>With the understanding that:</h4>
+<ul>
+  <li>Waiver &mdash; Any of the above conditions can be waived if you get permission from the copyright holder.</li>
+  <li>Other Rights &mdash; In no way are any of the following rights affected by the license:
+    <ul>
+      <li>Your fair dealing or fair use rights;</li>
+      <li>The author's moral rights;</li>
+      <li>Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.</li>
+    </ul>
+  </li>
+  <li>Notice &mdash; For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to <a href=''>http://creativecommons.org/licenses/by-nc/3.0/</a>.</li>
+</ul>", :url ="" 'http://creativecommons.org/licenses/by-nc/3.0/')
+
+#by-nc-sa
+License.create(:user_id => uid, :unique_name => 'by-nc-sa', :title => 'Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License', :description => "<h4>You are free:</h4>
+<ul>
+  <li>to Share &mdash; to copy, distribute and transmit the work</li>
+  <li>to Remix &mdash; to adapt the work</li>
+</ul>  
+<h4>Under the following conditions:</h4>
+<ul>
+  <li>Attribution &mdash; You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).</li>
+  <li>Noncommercial &mdash; You may not use this work for commercial purposes.</li>
+  <li>Share Alike &mdash; If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.</li>
+</ul>
+<h4>With the understanding that:</h4>
+<ul>
+  <li>Waiver &mdash; Any of the above conditions can be waived if you get permission from the copyright holder.</li>
+  <li>Other Rights &mdash; In no way are any of the following rights affected by the license:
+    <ul>
+      <li>Your fair dealing or fair use rights;</li>
+      <li>The author's moral rights;</li>
+      <li>Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.</li>
+    </ul>
+  </li>
+  <li>Notice &mdash; For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to <a href=''>http://creativecommons.org/licenses/by-nc-sa/3.0/</a>.</li>
+</ul>", :url ="" 'http://creativecommons.org/licenses/by-nc-sa/3.0/')
+
+#MIT
+License.create(:user_id => uid, :unique_name => 'MIT', :title => 'MIT License', :description => "<h4>You are free:</h4>
+<ul>
+  <li>to Share &mdash; to copy, distribute and transmit the work</li>
+  <li>to Remix &mdash; to adapt the work</li>
+</ul>
+<h4>Under the following conditions:</h4>
+<ul>
+  <li>The copyright notice and license shall be included in all copies or substantial portions of the software.</li>
+  <li>Any of the above conditions can be waived if you get permission from the copyright holder.</li>
+</ul>", :url ="" 'http://creativecommons.org/licenses/MIT/')
+
+#BSD
+License.create(:user_id => uid, :unique_name => 'BSD', :title => 'BSD License', :description => "<h4>You are free:</h4>
+<ul>
+  <li>to Share &mdash; to copy, distribute and transmit the work</li>
+  <li>to Remix &mdash; to adapt the work</li>
+</ul>
+<h4>Under the following conditions:</h4>
+<ul>
+  <li>No Endorsement. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.</li>
+  <li>You must retain the license terms and copyright notice in any source code distribution and reproduce them in documentation for binary distributions.</li>
+  <li>Any of the above conditions can be waived if you get permission from the copyright holder.</li>
+</ul>", :url ="" 'http://creativecommons.org/licenses/BSD/')
+
+#GPL
+License.create(:user_id => uid, :unique_name => 'GPL', :title => 'GNU General Public License (GPL) 2.0', :description => "<p>The GNU General Public License is a Free Software license. Like any Free Software license, it grants to you the four following freedoms:</p>
+<ol>
+  <li>The freedom to run the program for any purpose.</li>
+  <li>The freedom to study how the program works and adapt it to your needs.</li>
+  <li>The freedom to redistribute copies so you can help your neighbor.</li>
+  <li>The freedom to improve the program and release your improvements to the public, so that the whole community benefits.</li>
+</ol>
+<p>You may exercise the freedoms specified here provided that you comply with the express conditions of this license. The principal conditions are:</p>
+<ul>
+  <li>You must conspicuously and appropriately publish on each copy distributed an appropriate copyright notice and disclaimer of warranty and keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of the GNU General Public License along with the Program. Any translation of the GNU General Public License must be accompanied by the GNU General Public License.</li>
+  <li>If you modify your copy or copies of the program or any portion of it, or develop a program based upon it, you may distribute the resulting work provided you do so under the GNU General Public License. Any translation of the GNU General Public License must be accompanied by the GNU General Public License.</li>
+  <li>If you copy or distribute the program, you must accompany it with the complete corresponding machine-readable source code or with a written offer, valid for at least three years, to furnish the complete corresponding machine-readable source code.</li>
+</ul>
+<p>Any of the above conditions can be waived if you get permission from the copyright holder.</p>", :url ="" 'http://creativecommons.org/licenses/GPL/2.0/')
+
+#LGPL
+License.create(:user_id => uid, :unique_name => 'LGPL', :title => 'GNU Lesser General Public License (LGPL) 2.1', :description => "<p>The GNU Lesser General Public License is a Free Software license. Like any Free Software license, it grants to you the four following freedoms:</p>
+<ol>
+  <li>The freedom to run the program for any purpose.</li>
+  <li>The freedom to study how the program works and adapt it to your needs.</li>
+  <li>The freedom to redistribute copies so you can help your neighbor.</li>
+  <li>The freedom to improve the program and release your improvements to the public, so that the whole community benefits.</li>
+</ol>
+<p>You may exercise the freedoms specified here provided that you comply with the express conditions of this license. The LGPL is intended for software libraries, rather than executable programs. The principal conditions are:<p>
+<ul>
+  <li>You must conspicuously and appropriately publish on each copy distributed an appropriate copyright notice and disclaimer of warranty and keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of the GNU Lesser General Public License along with the Program. Any translation of the GNU Lesser General Public License must be accompanied by the GNU Lesser General Public License.</li>
+  <li>If you modify your copy or copies of the library or any portion of it, you may distribute the resulting library provided you do so under the GNU Lesser General Public License. However, programs that link to the library may be licensed under terms of your choice, so long as the library itself can be changed. Any translation of the GNU Lesser General Public License must be accompanied by the GNU Lesser General Public License.</li>
+  <li>If you copy or distribute the program, you must accompany it with the complete corresponding machine-readable source code or with a written offer, valid for at least three years, to furnish the complete corresponding machine-readable source code.</li>
+</ul>
+<p>Any of the above conditions can be waived if you get permission from the copyright holder.</p>", :url ="" 'http://creativecommons.org/licenses/LGPL/2.1/')
+  
+ #Apache
+ License.create(:user_id => uid, :unique_name => 'Apache', :title => 'Apache License v2.0', :description => "<p>See <a href=''>http://www.apache.org/licenses/LICENSE-2.0</a></p>", :url ="" "http://www.apache.org/licenses/LICENSE-2.0")
+ end
+ 
+ def self.down
+    drop_table :licenses
+  end
+end

Copied: branches/event_logging/db/migrate/078_create_license_options.rb (from rev 2234, trunk/db/migrate/078_create_license_options.rb) (0 => 2236)


--- branches/event_logging/db/migrate/078_create_license_options.rb	                        (rev 0)
+++ branches/event_logging/db/migrate/078_create_license_options.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,37 @@
+class CreateLicenseOptions < ActiveRecord::Migration
+  def self.up
+    create_table :license_options do |t|
+      t.column :user_id, :integer
+      t.column :title, :string
+      t.column :description, :text
+      t.column :description_html, :text
+      t.column :uri, :string
+      t.column :predicate, :string
+      t.column :created_at, :datetime
+      t.column :updated_at, :datetime
+    end
+    u = User.find_by_username(Conf.admins.first)
+    if (u.blank?)
+        uid = 1
+    else
+        uid = u.id
+    end
+
+    LicenseOption.create(:user_id => uid, :title => 'Permits Reproduction', :description => 'Permits making multiple copies', :uri => 'http://creativecommons.org/ns#Reproduction', :predicate => 'permits')
+    LicenseOption.create(:user_id => uid, :title => 'Permits Distribution', :description => 'Permits distribution, public display, and publicly performance', :uri => 'http://creativecommons.org/ns#Distribution', :predicate => 'permits')
+    LicenseOption.create(:user_id => uid, :title => 'Permits Derivative Works', :description => 'Permits distribution of derivative works', :uri => 'http://creativecommons.org/ns#DerivativeWorks', :predicate => 'permits')
+    LicenseOption.create(:user_id => uid, :title => 'Permits High Income Nation Use', :description => 'Permits use in a non-developing country', :uri => 'http://creativecommons.org/ns#HighIncomeNationUse', :predicate => 'permits')
+    LicenseOption.create(:user_id => uid, :title => 'Permits Sharing', :description => 'Permits commercial derivatives, but only non-commercial distribution', :uri => 'http://creativecommons.org/ns#Sharing', :predicate => 'permits')
+    LicenseOption.create(:user_id => uid, :title => 'Requires Notice', :description => 'Requries copyright and license notices be kept intact', :uri => 'http://creativecommons.org/ns#Notice', :predicate => 'requires')
+    LicenseOption.create(:user_id => uid, :title => 'Requires Attribution', :description => 'Requires credit be given to copyright holder and/or author', :uri => 'http://creativecommons.org/ns#Attribution', :predicate => 'requires')
+    LicenseOption.create(:user_id => uid, :title => 'Requires Share Alike', :description => 'Requires derivative works be licensed under the same terms or compatible terms as the original work', :uri => 'http://creativecommons.org/ns#ShareAlike', :predicate => 'requires')
+    LicenseOption.create(:user_id => uid, :title => 'Requires Source Code', :description => 'Requires source code (the preferred form for making modifications) must be provided when exercising some rights granted by the license.', :uri => 'http://creativecommons.org/ns#SourceCode', :predicate => 'requires')
+    LicenseOption.create(:user_id => uid, :title => 'Requires Copyleft', :description => 'Requires derivative and combined works must be licensed under specified terms, similar to those on the original work', :uri => 'http://creativecommons.org/ns#Copyleft', :predicate => 'requires')
+    LicenseOption.create(:user_id => uid, :title => 'Requires Lesser Copyleft', :description => 'Requires derivative works must be licensed under specified terms, with at least the same conditions as the original work; combinations with the work may be licensed under different terms', :uri => 'http://creativecommons.org/ns#LesserCopyleft', :predicate => 'requires')
+    LicenseOption.create(:user_id => uid, :title => 'Prohibits Commercial User', :description => 'Prohibits exercising rights for commercial purposes', :uri => 'http://creativecommons.org/ns#CommercialUse', :predicate => 'prohibits')
+  end
+
+  def self.down
+    drop_table :license_options
+  end
+end

Copied: branches/event_logging/db/migrate/079_create_license_attributes.rb (from rev 2234, trunk/db/migrate/079_create_license_attributes.rb) (0 => 2236)


--- branches/event_logging/db/migrate/079_create_license_attributes.rb	                        (rev 0)
+++ branches/event_logging/db/migrate/079_create_license_attributes.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,97 @@
+class CreateLicenseAttributes < ActiveRecord::Migration
+  def self.up
+    create_table :license_attributes do |t|
+      t.column :license_id, :integer
+      t.column :license_option_id, :integer
+      t.column :created_at, :datetime
+    end
+    reproduction = LicenseOption.find(:first,:conditions=>['title = ?','Permits Reproduction'])
+    distribution = LicenseOption.find(:first,:conditions=>['title = ?','Permits Distribution'])
+    derivs = LicenseOption.find(:first,:conditions=>['title = ?','Permits Derivative Works'])
+    notice = LicenseOption.find(:first,:conditions=>['title = ?','Requires Notice'])
+    attribution = LicenseOption.find(:first,:conditions=>['title = ?','Requires Attribution'])
+    sharealike = LicenseOption.find(:first,:conditions=>['title = ?','Requires Share Alike'])
+    sourcecode = LicenseOption.find(:first,:conditions=>['title = ?','Requires Source Code'])
+    commercial = LicenseOption.find(:first,:conditions=>['title = ?','Prohibits Commercial Use'])
+    
+    #by-nd
+    lic = License.find(:first,:conditions=>['unique_name = ?','by-nd'])
+    LicenseAttribute.create(:license => lic, :license_option => reproduction )
+    LicenseAttribute.create(:license => lic, :license_option => distribution )
+    LicenseAttribute.create(:license => lic, :license_option => notice )
+    LicenseAttribute.create(:license => lic, :license_option => attribution )
+    lic.save
+    
+    #by-sa
+    lic = License.find(:first,:conditions=>['unique_name = ?','by-sa'])
+    LicenseAttribute.create(:license => lic, :license_option => reproduction )
+    LicenseAttribute.create(:license => lic, :license_option => distribution )
+    LicenseAttribute.create(:license => lic, :license_option => notice )
+    LicenseAttribute.create(:license => lic, :license_option => attribution )
+    LicenseAttribute.create(:license => lic, :license_option => derivs )
+    LicenseAttribute.create(:license => lic, :license_option => sharealike )
+    lic.save
+
+    #by
+    lic = License.find(:first,:conditions=>['unique_name = ?','by'])
+    LicenseAttribute.create(:license => lic, :license_option => reproduction )
+    LicenseAttribute.create(:license => lic, :license_option => distribution )
+    LicenseAttribute.create(:license => lic, :license_option => notice )
+    LicenseAttribute.create(:license => lic, :license_option => attribution )
+    LicenseAttribute.create(:license => lic, :license_option => derivs )
+    lic.save
+    
+    #by-nc-nd
+    lic = License.find(:first,:conditions=>['unique_name = ?','by-nc-nd'])
+    LicenseAttribute.create(:license => lic, :license_option => reproduction )
+    LicenseAttribute.create(:license => lic, :license_option => distribution )
+    LicenseAttribute.create(:license => lic, :license_option => notice )
+    LicenseAttribute.create(:license => lic, :license_option => attribution )
+    LicenseAttribute.create(:license => lic, :license_option => commercial )
+    lic.save
+
+    #by-nc
+    lic = License.find(:first,:conditions=>['unique_name = ?','by-nc'])
+    LicenseAttribute.create(:license => lic, :license_option => reproduction )
+    LicenseAttribute.create(:license => lic, :license_option => distribution )
+    LicenseAttribute.create(:license => lic, :license_option => notice )
+    LicenseAttribute.create(:license => lic, :license_option => attribution )
+    LicenseAttribute.create(:license => lic, :license_option => commercial )
+    LicenseAttribute.create(:license => lic, :license_option => derivs )
+    lic.save
+    
+    #by-nc-sa
+    lic = License.find(:first,:conditions=>['unique_name = ?','by-nc-sa'])
+    LicenseAttribute.create(:license => lic, :license_option => reproduction )
+    LicenseAttribute.create(:license => lic, :license_option => distribution )
+    LicenseAttribute.create(:license => lic, :license_option => notice )
+    LicenseAttribute.create(:license => lic, :license_option => attribution )
+    LicenseAttribute.create(:license => lic, :license_option => commercial )
+    LicenseAttribute.create(:license => lic, :license_option => derivs )
+    LicenseAttribute.create(:license => lic, :license_option => sharealike )
+    lic.save
+    
+    #MIT
+    lic = License.find(:first,:conditions=>['unique_name = ?','MIT'])
+    LicenseAttribute.create(:license => lic, :license_option => reproduction )
+    LicenseAttribute.create(:license => lic, :license_option => distribution )
+    LicenseAttribute.create(:license => lic, :license_option => notice )
+    LicenseAttribute.create(:license => lic, :license_option => sourcecode )
+    LicenseAttribute.create(:license => lic, :license_option => derivs )
+    lic.save
+
+    #BSD
+    lic = License.find(:first,:conditions=>['unique_name = ?','BSD'])
+    LicenseAttribute.create(:license => lic, :license_option => reproduction )
+    LicenseAttribute.create(:license => lic, :license_option => distribution )
+    LicenseAttribute.create(:license => lic, :license_option => notice )
+    LicenseAttribute.create(:license => lic, :license_option => sourcecode )
+    LicenseAttribute.create(:license => lic, :license_option => derivs )
+    lic.save
+    
+  end
+
+  def self.down
+    drop_table :license_attributes
+  end
+end

Copied: branches/event_logging/db/migrate/080_add_license_id_to_workflows_and_blobs.rb (from rev 2234, trunk/db/migrate/080_add_license_id_to_workflows_and_blobs.rb) (0 => 2236)


--- branches/event_logging/db/migrate/080_add_license_id_to_workflows_and_blobs.rb	                        (rev 0)
+++ branches/event_logging/db/migrate/080_add_license_id_to_workflows_and_blobs.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,37 @@
+class AddLicenseIdToWorkflowsAndBlobs < ActiveRecord::Migration
+  def self.up
+    #Need to rename columns so that license method and license field do not get confused
+    rename_column :workflows, :license, :license_name
+    rename_column :blobs, :license, :license_name
+    
+    add_column :workflows, :license_id, :integer, :default => nil
+    add_column :blobs, :license_id, :integer, :default => nil
+    
+    Workflow.find(:all).each do |w|
+      execute("UPDATE workflows SET license_id = #{License.find(:first,:conditions=>[ 'unique_name = ?', w.license_name ]).id } WHERE id = #{w.id}")
+    end
+    Blob.find(:all).each do |b|
+      execute("UPDATE blobs SET license_id = #{License.find(:first,:conditions=>[ 'unique_name = ?', b.license_name ]).id } WHERE id = #{b.id}")
+    end 
+    remove_column :workflows, :license_name
+    remove_column :blobs, :license_name
+  end
+  
+  def self.down
+    add_column :workflows, :license, :string, 
+               :limit => 10, :null => false, 
+               :default => "by-sa"
+               
+    add_column :blobs, :license, :string, 
+               :limit => 10, :null => false, 
+               :default => "by-sa"
+    Workflow.find(:all).each do |w|
+      execute("UPDATE workflows SET license = '#{License.find(w.license_id).unique_name }' WHERE id = #{w.id}")
+    end
+    Blob.find(:all).each do |b|
+      execute("UPDATE blobs SET license = '#{License.find(b.license_id).unique_name }' WHERE id = #{b.id}")
+    end
+    remove_column :workflows, :license_id
+    remove_column :blobs, :license_id
+  end
+end
\ No newline at end of file

Modified: branches/event_logging/lib/rest.rb (2235 => 2236)


--- branches/event_logging/lib/rest.rb	2009-06-23 14:58:27 UTC (rev 2235)
+++ branches/event_logging/lib/rest.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -560,6 +560,7 @@
     when 'PackContributableEntry'; return rest_resource_uri(ob.contributable)
     when 'PackRemoteEntry';        return ob.uri
     when 'ContentType';            return nil
+    when 'License';                return license_url(ob)
 
     when 'Creditation';     return nil
     when 'Attribution';     return nil
@@ -600,6 +601,7 @@
     when 'PackRemoteEntry';        return "#{base}/external-pack-item.xml?id=#{ob.id}"
     when 'Tagging';                return "#{base}/tagging.xml?id=#{ob.id}"
     when 'ContentType';            return "#{base}/type.xml?id=#{ob.id}"
+    when 'License';                return "#{base}/license.xml?id=#{ob.id}"
 
     when 'Creditation';     return "#{base}/credit.xml?id=#{ob.id}"
     when 'Attribution';     return nil
@@ -632,6 +634,7 @@
     when 'Comment';                return 'comment'
     when 'Bookmark';               return 'favourite'
     when 'ContentType';            return 'type'
+    when 'License';                return 'license'
   end
 
   return 'object'
@@ -657,6 +660,7 @@
     when 'PackRemoteEntry';        return ob.title     
     when 'Workflow::Version';      return ob.title
     when 'ContentType';            return ob.title
+    when 'License';                return ob.title
   end
 
   return ''
@@ -863,8 +867,16 @@
 
     ob.title        = title        if title
     ob.body         = description  if description
-    ob.license      = license_type if license_type
+    #ob.license_id   = License.find_by_unique_name(license_type) if license_type
 
+    if license_type
+      ob.license = License.find_by_unique_name(license_type)
+      if ob.license.nil?
+        ob.errors.add("License type")
+        return rest_response(400, :object => ob)
+      end
+    end
+   
     # handle workflow type
 
     if type

Copied: branches/event_logging/public/images/GPL.png (from rev 2234, trunk/public/images/GPL.png)


(Binary files differ)

Copied: branches/event_logging/public/images/LGPL.png (from rev 2234, trunk/public/images/LGPL.png)


(Binary files differ)

Copied: branches/event_logging/public/images/by-nc-nd.png (from rev 2234, trunk/public/images/by-nc-nd.png)


(Binary files differ)

Copied: branches/event_logging/public/images/by-nc-sa.png (from rev 2234, trunk/public/images/by-nc-sa.png)


(Binary files differ)

Copied: branches/event_logging/public/images/by-nc.png (from rev 2234, trunk/public/images/by-nc.png)


(Binary files differ)

Copied: branches/event_logging/public/images/by-nd.png (from rev 2234, trunk/public/images/by-nd.png)


(Binary files differ)

Copied: branches/event_logging/public/images/by-sa.png (from rev 2234, trunk/public/images/by-sa.png)


(Binary files differ)

Copied: branches/event_logging/public/images/by.png (from rev 2234, trunk/public/images/by.png)


(Binary files differ)

Copied: branches/event_logging/test/fixtures/license_attributes.yml (from rev 2234, trunk/test/fixtures/license_attributes.yml) (0 => 2236)


--- branches/event_logging/test/fixtures/license_attributes.yml	                        (rev 0)
+++ branches/event_logging/test/fixtures/license_attributes.yml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,5 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+one:
+  id: 1
+two:
+  id: 2

Copied: branches/event_logging/test/fixtures/license_options.yml (from rev 2234, trunk/test/fixtures/license_options.yml) (0 => 2236)


--- branches/event_logging/test/fixtures/license_options.yml	                        (rev 0)
+++ branches/event_logging/test/fixtures/license_options.yml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,5 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+one:
+  id: 1
+two:
+  id: 2

Copied: branches/event_logging/test/fixtures/licenses.yml (from rev 2234, trunk/test/fixtures/licenses.yml) (0 => 2236)


--- branches/event_logging/test/fixtures/licenses.yml	                        (rev 0)
+++ branches/event_logging/test/fixtures/licenses.yml	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,5 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+one:
+  id: 1
+two:
+  id: 2

Copied: branches/event_logging/test/functional/license_attributes_controller_test.rb (from rev 2234, trunk/test/functional/license_attributes_controller_test.rb) (0 => 2236)


--- branches/event_logging/test/functional/license_attributes_controller_test.rb	                        (rev 0)
+++ branches/event_logging/test/functional/license_attributes_controller_test.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,18 @@
+require File.dirname(__FILE__) + '/../test_helper'
+require 'license_attributes_controller'
+
+# Re-raise errors caught by the controller.
+class LicenseAttributesController; def rescue_action(e) raise e end; end
+
+class LicenseAttributesControllerTest < Test::Unit::TestCase
+  def setup
+    @controller = LicenseAttributesController.new
+    @request    = ActionController::TestRequest.new
+    @response   = ActionController::TestResponse.new
+  end
+
+  # Replace this with your real tests.
+  def test_truth
+    assert true
+  end
+end

Copied: branches/event_logging/test/functional/license_controller_test.rb (from rev 2234, trunk/test/functional/license_controller_test.rb) (0 => 2236)


--- branches/event_logging/test/functional/license_controller_test.rb	                        (rev 0)
+++ branches/event_logging/test/functional/license_controller_test.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,18 @@
+require File.dirname(__FILE__) + '/../test_helper'
+require 'license_controller'
+
+# Re-raise errors caught by the controller.
+class LicenseController; def rescue_action(e) raise e end; end
+
+class LicenseControllerTest < Test::Unit::TestCase
+  def setup
+    @controller = LicenseController.new
+    @request    = ActionController::TestRequest.new
+    @response   = ActionController::TestResponse.new
+  end
+
+  # Replace this with your real tests.
+  def test_truth
+    assert true
+  end
+end

Copied: branches/event_logging/test/unit/license_attribute_test.rb (from rev 2234, trunk/test/unit/license_attribute_test.rb) (0 => 2236)


--- branches/event_logging/test/unit/license_attribute_test.rb	                        (rev 0)
+++ branches/event_logging/test/unit/license_attribute_test.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,10 @@
+require File.dirname(__FILE__) + '/../test_helper'
+
+class LicenseAttributeTest < Test::Unit::TestCase
+  fixtures :license_attributes
+
+  # Replace this with your real tests.
+  def test_truth
+    assert true
+  end
+end

Copied: branches/event_logging/test/unit/license_option_test.rb (from rev 2234, trunk/test/unit/license_option_test.rb) (0 => 2236)


--- branches/event_logging/test/unit/license_option_test.rb	                        (rev 0)
+++ branches/event_logging/test/unit/license_option_test.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,10 @@
+require File.dirname(__FILE__) + '/../test_helper'
+
+class LicenseOptionTest < Test::Unit::TestCase
+  fixtures :license_options
+
+  # Replace this with your real tests.
+  def test_truth
+    assert true
+  end
+end

Copied: branches/event_logging/test/unit/license_test.rb (from rev 2234, trunk/test/unit/license_test.rb) (0 => 2236)


--- branches/event_logging/test/unit/license_test.rb	                        (rev 0)
+++ branches/event_logging/test/unit/license_test.rb	2009-06-24 16:18:50 UTC (rev 2236)
@@ -0,0 +1,10 @@
+require File.dirname(__FILE__) + '/../test_helper'
+
+class LicenseTest < Test::Unit::TestCase
+  fixtures :licenses
+
+  # Replace this with your real tests.
+  def test_truth
+    assert true
+  end
+end

reply via email to

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