Commit 36882cf6 authored by Riccardo Padovani's avatar Riccardo Padovani

Added views module

parent 9dfcf076
Information about upgrading existing views from Drupal 6 to Drupal 7 is located
in the module's advanced help under api upgrading.
This diff is collapsed.
Welcome to Views 3. Please see the advanced help for more information.
If you're having trouble installing this module, please ensure that your
tar program is not flattening the directory tree, truncating filenames
or losing files.
Installing Views:
Place the entirety of this directory in sites/all/modules/views
You must also install the CTools module (http://www.drupal.org/project/ctools) to use Views.
Navigate to administer >> build >> modules. Enable Views and Views UI.
If you're new to Views, try the Simple Views module which can create some
often used Views for you, this might save you some time.
Here you can find many modules extending the functionality of Views:
http://drupal.org/taxonomy/term/89
/**
* The query details collapsible divs are not visible in IE7 because has-layout
* is not being triggered. Trigger has-layout with height: 1%;
*/
.views-edit-view .collapsible > .fieldset-wrapper {
height: 1%;
}
/**
* The column width for the bucket containers in the query details section
* is not being calculated to 32% correctly. Give IE7 a slightly smaller
* width so that the three columns line up next to each other
*/
.views-edit-view .views-display-column {
width: 31.95%;
}
/**
* IE7 has no idea how large this container should be and it doesn't
* apply has-layout. Expand it's width to 100% and trigger has-layout.
*/
.views-edit-view .views-displays {
height: 1%;
width: 100%;
}
/**
* IE7 isn't positioning the span correctly as a display-inline element
*/
.views-edit-view .views-displays .icon {
display: block;
float: left;
}
.views-edit-view .views-displays .icon-add {
top: 2px;
}
/**
* The add display query dropdown needs a lot of help
*/
.views-edit-view .views-displays .tabs.secondary {
position: relative;
z-index: 100;
}
.views-edit-view .views-displays .secondary .open > a {
border-bottom: 1px solid #f1f1f1;
}
.views-edit-view .views-displays .secondary .action-list {
border-bottom: 1px solid #cbcbcb;
top: 30px;
}
.views-edit-view .views-displays .secondary input {
text-align: left;
}
/**
* IE7 does not interpret div > * correctly
*/
.page-admin-structure-views #content .views-ui-display-tab-bucket {
padding-left: 0;
padding-right: 0;
zoom: 1;
}
.page-admin-structure-views #content .views-display-column + .views-display-column {
margin-top: 0;
}
/**
* IE7 is interpreting a top margin of 18px from somewhere. remove it
*/
.page-admin-structure-views #content .views-display-setting {
margin-top: 0;
}
/**
* IE7 can't handle the + selector that indents form wrappers after a checkbox on the add page
* zoom is necessary to trigger has layout. !imporant is necessary because IE7 is precedent
* to the theme.css stylesheet, even though it is included before this file.
*/
.page-admin-structure-views #content .form-type-checkbox + .form-wrapper {
margin-left: 27px !important;
zoom: 1;
}
/**
* The .css file is intended to only contain positioning and size declarations
* For example: display, position, float, clear, and overflow.
*/
/* @group Inline lists */
.horizontal > * {
float: right;
}
.horizontal.right {
float: left;
}
/* @end */
/* @group Attachment details
*
* The attachment details section, its tabs for each section and the buttons
* to add a new section
*/
.form-actions {
float: left;
}
/* @end */
/* @group Attachment details tabs
*
* The tabs that switch between sections
*/
.views-displays .secondary > li {
float: right;
}
/* @end */
/* @group Attachment details new section button */
.views-displays .secondary .action-list {
left: auto;
right: 0;
}
/* @end */
/* @group Attachment details collapsible fieldset */
.views-display-tab .fieldset-legend {
left: auto;
right: -5px;
}
/* @end */
/* @group Attachment details actions
*
* Display the "Delete" and "Duplicate" buttons to the right.
*/
.views-display-tab .fieldset-wrapper > .views-ui-display-tab-bucket .actions {
left: 0;
right: auto;
}
/* @end */
/* @group Attachment configuration columns */
.views-display-columns > * {
float: right;
margin-left: 0;
margin-right: 1%;
padding-left: 0;
padding-right: 1%;
}
.views-display-columns > *:first-child {
margin-right: 0;
padding-right: 0;
}
/* @end */
/* @group Settings forms */
.views-dependent {
margin-right: 1.5em;
}
.views-display-setting .label,
.views-display-setting .views-ajax-link {
float: right;
}
/* @end */
/**
* The .advanced_help.css file is intended to contain styles that override declarations
* in the Advanced Help module.
*/
/**
* Adjust the advanced help icons
*/
.views-ui-display-tab-bucket .advanced-help-link {
padding: 0;
margin: 5px 3px 0px 6px; /* LTR */
}
.views-ui-display-tab-bucket .icon-text {
padding-left: 25px; /* LTR */
}
.views-ui-display-tab-bucket .icon-linked {
background-position: 6px -151px; /* LTR */
}
.views-ui-display-tab-bucket .icon-unlinked {
background-position: 6px -193px; /* LTR */
}
/**
* The .bartik.css file is intended to contain styles that override declarations
* in the Bartik theme.
*/
/* @group Lists */
.views-display-top .secondary .action-list {
padding-right: 0;
}
/* @end */
/**
* The .bartik.css file is intended to contain styles that override declarations
* in the Bartik theme.
*/
/* @group Lists */
.views-display-top .secondary .action-list {
padding-left: 0; /* LTR */
}
/* @end */
/* @group Attachment details tabs
*
* The tabs that switch between sections
*/
.views-displays .region-content .secondary,
.views-displays .region-content .secondary {
padding-bottom: 0;
padding-left: 0;
}
.views-displays .secondary a {
font-size: smaller;
}
.views-displays .secondary > li a {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.views-displays .secondary > li.open a {
-moz-border-radius: 5px 5px 0 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
border-radius: 5px 5px 0 0;
}
.views-displays .secondary .open > a:hover {
color: #0071B3;
}
.views-displays .secondary input.form-submit {
font-size: smaller;
}
/* @end */
/* @group Modal dialog box
*
* The contents of the popup dialog on the views edit form.
*/
.views-filterable-options .even .form-type-checkbox {
background-color: #F9F9F9;
}
.views-ui-dialog .ui-dialog-titlebar-close,
.views-ui-dialog #views-ajax-title,
.views-ui-dialog .views-override,
.views-ui-dialog .form-buttons {
background-color: #f6f6f6;
}
.views-ui-dialog a {
color: #0071b3;
}
.views-ui-dialog a:hover,
.views-ui-dialog a:focus {
color: #018fe2;
}
/* @end */
/* @group CTools */
/* @group Buttons */
.ctools-button-processed {
background-image:
-moz-linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
background-image:
-webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.0, rgba(255, 255, 255, 1.0)),
color-stop(1.0, rgba(249, 249, 249, 1.0))
);
background-image:
-webkit-linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
background-image:
linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
padding-bottom: 1px;
padding-top: 1px;
}
.ctools-button-processed:hover {
background-image:
-moz-linear-gradient(
-90deg,
#ffffff 0px,
#f1f1f1 100%);
background-image:
-webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.0, rgba(255, 255, 255, 1.0)),
color-stop(1.0, rgba(241, 241, 241, 1.0))
);
background-image:
-webkit-linear-gradient(
-90deg,
#ffffff 0px,
#f1f1f1 100%);
background-image:
linear-gradient(
-90deg,
#ffffff 0px,
#f1f1f1 100%);
}
.ctools-button-processed li a,
.views-ui-display-tab-actions .ctools-button-processed input {
padding-left: 9px;
padding-right: 9px;
}
.ctools-content ul.actions {
padding-bottom: 0;
}
.ctools-dropbutton-processed.open:hover {
background-image:
-moz-linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
background-image:
-webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.0, rgba(255, 255, 255, 1.0)),
color-stop(1.0, rgba(249, 249, 249, 1.0))
);
background-image:
-webkit-linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
background-image:
linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
}
.ctools-dropbutton-processed.open {
-moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
-webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
}
.ctools-twisty {
top: 0.6667em;
}
.ctools-dropbutton-processed.open .ctools-twisty {
top: 0.3333em;
}
.ctools-dropbutton-processed li a,
.views-ui-display-tab-actions .ctools-dropbutton-processed input {
padding-right: 7px;
}
.views-ui-display-tab-actions .ctools-button-processed input.form-submit {
margin-right: 0;
margin-top: 0;
}
/* @end */
/* @group Collapsible */
.ctools-toggle {
margin-top: 0.9em;
}
.ctools-toggle.ctools-toggle-collapsed {
margin-top: 0.72em;
}
.views-display-column > .ctools-toggle {
margin-top: 14px;
}
.views-display-column > .ctools-toggle.ctools-toggle-collapsed {
margin-top: 12px;
}
.views-ui-display-tab-actions .ctools-button input {
color: #0071B3;
}
.views-ui-display-tab-actions .ctools-button input:hover,
.views-ui-display-tab-actions .ctools-button input:focus {
color: #018FE2;
}
/* @end */
/* @end */
/**
* The .contextual.css file is intended to contain styles that override declarations
* in the Contextual module.
*/
/* @group Wrapper */
#views-live-preview .contextual-links-region-active {
outline: medium none;
}
#views-live-preview div.contextual-links-wrapper {
right: auto;
top: auto;
}
html.js #views-live-preview div.contextual-links-wrapper {
display: inline;
}
/* @end */
/* @group Trigger */
#views-live-preview a.contextual-links-trigger {
display: block;
}
/* @end */
/* @group List */
div.contextual-links-wrapper ul.contextual-links {
-moz-border-radius: 0 4px 4px 4px;
-webkit-border-radius: 0 4px 4px 4px;
border-radius: 0 4px 4px 4px;
min-width: 10em;
padding: 6px 6px 9px 6px;
right: auto;
}
ul.contextual-links li a,
ul.contextual-links li span {
padding-bottom: 0.25em;
padding-right: 0.1667em;
padding-top: 0.25em;
}
ul.contextual-links li span {
font-weight: bold;
}
ul.contextual-links li a {
color: #666666 !important;
margin: 0.25em 0;
padding-left: 1em;
}
ul.contextual-links li a:hover {
background-color: #badbec;
}
/* @end */
/**
* The .css file is intended to only contain positioning and size declarations
* For example: display, position, float, clear, and overflow.
*/
/* @group Resets */
.views-admin ul,
.views-admin menu,
.views-admin dir {
padding-left: 0; /* LTR for IE */
/* padding-start is used so that RTL works out of the box */
-moz-padding-start: 0;
-webkit-padding-start: 0;
padding-start: 0;
}
.views-admin pre {
margin-bottom: 0;
margin-top: 0;
white-space: pre-wrap;
}
/* @end */
/* @group Inline lists */
.horizontal > * {
clear: none;
float: left; /* LTR */
}
.horizontal.right {
float: right;
}
.horizontal label {
position: absolute;
}
.horizontal .form-item > [class] {
margin-top: 25px;
}
.horizontal .form-item > [class] + [class] {
margin-top: 0;
}
/* @end */
/* @group Columns */
.views-left-25 {
float: left;
width: 25%;
}
.views-left-30 {
float: left;
width: 30%;
}
.views-left-40 {
float: left;
width: 40%;
}
.views-left-50 {
float: left;
width: 50%;
}
.views-left-75 {
float: left;
width: 75%;
}
.views-right-50 {
float: right;
width: 50%;
}
.views-right-60 {
float: right;
width: 60%;
}
.views-right-70 {
float: right;
width: 70%;
}
.views-group-box .form-item {
margin-left: 3px;
margin-right: 3px;
}
/* @end */
/* @group Attachment details
*
* The attachment details section, its tabs for each section and the buttons
* to add a new section
*/
.form-edit .form-actions {
float: right; /* LTR */
}
.views-displays {
clear: both;
}
/* @end */
/* @group Attachment details tabs
*
* The tabs that switch between sections
*/
.views-displays .secondary {
border-bottom: 0 none;
margin: 0;
overflow: visible;
padding: 0;
}
.views-displays .secondary > li {
border-right: 0 none;
display: inline-block;
float: left; /* LTR */
padding: 0;
}
.views-displays .secondary .open > a {
position: relative;
z-index: 51;
}
.views-displays .views-display-deleted-link {
text-decoration: line-through;
}
.views-display-deleted > fieldset > legend,
.views-display-deleted .fieldset-wrapper > .views-ui-display-tab-bucket > *,
.views-display-deleted .views-display-columns {
opacity: 0.25;
}
.views-display-disabled > fieldset > legend,
.views-display-disabled .fieldset-wrapper > .views-ui-display-tab-bucket > *,
.views-display-disabled .views-display-columns {
opacity: 0.5;
}
.views-display-tab .fieldset-wrapper > .views-ui-display-tab-bucket .actions {
opacity: 1.0;
}
/* @end */
/* @group Attachment details new section button */
.views-displays .secondary li.add {
position: relative;
}
.views-displays .secondary .action-list {
left: 0; /* LTR */
margin: 0;
position: absolute;
top: 23px;
z-index: 50;
}
.views-displays .secondary .action-list li {
display: block;
}
/* @end */
/* @group Attachment details collapsible fieldset */
.views-display-tab .fieldset-legend {
left: -5px; /* LTR */
position: relative;
}
.views-display-tab .fieldset-wrapper {
position: relative;
}
/* @end */
/* @group Attachment details actions
*
* Display the "Delete" and "Duplicate" buttons to the right.
*/
.views-display-tab .fieldset-wrapper > .views-ui-display-tab-bucket .actions {
position: absolute;
right: 0; /* LTR */
top: -5px;
}
/* @end */
/* @group Attachment configuration columns */
.views-display-columns > * {
float: left; /* LTR */
margin-left: 1%; /* LTR */
padding-left: 1%; /* LTR */
width: 32%;
}
.views-display-columns > *:first-child {
margin-left: 0; /* LTR */
padding-left: 0; /* LTR */
}
/* @end */
/* @group Modal dialog box */
.views-ui-dialog {
/* We need this so the button is visible. */
overflow: visible;
position: fixed;
}
.views-ui-dialog .ui-dialog-titlebar-close {
border: 1px solid transparent;
display: block;
margin: 0;
padding: 0;
position: absolute;
right: 0;
top: 2px;
/* Make sure this is in front of the modal backdrop. */
z-index: 1002;
}
.views-ui-dialog .ui-dialog-titlebar {
padding: 0;
margin: 0;
}
.views-ui-dialog .ui-dialog-title {
display: none;
}
.views-ui-dialog #views-ajax-popup {
padding: 0;
overflow: hidden;
}
.views-ui-dialog #views-ajax-title,
.views-ui-dialog #views-ajax-body {
margin: 0;
padding: 0;
}
.views-ui-dialog #views-ajax-popup {
overflow: hidden;
}
.views-ui-dialog .scroll {
max-height: 400px;
overflow: auto;
}
#views-filterable-options-controls {
display: none;
}
.views-ui-dialog #views-filterable-options-controls {
display: block;
}
/* Don't let the messages overwhelm the modal */
.views-ui-dialog .views-messages {
max-height: 200px;
overflow: auto;
}
/* @end */
/* @group Settings forms */
.views-display-setting .label,
.views-display-setting .views-ajax-link {
display: inline-block;
float: left; /* LTR */
}
/* @end */
/* @group Filter Settings form */
div.form-item-options-value-all {
display: none;
}
/* @end */
/* @group Drupal overrides */
/* The .progress-disabled class added to the form on submit floats the element
* left and causes the form width to shrink-wrap to the content. Setting the
* width to 100% prevents this.
*/
#views-ajax-body form {
width: 100%;
}
/* @end */
/* @group Javascript dependent styling */
.js-only {
display: none;
}
html.js .js-only {
display: inherit;
}
html.js span.js-only {
display: inline;
}
/* @end */
/* @group AJAX throbber */
/* Base Page */
#views-ui-list-page .ajax-progress-throbber,
.views-admin .ajax-progress-throbber {
/* Can't do center:50% middle: 50%, so approximate it for a typical window size. */
left: 49%;
position: fixed;
top: 48.5%;
z-index: 1000;
}
#views-ui-list-page .ajax-progress-throbber .message,
.views-admin .ajax-progress-throbber .message {
display: none;
}
/* Modal */
#views-ajax-popup .ajax-progress-throbber {
/* Can't do center:50% middle: 50%, so approximate it for a typical window size. */
left: 49%;
position: fixed;
top: 48.5%;
z-index: 1000;
}
#views-ajax-popup .ajax-progress-throbber .message {
display: none;
}
/* @end */
/* @group Buttons */
.ctools-dropbutton .ctools-content {
border-left: 1px solid #e8e8e8;
}
.ctools-content ul.actions {
padding-left: auto;
padding-right: 0;
}
.ctools-dropbutton .ctools-link {
border-right: 1px solid #ffffff;
}
.ctools-dropbutton li {
padding-left: 9px;
padding-left: auto;
}
.views-display-top .ctools-button {
left: 12px;
right: auto;
}
.views-ui-display-tab-bucket .ctools-button {
left: 5px;
right: auto;
}
/* @end */
/* @group Collapsible */
.ctools-toggle {
float: right;
margin-left: 2px;
margin-right: 0;
}
.ctools-toggle.ctools-toggle-collapsed {
border-left: 0;
border-right: 4px solid;
border-left-color: transparent;
border-width: 5px 5px 5px 0;
margin-left: 5px;
margin-right: 2px;
}
.ctools-export-ui-row label {
float: right;
}
.views-display-column > .ctools-toggle {
margin-left: 3px;
margin-right: 6px;
}
.views-display-column > .ctools-toggle.ctools-toggle-collapsed {
margin-left: 5px;
margin-right: 9px;
}
/* @end */
/* @group Dependent */
.dependent-options {
margin-left: 0;
margin-right: 18px;
}
/* @end */
/* @group Export */
/* Override for filter button on the views list screen */
#ctools-export-ui-list-form .form-submit {
margin-left: 0em;
margin-right: auto;
}
/* @end */
/* @group Buttons */
.ctools-button-processed {
background-color: #ffffff;
border-color: #cccccc;
font-size: 11px;
padding-bottom: 2px;
padding-top: 2px;
}
.ctools-button-processed:hover {
border-color: #b8b8b8;
}
.ctools-button-processed:active {
border-color: #a0a0a0;
}
.ctools-button-processed .ctools-content {
padding-bottom: 0;
padding-top: 0;
}
.ctools-dropbutton-processed {
position: absolute;
}
.ctools-dropbutton-processed .ctools-content {
border-right: 1px solid #e8e8e8;
}
.ctools-dropbutton-processed .ctools-content ul {
margin: 0;
padding: 0;
}
.ctools-content ul.actions {
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
}
.ctools-button-processed .ctools-content a {
background-image: none;
border: medium none;
}
.ctools-dropbutton-processed.open:hover {
border-color: #D0D0D0;
}
.ctools-dropbutton-processed.open {
z-index: 100;
}
.ctools-dropbutton-processed .ctools-link {
border-left: 1px solid #ffffff;
}
.ctools-dropbutton-processed.open .ctools-content {
padding-bottom: 4px;
}
.ctools-dropbutton-processed li a,
.ctools-dropbutton-processed li input {
padding-right: 9px;
}
.ctools-dropbutton-processed.open li + li {
border-top: 1px solid #efefef;
margin-top: 4px;
padding-bottom: 0;
padding-top: 4px;
}
.ctools-twisty:focus {
outline: medium none;
}
.ctools-no-js .ctools-content ul {
margin-bottom: 0;
margin-top: 0;
padding-left: 0;
}
.views-display-top .ctools-button-processed {
font-size: 12px;
position: absolute;
right: 12px;
top: 7px;
}
.views-ui-display-tab-bucket .ctools-button-processed {
position: absolute;
right: 5px;
top: 4px;
}
.views-ui-display-tab-actions .ctools-button-processed li a,
.views-ui-display-tab-actions .ctools-button-processed input {
background: none;
border: medium;
font-family: inherit;
font-size: 12px;
padding-bottom: 0;
padding-left: 12px;
padding-top: 0;
margin-bottom: 0;
}
.views-ui-display-tab-actions .ctools-button-processed input:hover {
background: none;
}
/* @end */
/* @group Collapsible */
.ctools-toggle {
border-bottom-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
border-style: solid;
border-width: 5px 5px 0;
display: inline-block;
float: left;
height: 0;
margin-right: 2px;
margin-top: 0.4545em;
width: 0;
}
.ctools-toggle.ctools-toggle-collapsed {
border-bottom-color: transparent;
border-left: 4px solid;
border-right-color: transparent;
border-top-color: transparent;
border-width: 5px 0 5px 5px;
margin-left: 2px;
margin-right: 5px;
margin-top: 0.3333em;
}
.ctools-toggle:hover,
.ctools-collapsible-handle:hover {
cursor: pointer;
}
.ctools-export-ui-row {
margin-bottom: 0;
padding-top: 0;
}
.ctools-export-ui-row label {
display: block;
float: left;
width: 55px;
}
.views-display-settings .ctools-toggle {
color: #000000;
}
.views-display-column > .ctools-toggle {
margin-left: 6px;
margin-right: 3px;
margin-top: 10px;
}
.views-display-column > .ctools-toggle.ctools-toggle-collapsed {
margin-left: 9px;
margin-right: 5px;
margin-top: 8px;
}
.views-display-column > .ctools-collapsible-handle {
border-color: #F3F3F3;
border-style: solid;
border-width: 1px 1px 0;
font-size: 13px;
font-weight: normal;
margin: 0;
padding: 6px 3px;
}
.views-display-column > .ctools-toggle.ctools-toggle-collapsed + .ctools-collapsible-handle {
border-width: 1px;
}
.views-display-column > .ctools-collapsible-content > .views-ui-display-tab-bucket:first-child {
border-top: medium none;
}
h2.ctools-collapsible-handle {
display: inline;
clear: both;
}
/* @end */
/* @group Dependent */
.dependent-options {
margin-left: 18px; /* LTR */
}
/* @end */
/* @group Export */
/* Override for filter button on the views list screen */
#ctools-export-ui-list-form .form-submit {
margin-top: 0em !important;
margin-right: 0em;
}
.ctools-export-ui-row + .ctools-export-ui-row {
margin-top: 1em;
}
.ctools-export-ui-fourth-row input {
margin-top: 5px !important;
}
/* @end */
/* @group Jump list */
#views-live-preview .ctools-jump-menu-select{
max-width: 450px;
}
/* @end */
/**
* The .garland.css file is intended to contain styles that override declarations
* in the Garland theme.
*/
/* @group Lists */
.views-displays .secondary .action-list {
left: auto;
right: 1px;
}
/* @end */
/**
* The .garland.css file is intended to contain styles that override declarations
* in the Garland theme.
*/
/* @group Attachment details tabs
*
* The tabs that switch between sections
*/
.views-displays .region-content .secondary,
.views-displays .region-content .secondary {
padding-bottom: 0;
padding-left: 0;
}
.views-displays .secondary .action-list {
left: 1px;
top: 20px;
}
.views-displays .secondary .action-list li,
.views-displays .secondary a {
border-color: #e9e9e9;
}
.views-displays .secondary a {
font-size: 12px;
padding: 2px 7px;
}
.views-displays ul.secondary li a:hover,
.views-displays ul.secondary li.active a {
border: 1px solid transparent;
padding: 2px 7px;
}
.views-displays .secondary > li a {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.views-displays .secondary > li.open a {
background-image: none;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
border-radius: 5px 5px 0 0;
}
.views-displays .secondary .open > a:hover {
border-color: #e9e9e9 #e9e9e9 #f1f1f1 #e9e9e9;
border-width: 1px 1px 1px 1px;
color: #0071B3;
}
.views-displays .secondary input.form-submit {
font-size: 11px;
}
/* @end */
/* @group Attachment buckets
*
* These are the individual "buckets," or boxes, inside the display settings area
*/
.views-ui-display-tab-bucket h3 {
font-weight: bold;
}
/* @end */
/* @group Modal dialog box
*
* The contents of the popup dialog on the views edit form.
*/
.views-filterable-options .form-type-checkbox {
margin: 0;
}
.views-filterable-options .even .form-type-checkbox {
background-color: #F9F9F9;
}
.views-ui-dialog .ui-dialog-titlebar-close,
.views-ui-dialog #views-ajax-title,
.views-ui-dialog .views-override,
.views-ui-dialog .form-buttons {
background-color: #f6f6f6;
}
/* @end */
/* @group CTools */
/* @group Buttons */
.ctools-button-processed {
background-image:
-moz-linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
background-image:
-webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.0, rgba(255, 255, 255, 1.0)),
color-stop(1.0, rgba(249, 249, 249, 1.0))
);
background-image:
-webkit-linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
background-image:
linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
padding-bottom: 1px;
padding-top: 1px;
}
.ctools-button-processed:hover {
background-image:
-moz-linear-gradient(
-90deg,
#ffffff 0px,
#f1f1f1 100%);
background-image:
-webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.0, rgba(255, 255, 255, 1.0)),
color-stop(1.0, rgba(241, 241, 241, 1.0))
);
background-image:
-webkit-linear-gradient(
-90deg,
#ffffff 0px,
#f1f1f1 100%);
background-image:
linear-gradient(
-90deg,
#ffffff 0px,
#f1f1f1 100%);
}
.ctools-button-processed ol li,
.ctools-button-processed ul li {
margin: 0;
padding-bottom: 0;
}
.views-ui-display-tab-actions .ctools-button-processed input {
margin-right: 0;
}
.ctools-content ul.actions {
padding-bottom: 0;
}
.ctools-dropbutton-processed.open:hover {
background-image:
-moz-linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
background-image:
-webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.0, rgba(255, 255, 255, 1.0)),
color-stop(1.0, rgba(249, 249, 249, 1.0))
);
background-image:
-webkit-linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
background-image:
linear-gradient(
-90deg,
#ffffff 0px,
#f9f9f9 100%);
}
.ctools-dropbutton-processed.open {
-moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
-webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
box-shadow: 1px 1px 2px rgba(0,0,0,0.25);
}
.ctools-twisty {
top: 0.6667em;
}
.ctools-dropbutton-processed.open .ctools-twisty {
top: 0.3333em;
}
/* @end */
/* @group Dependent */
.dependent-options,
.form-checkboxes.dependent-options,
.form-radios.dependent-options,
.form-checkboxes .form-item.dependent-options,
.form-radios .form-item.dependent-options {
margin-left: 25px;
}
/* @end */
/* @group Collapsible */
.ctools-toggle {
margin-top: 0.5em;
}
.ctools-toggle,
.views-display-settings .ctools-toggle {
color: #494949;
}
.ctools-toggle.ctools-toggle-collapsed {
margin-top: 0.25em;
}
.views-display-column > .ctools-toggle {
margin-top: 14px;
}
.views-display-column > .ctools-toggle.ctools-toggle-collapsed {
margin-top: 12px;
}
.views-ui-display-tab-actions .ctools-button input {
color: #027AC6;
font-size: 12px;
}
.views-ui-display-tab-actions .ctools-button input:hover,
.views-ui-display-tab-actions .ctools-button input:focus {
color: #0062A0;
}
/* @end */
/* @end */
/**
* The .seven.css file is intended to contain styles that override declarations
* in the Seven admin theme.
*/
/* @group Forms */
.views-admin .form-submit,
.views-admin a.button {
margin-left: 0;
}
/* @end */
/* @group Lists */
.views-admin .links li {
padding-left: 0;
}
/* @end */
/* @group Attachments */
.views-displays .secondary {
text-align: right;
}
/* @end */
/* @group Attachment details tabs */
.views-display-top ul.secondary {
float: right;
}
.views-displays .secondary .action-list li:first-child {
-moz-border-radius: 7px 0 0 0;
-webkit-border-radius: 7px 0 0 0;
border-radius: 7px 0 0 0;
}
/* @end */
This diff is collapsed.
/**
* The .theme.css file is intended to contain presentation declarations including
* images, borders, colors, and fonts.
*/
/* @end */
/* @group Icons */
.actions a,
.views-admin .icon,
.views-admin .icon-text {
background-position: right top;
}
/* Targets any element with an icon -> text combo */
.views-admin .icon-text {
padding-right: 19px;
}
.views-admin .icon-linked {
background-position: right -153px;
}
.views-admin .icon-unlinked {
background-position: right -195px;
}
.actions .views-button-add {
background-position: right -39px;
}
.actions .views-button-rearrange {
background-position: right -96px;
}
.actions .views-button-add:hover {
background-position: right -58px;
}
.actions .views-button-rearrange:hover {
background-position: right -115px;
}
.actions .views-button-add:active {
background-position: right -77px;
}
.actions .views-button-rearrange:active {
background-position: right -134px;
}
.views-displays .icon-add {
background-position: right -3px;
}
.views-displays .secondary a:hover > .icon-add {
background-position: right -21px;
}
.views-displays .secondary .open a:hover > .icon-add {
background-position: right -3px;
}
/* @end */
/* @group Forms */
.form-submit + .form-submit,
.views-admin a.button + a.button {
margin-right: 1em;
}
.container-inline > * + *,
.container-inline .fieldset-wrapper > * + * {
padding-left: 0;
padding-right: 4pt;
}
.views-admin .form-type-checkbox + .form-wrapper {
margin-right: 16px;
}
/* @end */
/* @group Lists */
.horizontal > * + * {
margin-right: 9px;
padding-right: 9px;
}
/* @end */
/* @group Attachments */
.views-displays .secondary {
padding: 6px 8px 8px;
}
.views-displays .views-display-top > ul > li + li {
margin-right: 3px;
}
.views-displays .views-extra-actions {
left: 10px;
}
/* @end */
/* @group Attachment details tabs
*
* The tabs that switch between sections
*/
.views-displays .secondary .action-list li:first-child {
-moz-border-radius: 7px 0 0 0;
-webkit-border-top-left-radius: 7px;
-webkit-border-top-right-radius: 0;
border-radius: 7px 0 0 0;
}
/* @end */
/* @group Attachment details collapsible fieldset
*
* The attachment details section is a collapsible fieldset, but should not
* have a border around it.
*/
.views-display-tab .fieldset-legend {
left: auto;
right: -5px;
}
/* @end */
/* @group Auto preview
*
* The auto-preview checkbox line. This may have more stuff added to it.
*/
div.form-item-displays-live-preview {
text-align: left;
}
/* @end */
/* @group Attachment buckets
*
* These are the individual "buckets," or boxes, inside the three columns in the
* attachment details section.
*/
.views-ui-display-tab-bucket .icon-text {
padding-right: 25px;
}
/* @end */
/* @group Attachment bucket rows
*
* This is each row within one of the "boxes."
*/
.views-display-setting .label {
margin-left: 3pt;
}
/* @end */
/* @group Modal dialog box
*
* The contents of the popup dialog on the views edit form.
*/
#views-filterable-options-controls .form-item {
margin-left: 2%;
}
.views-ui-dialog #views-progress-indicator {
left: 10px;
right: auto;
}
/* @end */
/* @group Rearrange filters
*
* Styling for the form that allows views filters to be rearranged.
*/
.views-operator-label {
padding-right: 0.5em;
}
/* @end */
/* @group Live preview elements */
/* @group HTML list */
#views-live-preview .view-content > .item-list > ul {
padding-right: 21px;
}
/* @end */
/* @end */
This diff is collapsed.
.views-exposed-form .views-exposed-widget {
float: right; /* RTL */
padding: .5em 1em 0 0; /* RTL */
}
.views-exposed-form .views-exposed-widget {
float: left; /* LTR */
padding: .5em 1em 0 0; /* LTR */
}
.views-exposed-form .views-exposed-widget .form-submit {
margin-top: 1.6em;
}
.views-exposed-form .form-item,
.views-exposed-form .form-submit {
margin-top: 0;
margin-bottom: 0;
}
.views-exposed-form label {
font-weight: bold;
}
.views-exposed-widgets {
margin-bottom: .5em;
}
/* table style column align */
.views-align-left {
text-align: left;
}
.views-align-right {
text-align: right;
}
.views-align-center {
text-align: center;
}
/* Remove the border on tbody that system puts in */
.views-view-grid tbody {
border-top: none;
}
.view .progress-disabled {
float: none;
}
- If the interface text is *bolded*, it got strong tags.
- If it's a button they need to click, that's *bold* too.
- If the text is not bolded (ex: links to click, options to check), it
got /italicized/.
- If it's user-entered text it got 'single quotes'.
This diff is collapsed.
<?php
/**
* @file
* Views area handlers.
*/
/**
* @defgroup views_area_handlers Views area handlers
* @{
* Handlers to tell Views what can display in header, footer
* and empty text in a view.
*/
/**
* Base class for area handlers.
*
* @ingroup views_area_handlers
*/
class views_handler_area extends views_handler {
/**
* Overrides views_handler::init().
*
* Make sure that no result area handlers are set to be shown when the result
* is empty.
*/
function init(&$view, &$options) {
parent::init($view, $options);
if ($this->handler_type == 'empty') {
$this->options['empty'] = TRUE;
}
}
/**
* Get this field's label.
*/
function label() {
if (!isset($this->options['label'])) {
return $this->ui_name();
}
return $this->options['label'];
}
function option_definition() {
$options = parent::option_definition();
$this->definition['field'] = !empty($this->definition['field']) ? $this->definition['field'] : '';
$label = !empty($this->definition['label']) ? $this->definition['label'] : $this->definition['field'];
$options['label'] = array('default' => $label, 'translatable' => TRUE);
$options['empty'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
/**
* Provide extra data to the administration form
*/
function admin_summary() {
return $this->label();
}
/**
* Default options form that provides the label widget that all fields
* should have.
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['label'] = array(
'#type' => 'textfield',
'#title' => t('Label'),
'#default_value' => isset($this->options['label']) ? $this->options['label'] : '',
'#description' => t('The label for this area that will be displayed only administratively.'),
);
if ($form_state['type'] != 'empty') {
$form['empty'] = array(
'#type' => 'checkbox',
'#title' => t('Display even if view has no result'),
'#default_value' => isset($this->options['empty']) ? $this->options['empty'] : 0,
);
}
}
/**
* Don't run a query
*/
function query() { }
/**
* Render the area
*/
function render($empty = FALSE) {
return '';
}
/**
* Area handlers shouldn't have groupby.
*/
function use_group_by() {
return FALSE;
}
}
/**
* A special handler to take the place of missing or broken handlers.
*
* @ingroup views_area_handlers
*/
class views_handler_area_broken extends views_handler_area {
function ui_name($short = FALSE) {
return t('Broken/missing handler');
}
function ensure_my_table() { /* No table to ensure! */ }
function query($group_by = FALSE) { /* No query to run */ }
function render($empty = FALSE) { return ''; }
function options_form(&$form, &$form_state) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#value' => t('The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.'),
);
}
/**
* Determine if the handler is considered 'broken'
*/
function broken() { return TRUE; }
}
/**
* @}
*/
<?php
/**
* @file
* Definition of views_handler_area_result.
*/
/**
* Views area handler to display some configurable result summary.
*
* @ingroup views_area_handlers
*/
class views_handler_area_result extends views_handler_area {
function option_definition() {
$options = parent::option_definition();
$options['content'] = array(
'default' => 'Displaying @start - @end of @total',
'translatable' => TRUE,
);
return $options;
}
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$variables = array(
'items' => array(
'@start -- the initial record number in the set',
'@end -- the last record number in the set',
'@total -- the total records in the set',
'@name -- the human-readable name of the view',
'@per_page -- the number of items per page',
'@current_page -- the current page number',
'@current_record_count -- the current page record count',
'@page_count -- the total page count',
),
);
$list = theme('item_list', $variables);
$form['content'] = array(
'#title' => t('Display'),
'#type' => 'textarea',
'#rows' => 3,
'#default_value' => $this->options['content'],
'#description' => t('You may use HTML code in this field. The following tokens are supported:') . $list,
);
}
/**
* Find out the information to render.
*/
function render($empty = FALSE) {
// Must have options and does not work on summaries.
if (!isset($this->options['content']) || $this->view->plugin_name == 'default_summary') {
return;
}
$output = '';
$format = $this->options['content'];
// Calculate the page totals.
$current_page = (int) $this->view->get_current_page() + 1;
$per_page = (int) $this->view->get_items_per_page();
$count = count($this->view->result);
// @TODO: Maybe use a possible is views empty functionality.
// Not every view has total_rows set, use view->result instead.
$total = isset($this->view->total_rows) ? $this->view->total_rows : count($this->view->result);
$name = check_plain($this->view->human_name);
if ($per_page === 0) {
$page_count = 1;
$start = 1;
$end = $total;
}
else {
$page_count = (int) ceil($total / $per_page);
$total_count = $current_page * $per_page;
if ($total_count > $total) {
$total_count = $total;
}
$start = ($current_page - 1) * $per_page + 1;
$end = $total_count;
}
$current_record_count = ($end - $start) + 1;
// Get the search information.
$items = array('start', 'end', 'total', 'name', 'per_page', 'current_page', 'current_record_count', 'page_count');
$replacements = array();
foreach ($items as $item) {
$replacements["@$item"] = ${$item};
}
// Send the output.
if (!empty($total)) {
$output .= filter_xss_admin(str_replace(array_keys($replacements), array_values($replacements), $format));
}
return $output;
}
}
<?php
/**
* @file
* Definition of views_handler_area_text.
*/
/**
* Views area text handler.
*
* @ingroup views_area_handlers
*/
class views_handler_area_text extends views_handler_area {
function option_definition() {
$options = parent::option_definition();
$options['content'] = array('default' => '', 'translatable' => TRUE, 'format_key' => 'format');
$options['format'] = array('default' => NULL);
$options['tokenize'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['content'] = array(
'#type' => 'text_format',
'#default_value' => $this->options['content'],
'#rows' => 6,
'#format' => isset($this->options['format']) ? $this->options['format'] : filter_default_format(),
'#wysiwyg' => FALSE,
);
// @TODO: Refactor token handling into a base class.
$form['tokenize'] = array(
'#type' => 'checkbox',
'#title' => t('Use replacement tokens from the first row'),
'#default_value' => $this->options['tokenize'],
);
// Get a list of the available fields and arguments for token replacement.
$options = array();
foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
$options[t('Fields')]["[$field]"] = $handler->ui_name();
}
$count = 0; // This lets us prepare the key as we want it printed.
foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
$options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name()));
$options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name()));
}
if (!empty($options)) {
$output = '<p>' . t('The following tokens are available. If you would like to have the characters \'[\' and \']\' please use the html entity codes \'%5B\' or \'%5D\' or they will get replaced with empty space.' . '</p>');
foreach (array_keys($options) as $type) {
if (!empty($options[$type])) {
$items = array();
foreach ($options[$type] as $key => $value) {
$items[] = $key . ' == ' . check_plain($value);
}
$output .= theme('item_list',
array(
'items' => $items,
'type' => $type
));
}
}
$form['token_help'] = array(
'#type' => 'fieldset',
'#title' => t('Replacement patterns'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#value' => $output,
'#id' => 'edit-options-token-help',
'#dependency' => array(
'edit-options-tokenize' => array(1),
),
'#prefix' => '<div>',
'#suffix' => '</div>',
);
}
}
function options_submit(&$form, &$form_state) {
$form_state['values']['options']['format'] = $form_state['values']['options']['content']['format'];
$form_state['values']['options']['content'] = $form_state['values']['options']['content']['value'];
parent::options_submit($form, $form_state);
}
function render($empty = FALSE) {
$format = isset($this->options['format']) ? $this->options['format'] : filter_default_format();
if (!$empty || !empty($this->options['empty'])) {
return $this->render_textarea($this->options['content'], $format);
}
return '';
}
/**
* Render a text area, using the proper format.
*/
function render_textarea($value, $format) {
if ($value) {
if ($this->options['tokenize']) {
$value = $this->view->style_plugin->tokenize_value($value, 0);
}
return check_markup($value, $format, '', FALSE);
}
}
}
<?php
/**
* @file
* Definition of views_handler_area_text_custom.
*/
/**
* Views area text custom handler.
*
* @ingroup views_area_handlers
*/
class views_handler_area_text_custom extends views_handler_area_text {
function option_definition() {
$options = parent::option_definition();
unset($options['format']);
return $options;
}
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// Alter the form element, to be a regular text area.
$form['content']['#type'] = 'textarea';
unset($form['content']['#format']);
unset($form['content']['#wysiwyg']);
// @TODO: Use the token refactored base class.
}
// Empty, so we don't inherit options_submit from the parent.
function options_submit(&$form, &$form_state) {
}
function render($empty = FALSE) {
if (!$empty || !empty($this->options['empty'])) {
return $this->render_textarea_custom($this->options['content']);
}
return '';
}
/**
* Render a text area with filter_xss_admin.
*/
function render_textarea_custom($value) {
if ($value) {
if ($this->options['tokenize']) {
$value = $this->view->style_plugin->tokenize_value($value, 0);
}
return $this->sanitize_value($value, 'xss_admin');
}
}
}
<?php
/**
* @file
* Definition of views_handler_area_view.
*/
/**
* Views area handlers. Insert a view inside of an area.
*
* @ingroup views_area_handlers
*/
class views_handler_area_view extends views_handler_area {
function option_definition() {
$options = parent::option_definition();
$options['view_to_insert'] = array('default' => '');
$options['inherit_arguments'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
/**
* Default options form that provides the label widget that all fields
* should have.
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$view_display = $this->view->name . ':' . $this->view->current_display;
$options = array('' => t('-Select-'));
$options += views_get_views_as_options(FALSE, 'all', $view_display, FALSE, TRUE);
$form['view_to_insert'] = array(
'#type' => 'select',
'#title' => t('View to insert'),
'#default_value' => $this->options['view_to_insert'],
'#description' => t('The view to insert into this area.'),
'#options' => $options,
);
$form['inherit_arguments'] = array(
'#type' => 'checkbox',
'#title' => t('Inherit contextual filters'),
'#default_value' => $this->options['inherit_arguments'],
'#description' => t('If checked, this view will receive the same contextual filters as its parent.'),
);
}
/**
* Render the area
*/
function render($empty = FALSE) {
if (!empty($this->options['view_to_insert'])) {
list($view_name, $display_id) = explode(':', $this->options['view_to_insert']);
$view = views_get_view($view_name);
if (empty($view) || !$view->access($display_id)) {
return;
}
$view->set_display($display_id);
// Avoid recursion
$view->parent_views += $this->view->parent_views;
$view->parent_views[] = "$view_name:$display_id";
// Check if the view is part of the parent views of this view
$search = "$view_name:$display_id";
if (in_array($search, $this->view->parent_views)) {
drupal_set_message(t("Recursion detected in view @view display @display.", array('@view' => $view_name, '@display' => $display_id)), 'error');
}
else {
if (!empty($this->options['inherit_arguments']) && !empty($this->view->args)) {
return $view->preview($display_id, $this->view->args);
}
else {
return $view->preview($display_id);
}
}
}
return '';
}
}
This diff is collapsed.
<?php
/**
* @file
* Definition of views_handler_argument_date.
*/
/**
* Abstract argument handler for dates.
*
* Adds an option to set a default argument based on the current date.
*
* @param $arg_format
* The format string to use on the current time when
* creating a default date argument.
*
* Definitions terms:
* - many to one: If true, the "many to one" helper will be used.
* - invalid input: A string to give to the user for obviously invalid input.
* This is deprecated in favor of argument validators.
*
* @see views_many_to_one_helper()
*
* @ingroup views_argument_handlers
*/
class views_handler_argument_date extends views_handler_argument_formula {
var $option_name = 'default_argument_date';
var $arg_format = 'Y-m-d';
/**
* Add an option to set the default value to the current date.
*/
function default_argument_form(&$form, &$form_state) {
parent::default_argument_form($form, $form_state);
$form['default_argument_type']['#options'] += array('date' => t('Current date'));
$form['default_argument_type']['#options'] += array('node_created' => t("Current node's creation time"));
$form['default_argument_type']['#options'] += array('node_changed' => t("Current node's update time")); }
/**
* Set the empty argument value to the current date,
* formatted appropriately for this argument.
*/
function get_default_argument($raw = FALSE) {
if (!$raw && $this->options['default_argument_type'] == 'date') {
return date($this->arg_format, REQUEST_TIME);
}
else if (!$raw && in_array($this->options['default_argument_type'], array('node_created', 'node_changed'))) {
foreach (range(1, 3) as $i) {
$node = menu_get_object('node', $i);
if (!empty($node)) {
continue;
}
}
if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
}
if (empty($node)) {
return parent::get_default_argument();
}
elseif ($this->options['default_argument_type'] == 'node_created') {
return date($this->arg_format, $node->created);
}
elseif ($this->options['default_argument_type'] == 'node_changed') {
return date($this->arg_format, $node->changed);
}
}
return parent::get_default_argument($raw);
}
/**
* The date handler provides some default argument types, which aren't argument default plugins,
* so addapt the export mechanism.
*/
function export_plugin($indent, $prefix, $storage, $option, $definition, $parents) {
// Only use a special behaviour for the special argument types, else just
// use the default behaviour.
if ($option == 'default_argument_type') {
$type = 'argument default';
$option_name = 'default_argument_options';
$plugin = $this->get_plugin($type);
$name = $this->options[$option];
if (in_array($name, array('date', 'node_created', 'node_changed'))) {
// Write which plugin to use.
$output = $indent . $prefix . "['$option'] = '$name';\n";
return $output;
}
}
return parent::export_plugin($indent, $prefix, $storage, $option, $definition, $parents);
}
function get_sort_name() {
return t('Date', array(), array('context' => 'Sort order'));
}
}
<?php
/**
* @file
* Definition of views_handler_argument_formula.
*/
/**
* Abstract argument handler for simple formulae.
*
* Child classes of this object should implement summary_argument, at least.
*
* Definition terms:
* - formula: The formula to use for this handler.
*
* @ingroup views_argument_handlers
*/
class views_handler_argument_formula extends views_handler_argument {
var $formula = NULL;
/**
* Constructor
*/
function construct() {
parent::construct();
if (!empty($this->definition['formula'])) {
$this->formula = $this->definition['formula'];
}
}
function get_formula() {
return str_replace('***table***', $this->table_alias, $this->formula);
}
/**
* Build the summary query based on a formula
*/
function summary_query() {
$this->ensure_my_table();
// Now that our table is secure, get our formula.
$formula = $this->get_formula();
// Add the field.
$this->base_alias = $this->name_alias = $this->query->add_field(NULL, $formula, $this->field);
$this->query->set_count_field(NULL, $formula, $this->field);
return $this->summary_basics(FALSE);
}
/**
* Build the query based upon the formula
*/
function query($group_by = FALSE) {
$this->ensure_my_table();
// Now that our table is secure, get our formula.
$placeholder = $this->placeholder();
$formula = $this->get_formula() .' = ' . $placeholder;
$placeholders = array(
$placeholder => $this->argument,
);
$this->query->add_where(0, $formula, $placeholders, 'formula');
}
}
<?php
/**
* @file
* Definition of views_handler_argument_group_by_numeric.
*/
/**
* Simple handler for arguments using group by.
*
* @ingroup views_argument_handlers
*/
class views_handler_argument_group_by_numeric extends views_handler_argument {
function query($group_by = FALSE) {
$this->ensure_my_table();
$field = $this->get_field();
$placeholder = $this->placeholder();
$this->query->add_having_expression(0, "$field = $placeholder", array($placeholder => $this->argument));
}
function ui_name($short = FALSE) {
return $this->get_field(parent::ui_name($short));
}
function get_sort_name() {
return t('Numerical', array(), array('context' => 'Sort order'));
}
}
This diff is collapsed.
<?php
/**
* @file
* Definition of views_handler_field_counter.
*/
/**
* Field handler to show a counter of the current row.
*
* @ingroup views_field_handlers
*/
class views_handler_field_counter extends views_handler_field {
function option_definition() {
$options = parent::option_definition();
$options['counter_start'] = array('default' => 1);
return $options;
}
function options_form(&$form, &$form_state) {
$form['counter_start'] = array(
'#type' => 'textfield',
'#title' => t('Starting value'),
'#default_value' => $this->options['counter_start'],
'#description' => t('Specify the number the counter should start at.'),
'#size' => 2,
);
parent::options_form($form, $form_state);
}
function query() {
// do nothing -- to override the parent query.
}
function render($values) {
// Note: 1 is subtracted from the counter start value below because the
// counter value is incremented by 1 at the end of this function.
$count = is_numeric($this->options['counter_start']) ? $this->options['counter_start'] - 1 : 0;
$pager = $this->view->query->pager;
// Get the base count of the pager.
if ($pager->use_pager()) {
$count += ($pager->get_items_per_page() * $pager->get_current_page() + $pager->get_offset());
}
// Add the counter for the current site.
$count += $this->view->row_index + 1;
return $count;
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
See: <a href="topic:views/group-by">Group by</a>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<p>Here are some links to demonstration videos. It will get you started working with Views.</p>
<p><a href="http://drupal.org/node/248766">Views 2 (Drupal 6) Demonstration Video - Drupal Handbook</a></p>
<p><a href="http://nodeone.se/blogg/taming-the-beast-learn-views-with-nodeone">NodeOne's initial screencasts on the Views 3 UI.</a>
Attachment displays are 'attached' to another display in the same view. When the display is visited, the attached display will also be rendered and may be placed before, after or both before and after the original display. Attachment displays are often useful for displaying an argument summary view along with a page display that accepts arguments. This can be used to provide a kind of glossary.
This diff is collapsed.
The default display is primarily a display to store settings, and isn't actually used anywhere within the Views system. It is possible for external programs to use the default display, but if they do they will (hopefully) tell you which display they will be working with. The default display is also a convenient display to use to embed into your site using PHP snippets; this is useful, for example, in node content, but this is something that should generally only be done by administrators.
In general, you probably want to add either a <a href="topic:views/display-page">page display</a> or a <a href="topic:views/display-block">block display</a>.
A feed display allows you to attach an RSS feed to a view.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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