[table] Add a table view for score value, see #3323338
authorVincent Michel <vincent.michel@logilab.fr>
Mon, 25 Nov 2013 11:18:05 +0000
changeset 498 e2e5853984ff
parent 497 e2a2bb435d1a
child 499 257f29128208
[table] Add a table view for score value, see #3323338
views/tableviews.py
--- a/views/tableviews.py	Mon Nov 25 10:26:50 2013 +0000
+++ b/views/tableviews.py	Mon Nov 25 11:18:05 2013 +0000
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU Lesser General Public License along
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 
-"""cubicweb-suivimp views/forms/actions/components for web ui"""
+"""cubicweb-brainomics views/forms/actions/components for web ui"""
 from cubicweb.selectors import is_instance
 from cubicweb.web.views.tableview import EntityTableView, RelationColRenderer
 
@@ -41,6 +41,7 @@
     column_renderers = {'related_measure': RelationColRenderer(role='subject', vid='incontext'),
                         'genomic_region': RelationColRenderer(role='subject', vid='incontext')}
 
+
 class RegionCghTableView(EntityTableView):
     __regid__ = 'region-cgh-table-view'
     columns = ['related_measure', 'cgh_ratio', 'log2_ratio', 'status']
@@ -78,3 +79,14 @@
     column_renderers = {'related_measure': RelationColRenderer(role='subject', vid='incontext')}
 
     columns = ['related_measure',] + AbstractMutationTableView.columns
+
+
+###############################################################################
+### SCORE GROUP ###############################################################
+###############################################################################
+class ScoreValueTableView(EntityTableView):
+    __select__ = EntityTableView.__select__ & is_instance('ScoreValue')
+    __regid__ = 'scorevalue-table-view'
+
+    columns = ['definition', 'text', 'value']
+    column_renderers = {'definition': RelationColRenderer(role='subject')}