| @(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 Used 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> |
| } |
| } |
| } |