summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--help/field.html6
-rw-r--r--help/filter.html13
-rw-r--r--includes/plugins.inc10
-rw-r--r--modules/node.views.inc36
-rw-r--r--modules/user.views.inc2
5 files changed, 41 insertions, 26 deletions
diff --git a/help/field.html b/help/field.html
index d8a4d0b..b68ca31 100644
--- a/help/field.html
+++ b/help/field.html
@@ -1,2 +1,6 @@
<!-- $Id$ -->
-@todo text needed \ No newline at end of file
+Fields are the individual pieces of data being displayed. Adding the fields <em>Node: Title</em>, <em>Node: Type</em>, and <em>Node: Post date</em> to a node view, for example, includes the title, content type and creation date in the displayed results).
+
+Fields may not appear on every display, because not all style plugins actually use fields. For example, the 'node' row plugin simply displays the node through Drupal's normal mechanisms, and fields are not involved.
+
+For the most part, the field settings should be self explanatory. Fields will appear in the order that they are arranged in, and they will usually appear with the label they are given. \ No newline at end of file
diff --git a/help/filter.html b/help/filter.html
index d8a4d0b..913aa89 100644
--- a/help/filter.html
+++ b/help/filter.html
@@ -1,2 +1,13 @@
<!-- $Id$ -->
-@todo text needed \ No newline at end of file
+Filters are used to reduce the data set that Views provides. That is to say, without any filters applied, Views will return all of your content. You don't want that, so at least some filters must be used.
+
+Some very commonly used filters:
+<ul>
+<li> The 'Node: Published' filter is used to restrict a node View to only nodes that are are have the 'published' box checked. This can be very important to prevent users from viewing content they should not have access to.</li>
+<li> The 'Node: Promoted to front page' filter can be used to show only nodes that have the 'promote to front page' turned on. </li>
+<li> The 'Node: Type' filter is useful for showing only certain types of nodes. Let's say you wanted users to see only nodes that were 'book' nodes, or a combination of 'book' nodes and 'staff-blog' nodes. This filter allows you to select exactly that.</li>
+<li> The 'User: Current' filter will show only nodes that the logged in user has authored.</li>
+<li> The 'Node: Post date' filter can be used to show only nodes posted before, after, or between a range of dates.
+</ul>
+
+The above list is only a tiny fraction of the filters available in Views, referenced here to give an idea of the kinds of tasks filters can accomplish. \ No newline at end of file
diff --git a/includes/plugins.inc b/includes/plugins.inc
index 7989502..e60f910 100644
--- a/includes/plugins.inc
+++ b/includes/plugins.inc
@@ -1070,7 +1070,7 @@ class views_plugin_display extends views_plugin {
break;
case 'analyze-theme-display':
$form['#title'] .= t('Theming information (display)');
- $output = '';
+ $output = '<p>' . t('Back to !info.', array('!info' => $this->option_link(t('theming information'), 'analyze-theme'))) . '</p>';
if (empty($this->definition['theme'])) {
$output .= t('This display has no theming information');
@@ -1089,7 +1089,7 @@ class views_plugin_display extends views_plugin {
break;
case 'analyze-theme-style':
$form['#title'] .= t('Theming information (style)');
- $output = '';
+ $output = '<p>' . t('Back to !info.', array('!info' => $this->option_link(t('theming information'), 'analyze-theme'))) . '</p>';
$plugin = $this->get_plugin();
@@ -1110,7 +1110,7 @@ class views_plugin_display extends views_plugin {
break;
case 'analyze-theme-row':
$form['#title'] .= t('Theming information (row style)');
- $output = '';
+ $output = '<p>' . t('Back to !info.', array('!info' => $this->option_link(t('theming information'), 'analyze-theme'))) . '</p>';
$plugin = $this->get_plugin('row');
@@ -1131,7 +1131,7 @@ class views_plugin_display extends views_plugin {
break;
case 'analyze-theme-field':
$form['#title'] .= t('Theming information (row style)');
- $output = '';
+ $output = '<p>' . t('Back to !info.', array('!info' => $this->option_link(t('theming information'), 'analyze-theme'))) . '</p>';
$output .= '<p>' . t('This is the default theme template used for this row style.') . '</p>';
$template = "<?php\n";
@@ -2743,7 +2743,7 @@ class views_plugin_style_table extends views_plugin_style {
'#title' => t('Override normal sorting if click sorting is used'),
'#default_value' => !empty($this->options['override']),
);
-
+
$form['sticky'] = array(
'#type' => 'checkbox',
'#title' => t('Enable Drupal style "sticky" table headers (Javascript)'),
diff --git a/modules/node.views.inc b/modules/node.views.inc
index 21613f2..e1db281 100644
--- a/modules/node.views.inc
+++ b/modules/node.views.inc
@@ -34,24 +34,19 @@ function node_views_data() {
// For other base tables, explain how we join
$data['node']['table']['join'] = array(
// this explains how the 'node' table (named in the line above)
- // links toward the users table.
- 'users' => array(
+ // links toward the node_revisions table.
+ 'node_revisions' => array(
'handler' => 'views_join', // this is actually optional
- 'left_table' => 'users', // Because this is a direct link it could be left out.
- 'left_field' => 'uid',
- 'field' => 'uid',
+ 'left_table' => 'node_revisions', // Because this is a direct link it could be left out.
+ 'left_field' => 'nid',
+ 'field' => 'nid',
// also supported:
// 'type' => 'INNER',
// 'extra' => array(array('field' => 'fieldname', 'value' => 'value', 'operator' => '='))
- // Unfortunately, you can't specify other tables here, but you can construct
- // alternative joins in the handlers that can do that.
+ // Unfortunately, you can't specify other tables here, but you can construct
+ // alternative joins in the handlers that can do that.
// 'table' => 'the actual name of this table in the database',
),
- 'node_revisions' => array(
- // We link directly to node_revisions so we don't have to specify it.'
- 'left_field' => 'nid',
- 'field' => 'nid',
- ),
);
// ----------------------------------------------------------------
@@ -330,12 +325,17 @@ function node_views_data() {
'left_field' => 'vid',
'field' => 'vid',
),
- // Links to user table through node table.
- 'users' => array(
- // Since it doesn't link to the user table, we must specify
- 'left_table' => 'node',
- 'left_field' => 'vid',
- 'field' => 'vid',
+ );
+
+ // uid field
+ $data['node_revisions']['uid'] = array(
+ 'title' => t('User'),
+ 'help' => t('Relate a node revision to the user who created the revision.'),
+ 'relationship' => array(
+ 'handler' => 'views_handler_relationship',
+ 'base' => 'users',
+ 'field' => 'uid',
+ 'label' => t('user'),
),
);
diff --git a/modules/user.views.inc b/modules/user.views.inc
index 41bfd76..d67a274 100644
--- a/modules/user.views.inc
+++ b/modules/user.views.inc
@@ -33,7 +33,7 @@ function user_views_data() {
'left_field' => 'uid',
'field' => 'uid',
),
- // This will be the revision author, not the node author.
+ // This goes to the node so that we have consistent authorship.
'node_revisions' => array(
'left_field' => 'uid',
'field' => 'uid',