Skip to content

Commit

Permalink
Management of the video for gender equality by the commissioners, the…
Browse files Browse the repository at this point in the history
… use of the video takes place through the PeerTube API
  • Loading branch information
mspasiano committed Nov 13, 2023
1 parent 7189c1e commit 74b8c9b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
@Setter
public class CommissionConfProperties {
private Boolean gender;
private String url;
private String url_it;
private String url_en;
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ public Map<String, Object> addToModel(Map<String, String[]> paramz, HttpServletR
pageService.registerPageModels("commission-gender", new PageModel() {
@Override
public Map<String, Object> addToModel(Map<String, String[]> paramz, HttpServletRequest req) {
return Collections.singletonMap("videoGenderURL", commissionConfProperties.getUrl());
return Stream.of(
new AbstractMap.SimpleEntry<>("videoGenderURL_it", commissionConfProperties.getUrl_it()),
new AbstractMap.SimpleEntry<>("videoGenderURL_en", commissionConfProperties.getUrl_en()))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,5 @@ firma:

commission:
gender: false
url: https://video.cnr.it/videos/embed/tDaLtHJBE786ebBwY1D67h?api=1&controlBar=0
url_it: https://video.cnr.it/videos/embed/tDaLtHJBE786ebBwY1D67h?api=1&controlBar=0
url_en: https://video.cnr.it/videos/embed/qoJkDMLwcCzrtLdZgX93q1?api=1&controlBar=0
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
<h5>${message('label.commission-gender.1')}</h5>
<h5>${message('label.commission-gender.2')}</h5>
<h5>${message('label.commission-gender.3')}</h5>
<iframe id="video" src="${videoGenderURL}" style="height:60vh;width:100%"></iframe>
<#if locale_suffix != 'it'>
<iframe id="video" src="${videoGenderURL_en}" style="height:60vh;width:100%"></iframe>
<#else>
<iframe id="video" src="${videoGenderURL_it}" style="height:60vh;width:100%"></iframe>
</#if>
<h5>${message('label.commission-gender.4')}</h5>
<div class="btn-block">
<button class="btn btn-large span6 btn-primary hide" id="play"><i class="icon-play icon-white"></i> Play</button>
Expand Down

0 comments on commit 74b8c9b

Please sign in to comment.