|
@@ -53,7 +53,7 @@ class views_plugin_display extends views_plugin {
|
|
$this->extender[$extender] = $plugin;
|
|
$this->extender[$extender] = $plugin;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- vpr('Invalid display extender @extender', array('@handler' => $extender));
|
|
|
|
|
|
+ vpr('Invalid display extender @extender', array('@extender' => $extender));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -739,7 +739,7 @@ class views_plugin_display extends views_plugin {
|
|
function uses_link_display() { return !$this->has_path(); }
|
|
function uses_link_display() { return !$this->has_path(); }
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Check to see if the display can put the exposed formin a block.
|
|
|
|
|
|
+ * Check to see if the display can put the exposed form in a block.
|
|
*
|
|
*
|
|
* By default, displays that do not have a path cannot disconnect
|
|
* By default, displays that do not have a path cannot disconnect
|
|
* the exposed form and put it in a block, because the form has no
|
|
* the exposed form and put it in a block, because the form has no
|
|
@@ -1150,7 +1150,7 @@ class views_plugin_display extends views_plugin {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
- $display_comment = check_plain(drupal_substr($this->get_option('display_comment'), 0, 10));
|
|
|
|
|
|
+ $display_comment = check_plain(views_ui_truncate($this->get_option('display_comment'), 80));
|
|
$options['display_comment'] = array(
|
|
$options['display_comment'] = array(
|
|
'category' => 'other',
|
|
'category' => 'other',
|
|
'title' => t('Comment'),
|
|
'title' => t('Comment'),
|
|
@@ -1419,7 +1419,7 @@ class views_plugin_display extends views_plugin {
|
|
}
|
|
}
|
|
$form['#title'] = check_plain($this->display->display_title) . ': ';
|
|
$form['#title'] = check_plain($this->display->display_title) . ': ';
|
|
|
|
|
|
- // Set the 'section' to hilite on the form.
|
|
|
|
|
|
+ // Set the 'section' to highlight on the form.
|
|
// If it's the item we're looking at is pulling from the default display,
|
|
// If it's the item we're looking at is pulling from the default display,
|
|
// reflect that. Don't use is_defaulted since we want it to show up even
|
|
// reflect that. Don't use is_defaulted since we want it to show up even
|
|
// on the default display.
|
|
// on the default display.
|
|
@@ -1573,8 +1573,12 @@ class views_plugin_display extends views_plugin {
|
|
$plugin = $this->get_plugin('access');
|
|
$plugin = $this->get_plugin('access');
|
|
$form['#title'] .= t('Access options');
|
|
$form['#title'] .= t('Access options');
|
|
if ($plugin) {
|
|
if ($plugin) {
|
|
- $form['#help_topic'] = $plugin->definition['help topic'];
|
|
|
|
- $form['#help_module'] = $plugin->definition['module'];
|
|
|
|
|
|
+ if (!empty($plugin->definition['help topic'])) {
|
|
|
|
+ $form['#help_topic'] = $plugin->definition['help topic'];
|
|
|
|
+ }
|
|
|
|
+ if (!empty($plugin->definition['module'])) {
|
|
|
|
+ $form['#help_module'] = $plugin->definition['module'];
|
|
|
|
+ }
|
|
|
|
|
|
$form['access_options'] = array(
|
|
$form['access_options'] = array(
|
|
'#tree' => TRUE,
|
|
'#tree' => TRUE,
|
|
@@ -1615,8 +1619,12 @@ class views_plugin_display extends views_plugin {
|
|
$plugin = $this->get_plugin('cache');
|
|
$plugin = $this->get_plugin('cache');
|
|
$form['#title'] .= t('Caching options');
|
|
$form['#title'] .= t('Caching options');
|
|
if ($plugin) {
|
|
if ($plugin) {
|
|
- $form['#help_topic'] = $plugin->definition['help topic'];
|
|
|
|
- $form['#help_module'] = $plugin->definition['module'];
|
|
|
|
|
|
+ if (!empty($plugin->definition['help topic'])) {
|
|
|
|
+ $form['#help_topic'] = $plugin->definition['help topic'];
|
|
|
|
+ }
|
|
|
|
+ if (!empty($plugin->definition['module'])) {
|
|
|
|
+ $form['#help_module'] = $plugin->definition['module'];
|
|
|
|
+ }
|
|
|
|
|
|
$form['cache_options'] = array(
|
|
$form['cache_options'] = array(
|
|
'#tree' => TRUE,
|
|
'#tree' => TRUE,
|
|
@@ -1635,11 +1643,10 @@ class views_plugin_display extends views_plugin {
|
|
$form['#title'] .= t('Query options');
|
|
$form['#title'] .= t('Query options');
|
|
$this->view->init_query();
|
|
$this->view->init_query();
|
|
if ($this->view->query) {
|
|
if ($this->view->query) {
|
|
- if (isset($this->view->query->definition['help topic'])) {
|
|
|
|
|
|
+ if (!empty($this->view->query->definition['help topic'])) {
|
|
$form['#help_topic'] = $this->view->query->definition['help topic'];
|
|
$form['#help_topic'] = $this->view->query->definition['help topic'];
|
|
}
|
|
}
|
|
-
|
|
|
|
- if (isset($this->view->query->definition['module'])) {
|
|
|
|
|
|
+ if (!empty($this->view->query->definition['module'])) {
|
|
$form['#help_module'] = $this->view->query->definition['module'];
|
|
$form['#help_module'] = $this->view->query->definition['module'];
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1734,8 +1741,10 @@ class views_plugin_display extends views_plugin {
|
|
}
|
|
}
|
|
$plugin = $this->get_plugin(empty($style) ? 'row' : 'style');
|
|
$plugin = $this->get_plugin(empty($style) ? 'row' : 'style');
|
|
if ($plugin) {
|
|
if ($plugin) {
|
|
- if (isset($plugin->definition['help topic'])) {
|
|
|
|
|
|
+ if (!empty($plugin->definition['help topic'])) {
|
|
$form['#help_topic'] = $plugin->definition['help topic'];
|
|
$form['#help_topic'] = $plugin->definition['help topic'];
|
|
|
|
+ }
|
|
|
|
+ if (!empty($plugin->definition['module'])) {
|
|
$form['#help_module'] = $plugin->definition['module'];
|
|
$form['#help_module'] = $plugin->definition['module'];
|
|
}
|
|
}
|
|
$form[$form_state['section']] = array(
|
|
$form[$form_state['section']] = array(
|
|
@@ -2117,7 +2126,12 @@ class views_plugin_display extends views_plugin {
|
|
$plugin = $this->get_plugin('exposed_form');
|
|
$plugin = $this->get_plugin('exposed_form');
|
|
$form['#title'] .= t('Exposed form options');
|
|
$form['#title'] .= t('Exposed form options');
|
|
if ($plugin) {
|
|
if ($plugin) {
|
|
- $form['#help_topic'] = $plugin->definition['help topic'];
|
|
|
|
|
|
+ if (!empty($plugin->definition['help topic'])) {
|
|
|
|
+ $form['#help_topic'] = $plugin->definition['help topic'];
|
|
|
|
+ }
|
|
|
|
+ if (!empty($plugin->definition['module'])) {
|
|
|
|
+ $form['#help_module'] = $plugin->definition['module'];
|
|
|
|
+ }
|
|
|
|
|
|
$form['exposed_form_options'] = array(
|
|
$form['exposed_form_options'] = array(
|
|
'#tree' => TRUE,
|
|
'#tree' => TRUE,
|
|
@@ -2154,7 +2168,12 @@ class views_plugin_display extends views_plugin {
|
|
$plugin = $this->get_plugin('pager');
|
|
$plugin = $this->get_plugin('pager');
|
|
$form['#title'] .= t('Pager options');
|
|
$form['#title'] .= t('Pager options');
|
|
if ($plugin) {
|
|
if ($plugin) {
|
|
- $form['#help_topic'] = $plugin->definition['help topic'];
|
|
|
|
|
|
+ if (!empty($plugin->definition['help topic'])) {
|
|
|
|
+ $form['#help_topic'] = $plugin->definition['help topic'];
|
|
|
|
+ }
|
|
|
|
+ if (!empty($plugin->definition['module'])) {
|
|
|
|
+ $form['#help_module'] = $plugin->definition['module'];
|
|
|
|
+ }
|
|
|
|
|
|
$form['pager_options'] = array(
|
|
$form['pager_options'] = array(
|
|
'#tree' => TRUE,
|
|
'#tree' => TRUE,
|
|
@@ -2556,6 +2575,23 @@ class views_plugin_display extends views_plugin {
|
|
$url_options['query'] = $this->view->exposed_raw_input;
|
|
$url_options['query'] = $this->view->exposed_raw_input;
|
|
}
|
|
}
|
|
$theme = views_theme_functions('views_more', $this->view, $this->display);
|
|
$theme = views_theme_functions('views_more', $this->view, $this->display);
|
|
|
|
+
|
|
|
|
+ $parsed_url = drupal_parse_url($path);
|
|
|
|
+ // Preserve the query string from url.
|
|
|
|
+ if (!empty($parsed_url['query'])) {
|
|
|
|
+ if (!empty($url_options['query'])) {
|
|
|
|
+ $url_options['query'] = array_merge($parsed_url['query'], $url_options['query']);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ $url_options['query'] = $parsed_url['query'];
|
|
|
|
+ }
|
|
|
|
+ $path = $parsed_url['path'];
|
|
|
|
+ }
|
|
|
|
+ // Add fragment if applicable.
|
|
|
|
+ if (!empty($parsed_url['fragment'])) {
|
|
|
|
+ $url_options['fragment'] = $parsed_url['fragment'];
|
|
|
|
+ }
|
|
|
|
+
|
|
$path = check_url(url($path, $url_options));
|
|
$path = check_url(url($path, $url_options));
|
|
|
|
|
|
return theme($theme, array('more_url' => $path, 'link_text' => check_plain($this->use_more_text()), 'view' => $this->view));
|
|
return theme($theme, array('more_url' => $path, 'link_text' => check_plain($this->use_more_text()), 'view' => $this->view));
|