Commit d8fb21c9 authored by m.stenta's avatar m.stenta
Browse files

Change the way the page title is generated on log pages, so that the log type...

Change the way the page title is generated on log pages, so that the log type is not displayed elsewhere. Change the log/add page title to "Log [type]".
parent ac3b0eeb
......@@ -29,7 +29,7 @@ function log_add($type) {
$log_type = log_types($type);
$log = entity_create('log', array('type' => $type));
drupal_set_title(t('Create @name', array('@name' => entity_label('log_type', $log_type))));
drupal_set_title(t('Log @name', array('@name' => entity_label('log_type', $log_type))));
$output = drupal_get_form('log_form', $log);
......
......@@ -10,8 +10,7 @@
*/
class Log extends Entity {
protected function defaultLabel() {
$log_type = log_type_load($this->type);
return $log_type->label . ': ' . $this->name;
return $this->name;
}
protected function defaultUri() {
......
......@@ -9,6 +9,7 @@
* Log view callback.
*/
function log_view($log) {
drupal_set_title(entity_label('log', $log));
$log_type = log_types($log->type);
drupal_set_title(entity_label('log_type', $log_type) . ': ' . entity_label('log', $log));
return entity_view('log', array(entity_id('log', $log) => $log), 'full');
}
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