* Provide structure for the administrative interface to Views.
*/
+/*
+ * Implementation of hook_menu()
+ */
function views_ui_menu() {
$items = array();
);
// autocompletes for handlers and such
- // Path is not admin/build/views due to menu complications with the wildcards from
- // the generic ajax callback.
- $items['admin/views/ajax/autocomplete/user'] = $callback + array(
- 'page callback' => 'views_ui_autocomplete_user',
- );
$items['admin/views/ajax/autocomplete/tag'] = $callback + array(
'page callback' => 'views_ui_autocomplete_tag',
);
return $items;
}
-function views_ui_help($path, $arg) {
+/*
+ * Implementation of hook_help()
+ */
+function views_ui_help($path, $arg = '') {
switch ($path) {
case 'admin/build/views/tools/convert':
return '<p>' . t('The converter will make a best-effort attempt to convert a Views 1 view to Views 2. This conversion is not reliable; you will very likely have to make adjustments to your view to get it to match. You can import Views 1 views through the normal Import tab.') . '</p>';
}
/*
- * Implementation of hook_perm()
+ * Implementation of hook_theme()
*/
-function views_perm() {
- return array('administer views');
-}
-
function views_ui_theme() {
$path = drupal_get_path('module', 'views');
require_once "./$path/includes/admin.inc";
),
'views_ui_rearrange_form' => array(
'arguments' => array('form' => NULL),
- 'file' => '/includes/admin.inc',
+ 'file' => 'includes/admin.inc',
),
// list views
'path' => "$path/theme",
),
'views_ui_list_views_form' => array(
- 'file' => '/includes/admin.inc',
+ 'file' => 'includes/admin.inc',
'arguments' => array('form' => NULL),
),
// tab themes
'views_tabset' => array(
'arguments' => array('tabs' => NULL),
- 'file' => '/includes/tabs.inc',
+ 'file' => 'includes/tabs.inc',
),
'views_tab' => array(
'arguments' => array('body' => NULL),
- 'file' => '/includes/tabs.inc',
+ 'file' => 'includes/tabs.inc',
),
// On behalf of a plugin
'views_ui_style_plugin_table' => array(
'arguments' => array('form' => NULL),
+ 'file' => 'includes/admin.inc',
),
);
}
*/
function views_ui_cache_set(&$view) {
if (!empty($view->locked)) {
- drupal_set_message('Changes cannot be made to a locked view.', 'error');
+ drupal_set_message(t('Changes cannot be made to a locked view.'), 'error');
return;
}
views_include('cache');