add mapBox services into record preview

This commit is contained in:
Florian BLOUET
2016-04-06 17:37:22 +02:00
parent 8aaf924d5d
commit 68670dd028
7 changed files with 35 additions and 9 deletions

View File

@@ -234,3 +234,7 @@ embed_bundle:
document:
player: flexpaper
enable-pdfjs: true
geocoding-providers:
-
name: 'mapBox'
public-key: ''

View File

@@ -80,6 +80,12 @@ class RecordController extends Controller
$train = $this->render('prod/preview/feed_train.html.twig', ['record' => $record]);
}
$recordCaptions = [];
foreach ($record->get_caption()->get_fields(null, true) as $field) {
// get field's values
$recordCaptions[$field->get_name()] = $field->get_serialized_values();
}
return $this->app->json([
"desc" => $this->render('prod/preview/caption.html.twig', [
'record' => $record,
@@ -87,6 +93,7 @@ class RecordController extends Controller
'searchEngine' => $searchEngine,
'searchOptions' => $options,
]),
"recordCaptions"=> $recordCaptions,
"html_preview" => $this->render('common/preview.html.twig', [
'record' => $record
]),

View File

@@ -123,6 +123,7 @@ class RootController extends Controller
'feeds' => $feeds,
'aggregate' => $aggregate,
'GV_google_api' => $conf->get(['registry', 'webservices', 'google-charts-enabled']),
'geocodingProviders' => json_encode($conf->get(['geocoding-providers'])),
'search_status' => \databox_status::getSearchStatus($this->app),
'thesau_js_list' => $thjslist,
'thesau_json_sbas' => json_encode($sbas),

View File

@@ -211,3 +211,7 @@ embed_bundle:
document:
player: flexpaper
enable-pdfjs: true
geocoding-providers:
-
name: 'mapBox'
public-key: ''

View File

@@ -33,6 +33,6 @@
"postinstall": "./node_modules/.bin/gulp install;"
},
"dependencies": {
"phraseanet-production-client": "~0.13.0"
"phraseanet-production-client": "~0.14.0"
}
}

View File

@@ -17,10 +17,10 @@
}
#PREVIEWBOX #PREVIEWTITLE_COLLNAME {
display:none;
display: none;
}
.PREVIEW_PIC,.PREVIEW_HD {
.PREVIEW_PIC, .PREVIEW_HD {
position: absolute;
}
@@ -37,6 +37,10 @@
overflow: auto;
}
#PREVIEWIMGDESC.PNB10 {
bottom: 0;
}
#PREVIEWIMGDESCINNER span.fieldName {
font-weight: bold;
}
@@ -129,8 +133,7 @@
overflow-y: hidden;
}
#PREVIEWCURRENTCONT::-webkit-scrollbar-track
{
#PREVIEWCURRENTCONT::-webkit-scrollbar-track {
border-radius: 0;
background-color: #262626;
}
@@ -146,7 +149,6 @@
background-color: #595959;
}
#PREVIEWCURRENTCONT ul {
position: relative;
height: 80px;
@@ -194,7 +196,6 @@
top: auto;
}
#PREVIEWTOOL img, #PREVIEWTOOL span {
float: left;
}
@@ -206,7 +207,7 @@
z-index: 97;
}
.prevTrainCurrent .doc_infos img,.diapo .doc_infos img {
.prevTrainCurrent .doc_infos img, .diapo .doc_infos img {
vertical-align: middle;
}
@@ -214,9 +215,17 @@
background-color: darken($darkerBackgroundColor, 10);
color: $darkerTextColor;
}
#PREVIEWIMGCONT {
.documentTips {
width: 100%;
height: 100%;
}
}
#PREVIEWRIGHT {
top: 7px;
left: 60%;
overflow: hidden;
bottom: 10px;
}

View File

@@ -105,6 +105,7 @@
},
initialState: "{{ initialAppState }}",
geonameServerUrl: '{{ app['geonames.server-uri'] }}',
geocodingProviders: {{ geocodingProviders|raw }},
thesaurusConfig: {
replaceMessage: '{{ 'prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s"' | trans }}',
replaceInProgressMsg: '{{ 'prod::thesaurusTab:dlg:Remplacement en cours.' | trans }}',
@@ -702,7 +703,7 @@
<div class="gui_vsplitter gui_vsplitter2" style="left:60%;">
</div>
<div id="PREVIEWRIGHT" class="preview_col PNB" style="top:7px;left:60%;overflow:hidden;">
<div id="PREVIEWRIGHT" class="preview_col PNB">
<div id="PREVIEWIMGDESC" class="PNB10">
<ul class="PNB" style="height:30px;bottom:auto;">
<li><a href="#PREVIEWIMGDESCINNER-BOX">{{ 'preview:: Description' | trans }}</a></li>