myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2467] branches/discovery: added curation events


From: noreply
Subject: [myexperiment-hackers] [2467] branches/discovery: added curation events
Date: Sun, 11 Jul 2010 02:15:59 -0400 (EDT)

Revision
2467
Author
dgc
Date
2010-07-11 02:15:59 -0400 (Sun, 11 Jul 2010)

Log Message

added curation events

Modified Paths

Diff

Modified: branches/discovery/app/controllers/application.rb (2466 => 2467)


--- branches/discovery/app/controllers/application.rb	2010-07-11 05:20:25 UTC (rev 2466)
+++ branches/discovery/app/controllers/application.rb	2010-07-11 06:15:59 UTC (rev 2467)
@@ -471,7 +471,7 @@
           :select    => 'tags.name, COUNT(DISTINCT contributions.contributable_type, contributions.contributable_id) AS count',
           :group     => 'tags.id',
           :order     => 'COUNT(DISTINCT contributions.contributable_type, contributions.contributable_id) DESC, tags.name',
-          :label     => 'x.name',
+          :label     => 'x.name.capitalize',
           :key       => 'tag',
           :value     => 'x.name'
         },
@@ -498,7 +498,7 @@
           :condition => 'contributions.license_id IS NOT NULL',
           :group     => 'licenses.unique_name',
           :order     => 'COUNT(DISTINCT contributions.contributable_type, contributions.contributable_id) DESC',
-          :label     => 'x.unique_name',
+          :label     => 'x.unique_name.capitalize',
           :key       => 'license',
           :value     => 'x.unique_name'
         },
@@ -516,6 +516,19 @@
           :value     => 'x.title'
         },
 
+        {
+          :option    => "curation_event",
+          :column    => "curation_events.category",
+          :joins     => [ :curation_events ],
+          :title     => "curation",
+          :select    => 'curation_events.category, COUNT(DISTINCT contributions.contributable_type, contributions.contributable_id) AS count',
+          :group     => 'curation_events.category',
+          :order     => 'COUNT(DISTINCT contributions.contributable_type, contributions.contributable_id) DESC',
+          :label     => 'x.category.capitalize',
+          :key       => 'curation_event',
+          :value     => 'x.category'
+        },
+
 #       {
 #         :option    => "attribution",
 #         :column    => "attribution_targets.label",
@@ -540,7 +553,8 @@
         :networks      => "INNER JOIN networks ON permissions.contributor_type = 'Network' AND permissions.contributor_id = networks.id",
         :attributions  => "INNER JOIN attributions ON attributor_type = contributions.contributable_type AND attributor_id = contributions.contributable_id",
         :attribution_targets => "INNER JOIN contributions AS attribution_targets ON attributions.attributable_type = attribution_targets.contributable_type AND attributions.attributable_id = attribution_targets.contributable_id",
-        :credits       => "INNER JOIN creditations ON creditations.creditable_type = contributions.contributable_type AND creditations.creditable_id = contributions.contributable_id"
+        :credits       => "INNER JOIN creditations ON creditations.creditable_type = contributions.contributable_type AND creditations.creditable_id = contributions.contributable_id",
+        :curation_events => "INNER JOIN curation_events ON curation_events.object_type = contributions.contributable_type AND curation_events.object_id = contributions.contributable_id"
       }
     }
   end

Modified: branches/discovery/public/stylesheets/styles.css (2466 => 2467)


--- branches/discovery/public/stylesheets/styles.css	2010-07-11 05:20:25 UTC (rev 2466)
+++ branches/discovery/public/stylesheets/styles.css	2010-07-11 06:15:59 UTC (rev 2467)
@@ -2045,7 +2045,7 @@
   margin-bottom: 1em;
   padding: 2px;
   background: #f0f0f0;
-  border-radius: 8px;
+  border-radius: 6px;
 }
 
 DIV.pivot DIV.category {
@@ -2062,11 +2062,13 @@
 }
 
 DIV.pivot DIV.options > DIV:first-child {
-  border-radius: 6px 6px 0 0;
+  border-top-left-radius: 6px;
+  border-top-right-radius: 6px;
 }
 
 DIV.pivot DIV.options > DIV:last-child {
-  border-radius: 0 0 6px 6px;
+  border-bottom-left-radius: 6px;
+  border-bottom-right-radius: 6px;
 }
 
 DIV.pivot DIV.options > DIV:hover {

reply via email to

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