Add labels to databoxes

This commit is contained in:
Romain Neutron
2013-06-12 20:06:49 +02:00
parent 2302efc7e3
commit 11a55bbd43
49 changed files with 406 additions and 129 deletions

View File

@@ -38,7 +38,7 @@ class module_console_fieldsList extends Command
$output->writeln(
sprintf(
"\n ---------------- \nOn databox %s (sbas_id %d) :\n"
, $databox->get_viewname()
, $databox->get_label($this->container['locale.I18n'])
, $databox->get_sbas_id()
)
);

View File

@@ -53,7 +53,7 @@ class module_console_sphinxGenerateSuggestion extends Command
$databox = $this->getService('phraseanet.appbox')->get_databox($sbas_id);
$output->writeln("process Databox " . $databox->get_viewname() . " / $index\n");
$output->writeln("process Databox " . $databox->get_label($this->container['locale.I18n']) . " / $index\n");
if ( ! is_executable("/usr/local/bin/indexer")) {
$output->writeln("<error>'/usr/local/bin/indexer' is not executable</error>");

View File

@@ -126,7 +126,7 @@ class module_console_systemExport extends Command
$total = $errors = 0;
foreach ($this->getService('phraseanet.appbox')->get_databoxes() as $databox) {
$output->writeln(sprintf("Processing <info>%s</info>", $databox->get_viewname()));
$output->writeln(sprintf("Processing <info>%s</info>", $databox->get_label($this->container['locale.I18n'])));
if (count($restrictSbasIds) > 0 && ! in_array($databox->get_sbas_id(), $restrictSbasIds)) {
$output->writeln(sprintf("Databox not selected, bypassing ..."));

View File

@@ -257,7 +257,7 @@ class module_report
$this->app['date-formatter']->getPrettyString(new \DateTime($d1)),
$this->app['date-formatter']->getPrettyString(new \DateTime($d2))
);
$this->dbname = phrasea::sbas_names($sbas_id, $app);
$this->dbname = phrasea::sbas_labels($sbas_id, $app);
$this->cor = $this->setCor();
$this->jour = $this->setDay();
$this->month = $this->setMonth();

View File

@@ -248,7 +248,7 @@ class module_report_dashboard implements module_report_dashboard_componentInterf
$sbas_id = $databox->get_sbas_id();
if ( ! isset($all_coll[$sbas_id])) {
$all_coll[$sbas_id] = array();
$all_coll[$sbas_id]['name_sbas'] = $databox->get_viewname();
$all_coll[$sbas_id]['name_sbas'] = $databox->get_label($this->app['locale.I18n']);
}
$all_coll[$sbas_id]['sbas_collections'][] = array(
'base_id' => $base_id,
@@ -279,7 +279,7 @@ class module_report_dashboard implements module_report_dashboard_componentInterf
$this->authorizedCollection[] = array(
'sbas_id' => (int) $sbas,
'coll' => implode(',', $listeColl),
'name' => phrasea::sbas_names($sbas, $this->app)
'name' => phrasea::sbas_labels($sbas, $this->app)
);
}
@@ -298,7 +298,7 @@ class module_report_dashboard implements module_report_dashboard_componentInterf
$all_coll = $this->getAllColl();
$liste = '';
foreach ($all_coll as $sbas => $info) {
$liste .= phrasea::sbas_names($sbas, $this->app) . ' ' . $separator . ' ';
$liste .= phrasea::sbas_labels($sbas, $this->app) . ' ' . $separator . ' ';
}
return $liste;