Commit e3b1e123 authored by tim.plunkett's avatar tim.plunkett
Browse files

Issue #1757234 by dawehner, tim.plunkett: Remove advanced help integration.

parent 2f6501e4
......@@ -9,7 +9,6 @@ sql_signature: '0'
ui:
show:
additional_queries: '0'
advanced_help_warning: '1'
advanced_column: '0'
listing_filters: '0'
master_display: '0'
......
/**
* The .advanced_help.css file is intended to contain styles that override declarations
* in the Advanced Help module.
*/
/**
* Adjust the advanced help icons
*/
.views-ui-display-tab-bucket .advanced-help-link {
padding: 0;
margin: 5px 3px 0px 6px; /* LTR */
}
.views-ui-display-tab-bucket .icon-text {
padding-left: 25px; /* LTR */
}
.views-ui-display-tab-bucket .icon-linked {
background-position: 6px -151px; /* LTR */
}
.views-ui-display-tab-bucket .icon-unlinked {
background-position: 6px -193px; /* LTR */
}
......@@ -52,7 +52,7 @@ function views_ui_get_admin_css() {
$theme_key = isset($themes[$theme_key]->base_theme) ? $themes[$theme_key]->base_theme : '';
}
// Views contains style overrides for the following modules
$module_list = array('contextual', 'advanced_help', 'ctools');
$module_list = array('contextual', 'ctools');
foreach ($module_list as $module) {
if (module_exists($module)) {
$list[$module_path . '/css/views-admin.' . $module . '.css'] = array();
......@@ -71,30 +71,6 @@ function views_ui_add_admin_css() {
}
}
/**
* Check to see if the advanced help module is installed, and if not put up
* a message.
*
* Only call this function if the user is already in a position for this to
* be useful.
*/
function views_ui_check_advanced_help() {
if (!config('views.settings')->get('ui.show.advanced_help_warning')) {
return;
}
if (!module_exists('advanced_help')) {
$filename = db_query_range("SELECT filename FROM {system} WHERE type = 'module' AND name = 'advanced_help'", 0, 1)
->fetchField();
if ($filename && file_exists($filename)) {
drupal_set_message(t('If you <a href="@modules">enable the advanced help module</a>, Views will provide more and better help. <a href="@hide">Hide this message.</a>', array('@modules' => url('admin/modules'), '@hide' => url('admin/structure/views/settings'))));
}
else {
drupal_set_message(t('If you install the advanced help module from !href, Views will provide more and better help. <a href="@hide">Hide this message.</a>', array('!href' => l('http://drupal.org/project/advanced_help', 'http://drupal.org/project/advanced_help'), '@hide' => url('admin/structure/views/settings'))));
}
}
}
/**
* Returns the results of the live preview.
*/
......@@ -1802,10 +1778,6 @@ function template_preprocess_views_ui_display_tab_setting(&$variables) {
function template_preprocess_views_ui_display_tab_bucket(&$variables) {
$element = $variables['element'];
$variables['item_help_icon'] = '';
if (!empty($element['#item_help_icon'])) {
$variables['item_help_icon'] = render($element['#item_help_icon']);
}
if (!empty($element['#name'])) {
$variables['attributes']['class'][] = drupal_html_class($element['#name']);
}
......@@ -2185,13 +2157,6 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
$build['#overridden'] = FALSE;
$build['#defaulted'] = FALSE;
if (module_exists('advanced_help')) {
$build['#item_help_icon'] = array(
'#theme' => 'advanced_help_topic',
'#module' => 'views',
'#topic' => $type,
);
}
$build['#name'] = $build['#title'] = $types[$type]['title'];
......@@ -2493,12 +2458,6 @@ function views_ui_standard_form_buttons(&$form, &$form_state, $form_id, $name =
if (isset($form['#title'])) {
$form_state['title'] = $form['#title'];
}
if (isset($form['#help_topic'])) {
$form_state['help_topic'] = $form['#help_topic'];
}
if (isset($form['#help_module'])) {
$form_state['help_module'] = $form['#help_module'];
}
if (isset($form['#url'])) {
$form_state['url'] = $form['#url'];
}
......@@ -4768,11 +4727,6 @@ function views_ui_admin_settings_basic($form, &$form_state) {
'#title' => t('Show filters on the list of views'),
'#default_value' => $config->get('ui.show.listing_filters'),
);
$form['basic']['ui_show_advanced_help_warning'] = array(
'#type' => 'checkbox',
'#title' => t('Show advanced help warning'),
'#default_value' => $config->get('ui.show.advanced_help_warning'),
);
$form['basic']['ui_show_master_display'] = array(
'#type' => 'checkbox',
......@@ -4874,7 +4828,6 @@ function views_ui_admin_settings_basic($form, &$form_state) {
function views_ui_admin_settings_basic_submit(&$form, &$form_state) {
config('views.settings')
->set('ui.show.listing_filters', $form_state['values']['ui_show_listing_filters'])
->set('ui.show.advanced_help_warning', $form_state['values']['ui_show_advanced_help_warning'])
->set('ui.show.master_display', $form_state['values']['ui_show_master_display'])
->set('ui.show.advanced_column', $form_state['values']['ui_show_advanced_column'])
->set('ui.show.display_embed', $form_state['values']['ui_show_display_embed'])
......
......@@ -256,12 +256,6 @@ function views_ajax_form_wrapper($form_id, &$form_state) {
$display .= $output;
$title = empty($form_state['title']) ? '' : $form_state['title'];
if (!empty($form_state['help_topic'])) {
$module = !empty($form_state['help_module']) ? $form_state['help_module'] : 'views';
if (module_exists('advanced_help')) {
$title = theme('advanced_help_topic', array('module' => $module, 'topic' => $form_state['help_topic'])) . $title;
}
}
$url = empty($form_state['url']) ? url(current_path(), array('absolute' => TRUE)) : $form_state['url'];
......
......@@ -18,8 +18,7 @@
* @Plugin(
* id = "none",
* title = @Translation("None"),
* help = @Translation("Will be available to all users."),
* help_topic = "access-none"
* help = @Translation("Will be available to all users.")
* )
*/
class None extends AccessPluginBase {
......
......@@ -18,8 +18,7 @@
* @Plugin(
* id = "perm",
* title = @Translation("Permission"),
* help = @Translation("Access will be granted to users with the specified permission string."),
* help_topic = "access-perm"
* help = @Translation("Access will be granted to users with the specified permission string.")
* )
*/
class Permission extends AccessPluginBase {
......
......@@ -18,8 +18,7 @@
* @Plugin(
* id = "role",
* title = @Translation("Role"),
* help = @Translation("Access will be granted to users with any of the specified roles."),
* help_topic = "access-role"
* help = @Translation("Access will be granted to users with any of the specified roles.")
* )
*/
class Role extends AccessPluginBase {
......
......@@ -18,8 +18,7 @@
* @Plugin(
* id = "none",
* title = @Translation("None"),
* help = @Translation("No caching of Views data."),
* help_topic = "cache-none"
* help = @Translation("No caching of Views data.")
* )
*/
class None extends CachePluginBase {
......
......@@ -18,8 +18,7 @@
* @Plugin(
* id = "time",
* title = @Translation("Time-based"),
* help = @Translation("Simple time-based caching of data."),
* help_topic = "cache-time"
* help = @Translation("Simple time-based caching of data.")
* )
*/
class Time extends CachePluginBase {
......
......@@ -25,8 +25,7 @@
* help = @Translation("Attachments added to other displays to achieve multiple views in the same view."),
* theme = "views_view",
* contextual_links_locations = {""},
* accept_attachments = FALSE,
* help_topic = "display-attachment"
* accept_attachments = FALSE
* )
*/
class Attachment extends DisplayPluginBase {
......
......@@ -23,8 +23,7 @@
* uses_hook_block = TRUE,
* contextual_links_locations = {"block"},
* accept_attachments = TRUE,
* admin = @Translation("Block"),
* help_topic = "display-block"
* admin = @Translation("Block")
* )
*/
class Block extends DisplayPluginBase {
......
......@@ -21,8 +21,7 @@
* help = @Translation("Default settings for this view."),
* theme = "views_view",
* no_ui = TRUE,
* accept_attachments = TRUE,
* help_topic = "display-default"
* accept_attachments = TRUE
* )
*/
class DefaultDisplay extends DisplayPluginBase {
......
......@@ -1507,9 +1507,6 @@ function options_form(&$form, &$form_state) {
$plugin = $this->get_plugin('access');
$form['#title'] .= t('Access options');
if ($plugin) {
$form['#help_topic'] = $plugin->definition['help_topic'];
$form['#help_module'] = $plugin->definition['module'];
$form['access_options'] = array(
'#tree' => TRUE,
);
......@@ -1549,9 +1546,6 @@ function options_form(&$form, &$form_state) {
$plugin = $this->get_plugin('cache');
$form['#title'] .= t('Caching options');
if ($plugin) {
$form['#help_topic'] = $plugin->definition['help topic'];
$form['#help_module'] = $plugin->definition['module'];
$form['cache_options'] = array(
'#tree' => TRUE,
);
......@@ -1569,14 +1563,6 @@ function options_form(&$form, &$form_state) {
$form['#title'] .= t('Query options');
$this->view->init_query();
if ($this->view->query) {
if (isset($this->view->query->definition['help_topic'])) {
$form['#help_topic'] = $this->view->query->definition['help_topic'];
}
if (isset($this->view->query->definition['module'])) {
$form['#help_module'] = $this->view->query->definition['module'];
}
$form['query'] = array(
'#tree' => TRUE,
'type' => array(
......@@ -1636,7 +1622,6 @@ function options_form(&$form, &$form_state) {
case 'style_plugin':
$manager = new ViewsPluginManager('style');
$form['#title'] .= t('How should this view be styled');
$form['#help_topic'] = 'style';
$form['style_plugin'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('style', $this->get_style_type(), array($this->view->base_table)),
......@@ -1669,10 +1654,6 @@ function options_form(&$form, &$form_state) {
}
$plugin = $this->get_plugin(empty($style) ? 'row' : 'style');
if ($plugin) {
if (isset($plugin->definition['help_topic'])) {
$form['#help_topic'] = $plugin->definition['help_topic'];
$form['#help_module'] = $plugin->definition['module'];
}
$form[$form_state['section']] = array(
'#tree' => TRUE,
);
......@@ -1681,7 +1662,6 @@ function options_form(&$form, &$form_state) {
break;
case 'row_plugin':
$form['#title'] .= t('How should each row in this view be styled');
$form['#help_topic'] = 'style-row';
$form['row_plugin'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('row', $this->get_style_type(), array($this->view->base_table)),
......@@ -1754,8 +1734,6 @@ function options_form(&$form, &$form_state) {
break;
case 'analyze-theme':
$form['#title'] .= t('Theming information');
$form['#help_topic'] = 'analyze-theme';
if ($theme = drupal_container()->get('request')->request->get('theme')) {
$this->theme = $theme;
}
......@@ -2056,8 +2034,6 @@ function options_form(&$form, &$form_state) {
$plugin = $this->get_plugin('exposed_form');
$form['#title'] .= t('Exposed form options');
if ($plugin) {
$form['#help_topic'] = $plugin->definition['help_topic'];
$form['exposed_form_options'] = array(
'#tree' => TRUE,
);
......@@ -2093,8 +2069,6 @@ function options_form(&$form, &$form_state) {
$plugin = $this->get_plugin('pager');
$form['#title'] .= t('Pager options');
if ($plugin) {
$form['#help_topic'] = $plugin->definition['help_topic'];
$form['pager_options'] = array(
'#tree' => TRUE,
);
......
......@@ -24,8 +24,7 @@
* help = @Translation("Provide a display which can be embedded using the views api."),
* theme = "views_view",
* uses_hook_menu = FALSE,
* accept_attachments = FALSE,
* help_topic = "display-embed"
* accept_attachments = FALSE
* )
*/
class Embed extends DisplayPluginBase {
......
......@@ -24,8 +24,7 @@
* help = @Translation("Display the view as a feed, such as an RSS feed."),
* uses_hook_menu = TRUE,
* accept_attachments = FALSE,
* admin = @Translation("Feed"),
* help_topic = "display-feed"
* admin = @Translation("Feed")
* )
*/
class Feed extends Page {
......
......@@ -23,8 +23,7 @@
* contextual_links_locations = {"page"},
* theme = "views_view",
* accept_attachments = TRUE,
* admin = @Translation("Page"),
* help_topic = "display-page"
* admin = @Translation("Page")
* )
*/
class Page extends DisplayPluginBase {
......@@ -322,7 +321,6 @@ function options_form(&$form, &$form_state) {
switch ($form_state['section']) {
case 'path':
$form['#title'] .= t('The menu path or URL of this view');
$form['#help_topic'] = 'path';
$form['path'] = array(
'#type' => 'textfield',
'#description' => t('This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for contextual filters: For example, "node/%/feed".'),
......@@ -334,7 +332,6 @@ function options_form(&$form, &$form_state) {
break;
case 'menu':
$form['#title'] .= t('Menu item entry');
$form['#help_topic'] = 'menu';
$form['menu'] = array(
'#prefix' => '<div class="clearfix">',
'#suffix' => '</div>',
......
......@@ -18,8 +18,7 @@
* @Plugin(
* id = "basic",
* title = @Translation("Basic"),
* help = @Translation("Basic exposed form"),
* help_topic = "exposed-form-basic"
* help = @Translation("Basic exposed form")
* )
*/
class Basic extends ExposedFormPluginBase {
......
......@@ -18,8 +18,7 @@
* @Plugin(
* id = "input_required",
* title = @Translation("Input required"),
* help = @Translation("An exposed form that only renders a view if the form contains user input."),
* help_topic = "exposed-form-input-required"
* help = @Translation("An exposed form that only renders a view if the form contains user input.")
* )
*/
class InputRequired extends ExposedFormPluginBase {
......
......@@ -18,8 +18,7 @@
* @Plugin(
* id = "core",
* title = @Translation("Core"),
* help = @Translation("Use Drupal core t() function. Not recommended, as it doesn't support updates to existing strings."),
* help_topic = "localization-core"
* help = @Translation("Use Drupal core t() function. Not recommended, as it doesn't support updates to existing strings.")
* )
*/
class Core extends LocalizationPluginBase {
......
......@@ -18,8 +18,7 @@
* @Plugin(
* id = "none",
* title = @Translation("None"),
* help = @Translation("Do not pass admin strings for translation."),
* help_topic = "localization-none"
* help = @Translation("Do not pass admin strings for translation.")
* )
*/
class None extends LocalizationPluginBase {
......
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