Commit 8be9d620 authored by Laurent's avatar Laurent

sandbox soundcloud : add doc + import licence

parent 60dc5105
......@@ -23,4 +23,4 @@ Copyright \(c\) 2012, 2013, 2014, 2015 Agence Française Informatique \(AFI\). A
You can redistribute it and/or modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by the Free Software Foundation \([see COPYING](COPYING)\)
[Third-Party Components and their license] (doc/extern_libs.txt)
[Third-Party Components and their license] (doc/extern_libs.org)
......@@ -62,34 +62,19 @@ foreach ($modstats as $stat) {
}
?>
<h2>Un problème ? Contactez le support AFI:</h2>
<?php echo $this->ligneInfos('Par courriel (de préférence)', '<a href="mailto:hotline@afi-sa.fr">hotline@afi-sa.fr</a>') ?>
<?php echo $this->ligneInfos('Par téléphone', '01.60.17.12.34 en semaine, 01.60.37.01.34 le samedi') ?>
<h2><?php echo $this->_('Participez à la communauté'); ?> !</h2>
<div class='ligne_info'><a onclick="window.open(this.href); return false" href="https://groups.google.com/group/utilisateurs-bokeh">Google group Bokeh</a></div>
<div class='ligne_info'><a onclick="window.open(this.href); return false" href="http://wiki.bokeh-library-portal.org">Wiki Bokeh</a></div>
<div class='ligne_info'>
<a onclick="window.open(this.href); return false" href="http://bokeh-library-portal.org">Site communautaire</a> -
<a onclick="window.open(this.href); return false" href="https://groups.google.com/group/utilisateurs-bokeh">Google group Bokeh</a> -
<a onclick="window.open(this.href); return false" href="http://wiki.bokeh-library-portal.org">Wiki Bokeh</a> -
<a onclick="window.open(this.href); return false" href="http://git.afi-sa.fr/afi/opacce/tree/master">Code source</a>
</div>
<h2><?php echo $this->_('Salle de discussion #Bokeh'); ?> :</h2>
<?php echo $this->ligneInfos($this->_('Discutez avec les contributeurs de Bokeh en direct'), '<a href="http://wiki.bokeh-library-portal.org/index.php/Salle_de_discussion_bokeh" target="_blank"><img src="'.BASE_URL.'/public/admin/images/ico/help.png"></img></a>') ?>
<br>
<iframe src="https://kiwiirc.com/client/irc.freenode.net/?nick=votrenom-?#bokeh" style="border:0; width:100%; height:450px;"></iframe>
<h2><?php echo $this->_('Forum Bokeh'); ?> :</h2>
<iframe id="forum_embed"
src="javascript:void(0)"
scrolling="no"
frameborder="0"
width="700"
height="700">
</iframe>
<script type="text/javascript">
document.getElementById("forum_embed").src =
"https://groups.google.com/forum/embed/?place=forum/utilisateurs-bokeh" +
"&showsearch=true&hl=fr&hideforumtitle=true&showpopout=true";
</script>
<script>
(function() {
function supportsCanvas() {
......
......@@ -34,7 +34,8 @@ class Class_WebService_BibNumerique_Jamendo_Album extends Class_WebService_BibNu
->setTitle($json->name)
->setYear(explode('-', $json->releasedate)[0])
->addAuthor($json->artist_name)
->addPoster($json->image);
->addPoster($json->image)
->setRights('Creative Commons');
$tracks = [];
......
......@@ -31,6 +31,7 @@ class Class_WebService_BibNumerique_RessourceNumerique {
$_id_language,
$_date_maj,
$_annee,
$_rights,
$_posters = [],
$_trailers = [],
$_photos = [],
......@@ -114,6 +115,17 @@ class Class_WebService_BibNumerique_RessourceNumerique {
}
public function setRights($rights) {
$this->_rights = $rights;
return $this;
}
public function getRights() {
return $this->_rights;
}
public function getEditeur() {
return trim($this->_editeur);
}
......@@ -213,7 +225,7 @@ class Class_WebService_BibNumerique_RessourceNumerique {
public function importMatieres($album) {
$ids=[];
$indexation = new Class_Indexation();
foreach ($this->_matieres as $matiere_libelle) {
foreach (array_filter($this->_matieres) as $matiere_libelle) {
if ( $matiere=Class_CodifMatiere::findFirstBy(['libelle' => $matiere_libelle])) {
$ids[]=$matiere->getId();
continue;
......@@ -250,7 +262,8 @@ class Class_WebService_BibNumerique_RessourceNumerique {
->setUrlOrigine($this->getBaseUrl())
->setCategorie($categorie)
->setRessources($this->getRessources())
->setStatus(Class_Album::STATUS_VALIDATED);
->setStatus(Class_Album::STATUS_VALIDATED)
->setDroits($this->getRights());
array_map([$album, 'addAuthor'], $this->getAuthors());
......
......@@ -33,6 +33,7 @@ class Class_WebService_BibNumerique_SoundCloud_Track extends Class_WebService_Bi
->addPoster($json->artwork_url)
->addAuthor($json->user->username)
->addMatiere($json->genre)
->setRights($json->license)
->setRessources([
(new Class_AlbumRessource())
->setMediaType(Class_AlbumRessource::MEDIA_TYPE_URL)
......@@ -41,19 +42,6 @@ class Class_WebService_BibNumerique_SoundCloud_Track extends Class_WebService_Bi
->setDuration($json->duration)
->setLicense(strtoupper($json->license))
]);
/* $ressource = new Class_AlbumRessource(); */
/* $ressource */
/* ->setMediaType(Class_AlbumRessource::MEDIA_TYPE_URL) */
/* ->setTitre($track->name) */
/* ->setUrl($track->audio) */
/* ->setDuration($track->duration) */
/* ->setLicense($this->parseLicense($track->license_ccurl)); */
/* $tracks []= $ressource; */
/* } */
/* $this->setRessources($tracks); */
}
public function setTags($tags) {
......
......@@ -62,7 +62,8 @@ class ZendAfi_View_Helper_Admin_HelpLinkBokehWiki {
'custom-fields' => ['index' => 'Gestion_des_champs_personnalisés'],
'custom-fields-report' => ['index' => 'Rapports_statistiques'],
'formation' => ['index' => 'Gestion_des_formations' ],
'harvest' => ['jamendo-browse' => 'Jamendo'],
'harvest' => ['jamendo-browse' => 'Jamendo',
'soundcloud' => 'SoundCloud'],
'modo' => ['index' => 'Modération'],
'modules' => ['recherche_viewnotice' => 'Affichage_d%27une_notice',
'recherche_resultat' => 'Paramétrer_une_liste_de_résultat',
......
......@@ -106,7 +106,7 @@ a {
font-size: 1em;
}
.error {
.error, .errors {
color: #F00;
font-weight: bold;
}
......
......@@ -27,6 +27,16 @@
"name" : "",
"url" : "http://wiki.bokeh-library-portal.org/index.php/Jamendo"}
},
"SoundCloud": {
"label" : "SoundCloud",
"url" : "https://www.soundcloud.com",
"image_url" : "http://bokeh-library-portal.org/userfiles/media/ressources_numeriques/soundcloud_200.png",
"desc": "SoundCloud est une plateforme de distribution audio en ligne sur laquelle les utilisateurs peuvent collaborer, promouvoir et distribuer leurs projets musicaux.",
"features": ["HARVEST"],
"sales_contact": {"mail" : "",
"name" : "",
"url" : "http://wiki.bokeh-library-portal.org/index.php/SoundCloud"}
},
"MUSICME": {
"label" : "MusicMe",
"url" : "http://www.musicme.com/",
......
......@@ -182,6 +182,12 @@ class JamendoAlbumEcosTest extends JamendoTestCase{
}
/** @test */
public function rightsShouldContainsCreativeCommons() {
$this->assertEquals('Creative Commons', $this->_album->getDroits());
}
/** @test */
public function posterShouldBeCovers1200DotJPG() {
$this->assertEquals('https://imgjam1.jamendo.com/albums/s146/146232/covers/1.200.jpg',
......@@ -204,11 +210,6 @@ class JamendoAlbumEcosTest extends JamendoTestCase{
}
/** @test */
public function matiereShouldContainsAlternativeRock() {
$this->assertEquals('Alternative Rock', $this->_album->getMatiere());
}
/** @test */
public function albumTracksShouldBeAudio() {
$this->assertCount(3, $this->_album->getAudioTracks());
......
......@@ -105,6 +105,20 @@ class SoundCloudTest extends ModelTestCase {
}
/** @test */
public function matiereShouldContainsAlternativeRock() {
$matiere = Class_CodifMatiere::find($this->_album->getMatiere());
$this->assertEquals('Alternative Rock',
$matiere->getLibelle());
}
/** @test */
public function rightsShouldContainsCCByNCND() {
$this->assertEquals('cc-by-nc-nd', $this->_album->getDroits());
}
/** @test */
public function albumShouldBeAudioRecord() {
$this->assertTrue($this->_album->isAudioRecord());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment