\r
public static function publishCollection($args, &$x) {\r
global $core;\r
- $collection = $args[1];\r
+ $collection = $_POST['collection'];\r
\r
$env = Zend_Mobile_Push_Apns::SERVER_SANDBOX_URI;\r
\r
\r
$langs = array_unique($langs);\r
\r
+ $w2h=new wiki2xhtml();\r
+ $w2h->setOpt('active_pre',0);\r
+ \r
+ $contents = $collection->contents;\r
foreach ($langs as $lang) {\r
$langsnames[$lang] = cubeLang::getNameByCode($lang);\r
+ $contents[$lang]['apropos']=$w2h->transform($contents[$lang]['apropos']);\r
}\r
\r
\r
$traductions[$r->lang_id] = json_decode($r->traductions);\r
}\r
\r
- $d = array('id' => $id, 'langs' => $langs, 'langnames' => $langsnames, 'time' => $version, 'datas' => $composition, 'couvertures' => $couvertures, 'traductions' => $traductions, 'contents' => $collection->contents);\r
+ $d = array('id' => $id, 'langs' => $langs, 'langnames' => $langsnames, 'time' => $version, 'datas' => $composition, 'couvertures' => $couvertures, 'traductions' => $traductions, 'contents' => $contents);\r
$d = array_merge($d, $this->_getManifest($publications, '/fluidbook/collections/versions/' . $id . '/' . $version . '/' . $os, $books, $resolution));\r
\r
$dao = new wsDAOCollection($core->con);\r
}\r
$res.='</table>';\r
}\r
- $res.='<br /><a href="#" class="right ajax" rel="publishCollection/' . $collection->collection_id . '">' . $core->typo->Ajouter(__('Publier et notifier les utilisateurs')) . '</a>';\r
\r
+ $res.='<h3>' . __('Notifications') . '</h3>';\r
+ $res.='<p>' . __('Indiquez le texte de la notification à envoyer aux utilisateurs') . ' (' . __('Max 200 caractères') . ').<br />'.__('Laissez vide si vous souhaitez simplement afficher un badge').'</p>';\r
+ $res.='<form method="post" action="publishCollection">';\r
+ $res.=form::hidden('collection', $collection->collection_id);\r
+ $res.='<table class="max">';\r
+ foreach ($langs as $lang) {\r
+ $res.='<tr><td class="min nowrap">' . __('Notification') . '[' . $lang . ']</td><td class="pad">' . form::textArea(array('notification[' . $lang . ']'), 60, 3) . '</td></tr>';\r
+ }\r
+ $res.='<tr><td colspan="2" class="right"></td><a href="#" class="submit">' . $core->typo->Ajouter(__('Publier et notifier les utilisateurs')) . '</a></tr>';\r
+ $res.='</table>';\r
+ $res.='</form>';\r
$res.='<h3>' . __('Export') . '</h3>';\r
$res.='<a href="#" class="right ajax" rel="exportCollection/' . $collection->collection_id . '/android">' . $core->typo->Ajouter(__('Exporter pour Android')) . '</a> <a href="#" class="right ajax" rel="exportCollection/' . $collection->collection_id . '/ios">' . $core->typo->Ajouter(__('Exporter pour iOS')) . '</a>';\r
\r
'js/libs/fix/detect-zoom.js',
'js/libs/cube/fb.js',
'js/libs/cube/util.js',
+ 'js/libs/fastclick/fastclick.js',
'js/libs/modernizr/modernizr.js',
'js/libs/modernizr/tests.js',
'js/libs/json2.js',
mkdir(dirname($t), 0777, true);
}
- $res=copy($s, $t);
+ $res = copy($s, $t);
touch($t, filemtime($s));
return true;
}
padding:5px;\r
}\r
\r
+#collection td.pad{\r
+ padding:15px 0; \r
+}\r
+\r
#collection .min.nowrap{\r
padding:0 15px 0 0;\r
}\r
padding:2px 6px;\r
}\r
\r
-#collection h3{margin:10px 0 10px 0 !important;}\r
+#collection h3{margin:10px 0 10px 0 !important;border-top:2px solid #BEBFB1;padding:10px 0 0 0;}\r
#collection .group,\r
#collection .publication{\r
padding:5px;border:1px solid #ccc;margin:2px 0;background-color:#eee;\r