? .DS_Store
? .morelink2.patch.swp
? morelink2.patch
? includes/.DS_Store
? includes/.admin.inc.swp
? includes/.plugins.inc.swp
? includes/.view.inc.swp
? theme/.DS_Store
? theme/.theme.inc.swp
Index: views.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/views.module,v
retrieving revision 1.234
diff -u -p -r1.234 views.module
--- views.module	21 Mar 2008 23:20:06 -0000	1.234
+++ views.module	22 Mar 2008 22:43:22 -0000
@@ -72,6 +72,12 @@ function views_theme() {
     'arguments' => array('form' => NULL),
   );
 
+  $hooks['views_more'] = $base + array(
+    'template' => 'views-more',
+    'pattern' => 'views_more__',
+    'arguments' => array('more_url' => NULL),
+  );
+
   return $hooks;
 }
 
Index: includes/plugins.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/plugins.inc,v
retrieving revision 1.40
diff -u -p -r1.40 plugins.inc
--- includes/plugins.inc	21 Mar 2008 09:24:12 -0000	1.40
+++ includes/plugins.inc	22 Mar 2008 22:43:26 -0000
@@ -22,6 +22,7 @@ function views_views_plugins() {
         'no remove' => TRUE,
         'js' => array('misc/collapse.js', 'misc/textarea.js', 'misc/tabledrag.js', "$path/dependent.js"),
         'use pager' => TRUE,
+        'use more' => TRUE,
       ),
       'page' => array(
         'title' => t('Page'),
@@ -35,6 +36,7 @@ function views_views_plugins() {
         'help' => t('Display the view as a block.'),
         'handler' => 'views_plugin_display_block',
         'uses hook block' => TRUE,
+        'use more' => TRUE,
       ),
     ),
     'style' => array(
@@ -188,6 +190,16 @@ class views_plugin_display extends views
   }
 
   /**
+   * Does the display have a more link enabled?
+   */
+  function use_more() {
+    if (!empty($this->definition['use more'])) {
+      return $this->get_option('use_more');
+    }
+    return FALSE;
+  }
+
+  /**
    * Static member function to list which sections are defaultable
    * and what items each section contains.
    */
@@ -200,6 +212,7 @@ class views_plugin_display extends views
       'empty' => array('empty', 'empty_format'),
       'items_per_page' => array('items_per_page', 'offset', 'use_pager', 'pager_element'),
       'use_pager' => array('items_per_page', 'offset', 'use_pager', 'pager_element'),
+      'use_more' => array('use_more'),
       'link_display' => array('link_display'),
 
     // @todo
@@ -253,6 +266,7 @@ class views_plugin_display extends views
       'offset' => TRUE,
       'use_pager' => TRUE,
       'pager_element'  => TRUE,
+      'use_more' => TRUE,
 
       'link_display' => TRUE,
       'php_arg_code' => TRUE,
@@ -450,12 +464,21 @@ class views_plugin_display extends views
         'value' => $this->get_option('use_pager') ? t('Yes') : t('No'),
       );
     }
+
     $options['items_per_page'] = array(
       'category' => 'basic',
       'title' => $this->use_pager() ? t('Items per page') : t('Items to display'),
       'value' => intval($this->get_option('items_per_page')),
     );
 
+    if (!empty($this->definition['use more'])) {
+      $options['use_more'] = array(
+        'category' => 'basic',
+        'title' => t('More link'),
+        'value' => $this->get_option('use_more') ? t('Yes') : t('No'),
+      );
+    }
+
     $access = $this->get_option('access');
     if (!is_array($access)) {
       $access = array('type' => 'none');
@@ -604,6 +627,15 @@ class views_plugin_display extends views
           '#default_value' => intval($this->get_option('offset')),
         );
         break;
+      case 'use_more':
+        $form['#title'] .= t('Add a more link to the bottom of the display.');
+        $form['use_more'] = array(
+          '#type' => 'checkbox',
+          '#title' => t('Create more link'),
+          '#description' => t('This will add a more link to the bottom of this view. The link will point to the display specified in \'Link display\' above.'),
+          '#default_value' => $this->get_option('use_more'),
+        );
+        break;
       case 'access':
         $form['#title'] .= t('Access restrictions');
         $form['access'] = array(
@@ -803,6 +835,9 @@ class views_plugin_display extends views
         $this->set_option($section, intval($form_state['values'][$section]));
         $this->set_option('offset', intval($form_state['values']['offset']));
         break;
+      case 'use_more':
+        $this->set_option($section, $form_state['values'][$section]);
+        break;
       case 'row_plugin':
         // This if prevents resetting options to default if they don't change
         // the plugin.
@@ -922,9 +957,18 @@ class views_plugin_display extends views
   function render_filters() { }
 
   /**
-   * Not all display plugins will have a 'more' link
+   * Render the 'more' link
    */
-  function render_more_link() { }
+  function render_more_link() {
+    if ($this->use_more()) {
+      $path = $this->get_path();
+      if ($path) {
+        $theme = views_theme_functions('views_more', $this->view, $this->display);
+        $path = check_url(url($path));
+        return theme($theme, $path);
+      }
+    }
+  }
 
   /**
    * Not all display plugins will have a feed icon.
Index: theme/views-more.tpl.php
===================================================================
RCS file: theme/views-more.tpl.php
diff -N theme/views-more.tpl.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ theme/views-more.tpl.php	22 Mar 2008 22:43:28 -0000
@@ -0,0 +1,13 @@
+<?php
+// $Id$
+/**
+ * @file views-more.tpl.php
+ * Theme the more link
+ *
+ * - $more_url: the url for the more link
+ *
+ * @ingroup views_templates
+ */
+?>
+
+<a href="<?php print $more_url ?>">View more</a>
Index: theme/views-view.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/theme/views-view.tpl.php,v
retrieving revision 1.5
diff -u -p -r1.5 views-view.tpl.php
--- theme/views-view.tpl.php	20 Feb 2008 01:08:25 -0000	1.5
+++ theme/views-view.tpl.php	22 Mar 2008 22:43:28 -0000
@@ -12,6 +12,7 @@
  * - $pager: The pager next/prev links to display, if any
  * - $exposed: Exposed widget form/info to display
  * - $feed_icon: Feed icon to display, if any
+ * - $more: A link to view more, if any
  *
  * @ingroup views_templates
  */
@@ -43,6 +44,10 @@
     <?php print $pager; ?>
   <?php endif; ?>
 
+  <?php if ($more): ?>
+    <?php print $more; ?>
+  <?php endif; ?>
+
   <?php if ($footer): ?>
     <div class="view-footer">
       <?php print $footer; ?>
