Bob DuCharme

added a mprgswp:Table class to SWP_mprg.ui.ttl

<ui:call ui:template="{= ?template }" arg:report="{= ?report }">
<ui:if ui:condition="{= spr:rowCount(?rs) &gt; 0 }">
<div>
<hr />
<ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt;">
<h2>{= ui:label(?template) }</h2>
</ui:setContext>
<table class="ddrTable" letrs:hrs="{#
SELECT ?header ?left
WHERE {
GRAPH &lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt; {
?template rhspin:tableHeaders ?list .
?list &lt;http://jena.hpl.hp.com/ARQ/list#member&gt; ?str .
BIND (fn:starts-with(?str, '*') AS ?left) .
BIND (IF(?left, fn:substring(?str, 2), ?str) AS ?header) .
}
}
}">
<tr class="ddrTR">
<ui:forEach ui:resultSet="{= ?hrs }">
<th class="ddrTH" style="text-align: {= IF(?left, 'left', 'center') }"
><ui:parse ui:str="{= html:encodeBRs(spif:replaceAll(?header, ' ', '&nbsp;')) }" /></th>
</ui:forEach>
</tr>
<ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }">
<tr class="ddrTR">
<ui:forEach ui:resultSet="{# SELECT ?cell ?colIndex WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?colIndex) } }">
<!--td class="ddrTD" style="text-align: {= IF(spr:cell(?hrs, ?colIndex, 1), 'left', 'center') }"-->
<td class="ddrTD">{= ?cell }</td>
</ui:forEach>
</tr>
</ui:forEach>
</table>
<br />
</div>
</ui:if>
</ui:call>
\ No newline at end of file
......@@ -51,7 +51,7 @@ arg:template
<http://www.reportinghub.no/swp/mprg>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/spin/mpr-tables> , <http://www.reportinghub.no/spin/rh> , <http://www.reportinghub.no/ep/spin/ddr-tables> , <http://www.reportinghub.no/ep/schema/1.0/production-report> , <http://uispin.org/tui> ;
owl:imports <http://uispin.org/tui> , <http://www.reportinghub.no/ep/schema/1.0/production-report> , <http://www.reportinghub.no/ep/spin/ddr-tables> , <http://www.reportinghub.no/spin/rh> , <http://www.reportinghub.no/ep/spin/mpr-tables> ;
owl:versionInfo "0.1.0"^^xsd:string .
mprgswp:MPRGView
......@@ -65,6 +65,12 @@ mprgswp:MPRGView
spl:valueType <http://www.reportinghub.no/ep/schema/production-report#ProductionReport>
] ;
ui:headIncludes
[ rdf:type html:Link ;
html:href "http://spinrdf.org/rhlib/ddr.css"^^xsd:string ;
html:rel "stylesheet"^^xsd:string ;
html:type "text/css"^^xsd:string
] ;
ui:headIncludes
[ rdf:type html:Title ;
ui:child
[ rdf:type ui:TextNode ;
......@@ -72,10 +78,24 @@ mprgswp:MPRGView
ui:text "Monthly Production Report (government)"^^xsd:string
]
] ;
ui:headIncludes
[ rdf:type html:Link ;
html:href "http://spinrdf.org/rhlib/ddr.css"^^xsd:string ;
html:rel "stylesheet"^^xsd:string ;
html:type "text/css"^^xsd:string
] ;
ui:prototype <http://www.reportinghub.no/swp/MPRG.uispin.html> .
mprgswp:Table
rdf:type ui:NodeClass ;
rdfs:comment "An HTML table displaying the results of a given SPIN template for a given MPRG. The template should also provide rhspin:tableHeaders."^^xsd:string ;
rdfs:label "Table"^^xsd:string ;
rdfs:subClassOf ui:Element ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The SPIN Template to execute."^^xsd:string ;
spl:predicate arg:template ;
spl:valueType spin:Template
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The report that serves as root of the template."^^xsd:string ;
spl:optional "true"^^xsd:boolean ;
spl:predicate arg:report ;
spl:valueType <http://www.reportinghub.no/ep/schema/production-report#MonthlyProductionReport>
] ;
ui:prototype <http://www.reportinghub.no/swp/MPRGTable.uispin.html> .
......