[Mapbender-commits] r9512 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jun 9 02:11:44 PDT 2016
Author: armin11
Date: 2016-06-09 02:11:44 -0700 (Thu, 09 Jun 2016)
New Revision: 9512
Modified:
trunk/mapbender/http/plugins/mb_metadata_addon.php
trunk/mapbender/http/plugins/mb_metadata_server.php
Log:
Possibility to give an url to a preview image in internal metadata editor
Modified: trunk/mapbender/http/plugins/mb_metadata_addon.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_addon.php 2016-06-08 09:51:11 UTC (rev 9511)
+++ trunk/mapbender/http/plugins/mb_metadata_addon.php 2016-06-09 09:11:44 UTC (rev 9512)
@@ -70,6 +70,7 @@
<li><a href="#tabs-7"><?php echo _mb("Covering Area");?></a></li>
<li><a href="#tabs-8"><?php echo _mb("Licenses/Constraints");?></a></li>
<li><a href="#tabs-9"><?php echo _mb("Responsible Party");?></a></li>
+ <li><a href="#tabs-10"><?php echo _mb("Preview");?></a></li>
</ul>
<!--<legend><?php echo _mb("Simple metadata editor");?></legend>-->
<div id="tabs-1">
@@ -311,6 +312,13 @@
<input name="responsible_party_email" id="responsible_party_email" type="text"/>
</p>
</div>
+ <div id="tabs-10">
+ <fieldset>
+
+ <!--<table id='previewuploadtable' name='previewuploadtable'><tr><td><img id="upload_preview_image" name= "upload_preview_image" onclick='initUploadImageForm();' src='../img/button_blue_red/up.png' title='Upload' /></td><td><?php echo _mb("Upload a preview image for the dataset. Does only make sense for raster files.");?><img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Help for upload preview image");?>'}" src="../img/questionmark.png" alt="" /><img class="delete_preview_image" id="delete_existing_preview_image" onclick="" name="delete_existing_preview_image" src='../img/cross.png' type="hidden" style="display: none" title="<?php echo _mb("Delete actual preview image");?>"/></td></tr></table>-->
+ <input name="preview_image" id="preview_image" type="text"/><img class="help-dialog" title="<?php echo _mb("Help");?>" help="{text:'<?php echo _mb("Here you can give a url to an image that should be shown");?>'}" src="../img/questionmark.png" alt="" />
+ </fieldset>
+ </div>
</div><!--accordion-->
</div><!--demo-->
</fieldset>
Modified: trunk/mapbender/http/plugins/mb_metadata_server.php
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_server.php 2016-06-08 09:51:11 UTC (rev 9511)
+++ trunk/mapbender/http/plugins/mb_metadata_server.php 2016-06-09 09:11:44 UTC (rev 9512)
@@ -1143,6 +1143,7 @@
$resultObj["downloadlink"] = $mbMetadata->downloadLinks[0]; //only the first link!
$resultObj["inspire_whole_area"] = $mbMetadata->inspireWholeArea;
$resultObj["inspire_actual_coverage"] = $mbMetadata->inspireActualCoverage;
+ $resultObj["preview_image"] = $mbMetadata->previewImage;
$resultObj["overview_url"] = $mbMetadata->getExtentGraphic($mbMetadata->wgs84Bbox);
$export2csw = $mbMetadata->export2Csw; //boolean
$resultObj["update_frequency"] = $mbMetadata->updateFrequency; //text
@@ -1390,6 +1391,9 @@
if (isset($data->md_license_source_note)) {
$mbMetadata->licenseSourceNote = $data->md_license_source_note;
}
+ if (isset($data->preview_image) && $data->preview_image !=='' ) {
+ $mbMetadata->previewImage = $data->preview_image;
+ }
//overwrite responsible party info if wished
if ($data->check_overwrite_responsible_party) {
if ($data->responsible_party_name !== "") {
@@ -1594,6 +1598,9 @@
if (isset($data->md_termsofuse) && $data->md_termsofuse !=='0') {
$mbMetadata->termsOfUseRef = $data->md_termsofuse;
}
+ if (isset($data->preview_image) && $data->preview_image !=='' ) {
+ $mbMetadata->previewImage = $data->preview_image;
+ }
//overwrite responsible party info if wished
if ($data->check_overwrite_responsible_party) {
if ($data->responsible_party_name !== "") {
More information about the Mapbender_commits
mailing list