Commit 3f66ae28 authored by merlinofchaos's avatar merlinofchaos

Some more theme re-org

parent d69aa078
......@@ -73,7 +73,7 @@ function views_views_plugins() {
'title' => t('Fields'),
'help' => t('Displays the fields with an optional template.'),
'handler' => 'views_row_plugin',
'theme' => 'views_view_row',
'theme' => 'views_view_fields',
'uses fields' => TRUE,
),
),
......@@ -1154,7 +1154,7 @@ class views_style_plugin_default extends views_style_plugin {
// @todo: Include separator as an option.
$rows .= $this->row_plugin->render($row);
}
return theme(array('views_view_unformatted__' . $this->view->name, 'views_view_unformatted'), $this->view, $rows);
return theme(array('views_view_unformatted__' . $this->view->name, 'views_view_unformatted'), $this->view, $this->options, $rows);
}
}
......@@ -1196,7 +1196,7 @@ class views_style_plugin_list extends views_style_plugin {
// @todo: Include separator as an option.
$rows .= $this->row_plugin->render($row);
}
return theme(array('views_view_list__' . $this->view->name, 'views_view_list'), $this->view, $rows);
return theme(array('views_view_list__' . $this->view->name, 'views_view_list'), $this->view, $this->options, $rows);
}
}
......@@ -1256,10 +1256,9 @@ class views_style_plugin_summary extends views_style_plugin {
$rows = array();
while ($row = db_fetch_object($this->view->result)) {
// @todo: Include separator as an option.
// $rows[] = theme(array('views_view_row_summary__' . $this->view->name, 'views_view_row_summary'), $this->view, $row);
$rows[] = $row;
}
return theme(array('views_view_summary__' . $this->view->name, 'views_view_summary'), $this->view, $rows);
return theme(array('views_view_summary__' . $this->view->name, 'views_view_summary'), $this->view, $this->options, $rows);
}
}
......@@ -1299,7 +1298,7 @@ class views_row_plugin extends views_object {
* of some form, but not always.
*/
function render($row) {
return theme(array('views_view_row__' . $this->view->name, 'views_view_row'), $this->view, $row);
return theme(array('views_view_fields__' . $this->view->name, 'views_view_fields'), $this->view, $this->options, $row);
}
}
......
......@@ -965,45 +965,40 @@ class views_db_object {
}
}
class views_sub_object {
var $table = '';
var $field = '';
var $relationship = '';
}
/**
* An argument in a view.
*/
class views_argument extends views_db_object {
var $db_table = 'views_argument';
function views_argument($init = TRUE) {
parent::init($init);
$this->default_argument = 'ignore';
}
class views_argument extends views_sub_object {
}
/**
* A field in a view.
*/
class views_field extends views_db_object {
var $db_table = 'views_field';
function views_field($init = TRUE) {
parent::init($init);
}
class views_field extends views_sub_object {
}
/**
* A sort criterion in a view.
*/
class views_sort extends views_db_object {
var $db_table = 'views_sort';
function views_sort($init = TRUE) {
parent::init($init);
}
class views_sort extends views_sub_object {
}
/**
* A filter in a view.
*/
class views_filter extends views_db_object {
var $db_table = 'views_filter';
function views_filter($init = TRUE) {
parent::init($init);
}
class views_filter extends views_sub_object {
}
/**
* A relationship in a view.
*/
class views_relationship extends views_sub_object {
}
/**
......@@ -1026,15 +1021,6 @@ class views_display extends views_db_object {
}
}
/**
* A relationship in a view.
*/
class views_relationship extends views_db_object {
var $db_table = 'views_relationship';
function views_relationship($init = TRUE) {
parent::init($init);
}
}
/**
* @}
......
......@@ -160,6 +160,16 @@ function node_views_data() {
),
);
// Bogus fields for aliasing purposes.
$data['node']['year_month'] = array(
'title' => t('Year + month'),
'help' => t('In the form of YYYYMM'),
'argument' => array(
'handler' => 'views_handler_argument_date_year_month',
),
);
// ----------------------------------------------------------------------
// Node revisions table
......
<?php
// $Id$
/**
* @file views-view-row.tpl.php
* Default simple view template to display a list of rows.
* @file views-view-fields.tpl.php
* Default simple view template to all the fields as a row.
*
* @ingroup views_templates
*/
......
<?php
// $Id$
/**
* @file views-view-rows.tpl.php
* Default simple view template to display a list of rows.
*
* @ingroup views_templates
*/
?>
<?php print $rows ?>
\ No newline at end of file
......@@ -10,7 +10,10 @@
<div class="item-list">
<ul>
<?php foreach ($rows as $row): ?>
<li><a href="<?php print $row->url; ?>"><?php print $row->link; ?></a> (<?php print $row->count?>)
<li><a href="<?php print $row->url; ?>"><?php print $row->link; ?></a>
<?php if (!empty($options['count'])): ?>
(<?php print $row->count?>)
<?php endif; ?>
<?php endforeach; ?>
</ul>
</div>
<?php
// $Id$
/**
* @file views-view-row-summary.tpl.php
* @file views-view-unformatted.tpl.php
* Default simple view template to display a list of rows.
*
* @ingroup views_templates
*/
?>
<?php print $rows ?>
\ No newline at end of file
......@@ -22,8 +22,8 @@ function views_theme() {
$arguments = array(
'display' => array('view' => NULL),
'style' => array('view' => NULL, 'rows' => NULL),
'row' => array('view' => NULL, 'row' => NULL),
'style' => array('view' => NULL, 'options' => NULL, 'rows' => NULL),
'row' => array('view' => NULL, 'options' => NULL, 'row' => NULL),
);
// Default view themes
......
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