blob: 98d738ac8f3920d9aa490657728b8a27887f9571 [file] [log] [blame]
@*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one or more *
* contributor license agreements. See the NOTICE file distributed with *
* this work for additional information regarding copyright ownership. *
* The ASF licenses this file to You under the Apache License, Version 2.0 *
* (the "License"); you may not use this file except in compliance with *
* the License. You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
*******************************************************************************@
@(climateServices: List[metadata.ClimateService], climateServiceForm: play.data.Form[metadata.ClimateService])
@import helper._
@scripts = {
<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
<script type="text/javascript">
$(document).ready(function(){
//alert($("#url").text());
});
</script>
}
@main("Climate Services", scripts) {
@flash_message()
<h1>@climateServices.size() Most Recently Added Climate Services</h1>
<table class="table table-striped table-bordered table-condensed ex2">
<tr>
<td class="col-md-2">Climate Service Name</td>
<td class="col-md-4">Purpose</td>
<td class="col-md-4">Url</td>
<td class="col-md-2">Scenario</td>
<td class="col-md-2">Version</td>
<td class="col-md-2">Root Service</td>
@if(true){
<td class="col-md-3">Operation</td>
}
</tr>
@for(climateService <- climateServices){
<tr>
<td><a href = "@climateService.getUrl()">@climateService.getClimateServiceName()</a></td>
<td><span class="@climateService.getClimateServiceName() editable" data-name='purpose'>
@climateService.getPurpose() </span></td>
<td><span class="@climateService.getClimateServiceName() editable" id = "url" data-name='url'>
<a href = "@climateService.getUrl()"><img src='@climateService.getPhoto()' style="height: 100px; width: 100px" ></a> </span></td>
<td><span class="@climateService.getClimateServiceName() editable" data-name='scenario'>
@climateService.getScenario() </span></td>
<td><span class="@climateService.getClimateServiceName() editable" data-name='versionNo'>
@climateService.getVersion() </span></td>
<td><span class="@climateService.getClimateServiceName() editable" data-name='rootServiceId'>
@climateService.getRootservice() </span></td>
@if(true){
<td class="operation">
<input type="button" class="edit-btn btn btn-primary" value="Edit"
data-pk='@climateService.getClimateServiceName()'
data-url='@routes.ClimateServiceController.editClimateService()'
>
@form(routes.ClimateServiceController.deleteClimateService()){
<input
name="idHolder" class="hidden" type="hidden"
value="@climateService.getId()">
<input
type="submit" class="btn btn-danger delete-btn span2" value="Delete"
onclick="return confirm('Are you sure you want to delete this item?')">
}
</td>
}
</tr>
}
</table>
@if(true){
@form(routes.ClimateServiceController.downloadClimateService(), 'class -> "form-horizontal", 'role -> "form") {
<button type="submit" name="action" value="download">Download</button>
}
}
}