Labelize collections

This commit is contained in:
Romain Neutron
2013-05-30 20:00:14 +02:00
parent 55a6469aa4
commit c084f20f85
37 changed files with 301 additions and 61 deletions

View File

@@ -254,7 +254,7 @@ class module_report_dashboard implements module_report_dashboard_componentInterf
'base_id' => $base_id,
'sbas_id' => $sbas_id,
'coll_id' => $collection->get_base_id(),
'name' => $collection->get_name()
'name' => $collection->get_label($this->app['locale.I18n'])
);
}

View File

@@ -79,7 +79,7 @@ class module_report_download extends module_report
foreach ($rs as $row) {
$value = $row['val'];
if ($field == 'coll_id') {
$caption = phrasea::bas_names(phrasea::baseFromColl($this->sbas_id, $value, $this->app), $this->app);
$caption = phrasea::bas_labels(phrasea::baseFromColl($this->sbas_id, $value, $this->app), $this->app);
} elseif ($field == 'ddate')
$caption = $this->app['date-formatter']->getPrettyString(new DateTime($value));
elseif ($field == 'size')
@@ -167,7 +167,7 @@ class module_report_download extends module_report
private function formatCollId($value)
{
return phrasea::bas_names(phrasea::baseFromColl($this->sbas_id, $value, $this->app), $this->app);
return phrasea::bas_labels(phrasea::baseFromColl($this->sbas_id, $value, $this->app), $this->app);
}
public static function getNbDl(Application $app, $dmin, $dmax, $sbas_id, $list_coll_id)