diff --git a/views_content/plugins/content_types/views_panes.inc b/views_content/plugins/content_types/views_panes.inc index 07e93f7..9654869 100644 --- a/views_content/plugins/content_types/views_panes.inc +++ b/views_content/plugins/content_types/views_panes.inc @@ -233,6 +233,9 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a } else { $view->display_handler->set_option('use_more', TRUE); + if ($allow['more_text'] && !empty($conf['more_text'])) { + $view->display_handler->set_option('use_more_text', ctools_context_keyword_substitute($conf['more_text'], array(), $contexts)); + } // Make sure the view runs the count query so we know whether or not the // more link applies. $view->get_total_rows = TRUE; @@ -333,6 +336,7 @@ function views_content_views_panes_add_defaults(&$conf, $view) { $conf += array( 'link_to_view' => $view->display_handler->get_option('link_to_view'), 'more_link' => $view->display_handler->get_option('use_more'), + 'more_text' => $view->display_handler->get_option('more_text'), 'feed_icons' => FALSE, 'use_pager' => $pager['type'] != 'none' && $pager['type'] != 'some', 'pager_id' => isset($pager['options']['id']) ? $pager['options']['id'] : 0, @@ -397,10 +401,17 @@ function views_content_views_panes_content_type_edit_form($form, &$form_state) { $form['more_link'] = array( '#type' => 'checkbox', '#default_value' => isset($conf['more_link']) ? $conf['more_link'] : $view->display_handler->get_option('use_more'), - '#description' => t('The text of this link will be "@more". This setting can only be modified on the View configuration.', array('@more' => $view->display_handler->use_more_text())), '#title' => t('Provide a "more" link.'), ); } + if ($allow['more_text']) { + $form['more_text'] = array( + '#type' => 'textfield', + '#default_value' => isset($conf['more_text']) ? $conf['more_text'] : '', + '#title' => t('Override "more" text'), + '#description' => t('Leave blank to use the default text: "@more"', array('@more' => $view->display_handler->use_more_text())), + ); + } if (!empty($allow['feed_icons'])) { $form['feed_icons'] = array( @@ -569,7 +580,7 @@ function views_content_views_panes_content_type_edit_form($form, &$form_state) { */ function views_content_views_panes_content_type_edit_form_submit(&$form, &$form_state) { // Copy everything from our defaults. - $keys = array('link_to_view', 'more_link', 'feed_icons', 'use_pager', + $keys = array('link_to_view', 'more_link', 'more_text', 'feed_icons', 'use_pager', 'pager_id', 'items_per_page', 'offset', 'path_override', 'path', 'arguments', 'fields_override', 'exposed', ); diff --git a/views_content/plugins/views/views_content_plugin_display_panel_pane.inc b/views_content/plugins/views/views_content_plugin_display_panel_pane.inc index 05d3478..442496c 100644 --- a/views_content/plugins/views/views_content_plugin_display_panel_pane.inc +++ b/views_content/plugins/views/views_content_plugin_display_panel_pane.inc @@ -31,6 +31,7 @@ class views_content_plugin_display_panel_pane extends views_plugin_display { 'offset' => array('default' => FALSE), 'link_to_view' => array('default' => FALSE), 'more_link' => array('default' => FALSE), + 'more_text' => array('default' => FALSE), 'path_override' => array('default' => FALSE), 'title_override' => array('default' => FALSE), 'exposed_form' => array('default' => FALSE), @@ -167,6 +168,7 @@ class views_content_plugin_display_panel_pane extends views_plugin_display { 'offset' => t('Pager offset'), 'link_to_view' => t('Link to view'), 'more_link' => t('More link'), + 'more_text' => t('More text'), 'path_override' => t('Path override'), 'title_override' => t('Title override'), 'exposed_form' => t('Use exposed widgets form as pane configuration'),