Holger Knublauch

Removed two SWP files that are only needed in the EPIM-Sources repo

Added rhspin:companyName
<html>
<head>
<title>ReportingHub - Download DDR</title>
<link rel="stylesheet" type="text/css" href="lib/rh/rh.css" />
<link rel="stylesheet" type="text/css" href="lib/rh/jquery/jquery-ui.css" />
<script type="text/javascript" src="lib/rh/jquery/jquery.js"></script>
<script type="text/javascript" src="lib/rh/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="lib/rh/js/rh.js"></script>
<script>
function updateWellBores() {
// Updates the content of the well bores list based on selected well
$("#wellSelect option:selected").each(function() {
updateSelect('#wellBoreSelect', '{= rhspin:GetWellBoresOfWell }', { well: $(this).val() });
});
}
</script>
</head>
<body>
<div id="wrapper">
<rhswp:Header />
<div id="content">
<h3>Download a Daily Drilling Report</h3>
<form action="download-report">
<table>
<tr>
<td style="vertical-align: top">
<div class="formHeader">1. Select Well:</div>
<select size="10" id="wellSelect" style="width: 200px">
<ui:forEach ui:resultSet="{#
SELECT ?well ?wellName
WHERE {
GRAPH npdata:npd {
?well a ep-well:Well .
?well npd:name ?wellName .
}
} ORDER BY ?wellName
}">
<option value="{= ?well }">{= ?wellName }</option>
</ui:forEach>
</select>
<script>
$('#wellSelect').change(function() {
updateWellBores();
});
</script>
</td>
<td></td>
<td style="padding-left:20px; vertical-align: top">
<div>
<div class="formHeader">2. Select Well Bore:</div>
<select size="5" id="wellBoreSelect" name="wellboreId" style="width:200px">
</select>
</div><br />
<div>
<div class="formHeader">3. Select Date(s):</div>
<input type="hidden" name="timeFrom" id="timeFrom" />
<input type="hidden" name="timeTo" id="timeTo" />
<input type="text" id="datepicker1" style="width: 90px" />&nbsp;-&nbsp;<input type="text" id="datepicker2" style="width: 90px" />
<script>
$(function() {
$("#datepicker1").datepicker({ altField: '#timeFrom' , altFormat: 'yy-mm-dd' });
$("#datepicker2").datepicker({ altField: '#timeTo' , altFormat: 'yy-mm-dd' });
});
</script>
</div>
</td>
<td></td>
<td style="padding-left:20px; vertical-align: top">
<div>
<div class="formHeader">4. Select Format:</div>
<input type="radio" name="format" value="html" checked="checked"/>HTML<br />
<input type="radio" name="format" value="pdf" />PDF<br />
<input type="radio" name="format" value="xml" />XML<br />
</div><br />
<input type="submit" value="Download" />
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>
\ No newline at end of file
......@@ -232,6 +232,13 @@ rhspin:companyHasLicenceForWellBore
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/well#WellBore> .
rhspin:companyName
rdf:type spin:Function ;
rdfs:comment "Gets the name of the company of the currently logged in user."^^xsd:string ;
rdfs:label "company name"^^xsd:string ;
rdfs:subClassOf spin:Functions ;
spin:returnType xsd:string .
rhspin:discoveryById
rdf:type spin:Function ;
rdfs:label "discovery by id"^^xsd:string ;
......@@ -272,15 +279,15 @@ rhspin:dtypeValue
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The subject of the value."^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType rdfs:Resource
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The predicate that points to the reified value."^^xsd:string ;
spl:predicate sp:arg2 ;
spl:valueType rdf:Property
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The subject of the value."^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType rdfs:Resource
] .
rhspin:facilityById
......
<html>
<head>
<title>ReportingHub - Validate/Upload DDR</title>
<link href="lib/rh/rh.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="lib/rh/jquery/jquery.js"></script>
<script type="text/javascript" src="lib/rh/jquery/jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#theForm').ajaxForm({
beforeSubmit: clearOutput,
success: writeOutput
});
});
function clearOutput(a, f, o) {
$('#output').html('Submitting report...');
}
function writeOutput(data) {
var $out = $('#output');
if('valid' == data["validation-status"]) {
$out.html('Report validated OK');
}
else {
$out.html('Validation failed: ' + data);
}
}
</script>
</head>
<body>
<div id="wrapper">
<rhswp:Header />
<div id="content">
<h3>Validate/Upload a Daily Drilling Report</h3>
<p>
Please select a DDR XML file:
</p>
<form enctype="multipart/form-data" id="theForm" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<div>
<input name="file" type="file" />
</div>
<br />
<input id="validateButton" type="radio" name="type" value="validate" checked="checked" />Validate only<br />
<input id="uploadButton" type="radio" name="type" value="upload" />Validate &amp; upload<br />
<script>
function updateAction() {
var newAction = $("#validateButton").attr("checked") ? "validate-report" : "validate-and-upload-report";
$("#theForm").attr("action", newAction);
}
$("#validateButton").change(updateAction);
$("#uploadButton").change(updateAction);
updateAction();
</script>
<br />
<input type="submit" value="Submit" />
</form>
<br />
<div id="output"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file