/[drupal]/contributions/modules/project_issue_voting/project_issue_voting.panels.inc
ViewVC logotype

Contents of /contributions/modules/project_issue_voting/project_issue_voting.panels.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Fri Oct 31 21:59:31 2008 UTC (12 months, 3 weeks ago) by dww
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -1 lines
File MIME type: text/x-php
#328648 by sun, the coder_format script, and dww: Fixed some code
style problems and other minor code cleanup.
1 <?php
2 // $Id: project_issue_voting.panels.inc,v 1.2 2008/08/16 09:41:50 dww Exp $
3
4
5 /**
6 * @file
7 * Panels integration for the Project issue voting module.
8 *
9 * At this point, this only provides a default panel page and panel
10 * view configuration that are is used for the site-wide issue voting
11 * dashboard.
12 */
13
14 /**
15 * Implementation of hook_default_panel_pages.
16 */
17 function _project_issue_voting_default_panel_pages() {
18 $pages = array();
19
20 $page = new stdClass();
21 $page->pid = 'new';
22 $page->name = 'top_issue_votes';
23 $page->title = 'Top voted issues';
24 $page->arguments = array();
25 $page->relationships = array();
26 $page->access = array();
27 $page->path = 'project/issues/votes/top';
28 $page->css_id = '';
29 $page->css = '';
30 $page->no_blocks = '0';
31 $page->switcher_options = array();
32 $page->menu = '1';
33 $page->menu_tab = '0';
34 $page->menu_tab_weight = '0';
35 $page->menu_title = 'Top issue votes';
36 $page->menu_tab_default = '0';
37 $page->menu_tab_default_parent_type = 'tab';
38 $page->menu_parent_title = '';
39 $page->menu_parent_tab_weight = '0';
40 $page->contexts = array();
41 $display = new panels_display();
42 $display->did = 'new';
43 $display->layout = 'onecol';
44 $display->layout_settings = array (
45 'plain' => 0,
46 );
47 $display->panel_settings = array (
48 'style' => 'default',
49 'style_settings' => array(),
50 'edit_style' => 'Edit style settings',
51 'individual' => 0,
52 'panel' => array (
53 'middle' => array (
54 'style' => '',
55 'edit_style' => 'Edit style settings',
56 ),
57 ),
58 'did' => '1',
59 );
60 $display->content = array();
61 $display->panels = array();
62 $pane = new stdClass();
63 $pane->pid = 'new-1';
64 $pane->panel = 'middle';
65 $pane->type = 'views2';
66 $pane->subtype = 'project_issue_votes_by_category';
67 $pane->access = array();
68 $pane->configuration = array (
69 'override_title' => 0,
70 'override_title_text' => '',
71 'css_id' => '',
72 'css_class' => '',
73 'title' => 'Issue votes by category',
74 'name' => 'project_issue_votes_by_category',
75 'arguments' => array (
76 0 => 'feature',
77 ),
78 );
79 $pane->shown = '1';
80 $display->content['new-1'] = $pane;
81 $display->panels['middle'][0] = 'new-1';
82
83 $pane = new stdClass();
84 $pane->pid = 'new-2';
85 $pane->panel = 'middle';
86 $pane->type = 'views2';
87 $pane->subtype = 'project_issue_votes_by_category';
88 $pane->access = array();
89 $pane->configuration = array (
90 'override_title' => 0,
91 'override_title_text' => '',
92 'css_id' => '',
93 'css_class' => '',
94 'title' => 'Issue votes by category',
95 'name' => 'project_issue_votes_by_category',
96 'arguments' => array (
97 0 => 'bug',
98 ),
99 );
100 $pane->shown = '1';
101 $display->content['new-2'] = $pane;
102 $display->panels['middle'][1] = 'new-2';
103
104 $pane = new stdClass();
105 $pane->pid = 'new-3';
106 $pane->panel = 'middle';
107 $pane->type = 'views2';
108 $pane->subtype = 'project_issue_votes_by_category';
109 $pane->access = array();
110 $pane->configuration = array (
111 'override_title' => 0,
112 'override_title_text' => '',
113 'css_id' => '',
114 'css_class' => '',
115 'title' => 'Issue votes by category',
116 'name' => 'project_issue_votes_by_category',
117 'arguments' => array (
118 0 => 'task',
119 ),
120 );
121 $pane->shown = '1';
122 $display->content['new-3'] = $pane;
123 $display->panels['middle'][2] = 'new-3';
124
125 $pane = new stdClass();
126 $pane->pid = 'new-4';
127 $pane->panel = 'middle';
128 $pane->type = 'views2';
129 $pane->subtype = 'project_issue_votes_by_category';
130 $pane->access = array();
131 $pane->configuration = array (
132 'override_title' => 0,
133 'override_title_text' => '',
134 'css_id' => '',
135 'css_class' => '',
136 'title' => 'Issue votes by category',
137 'name' => 'project_issue_votes_by_category',
138 'arguments' => array (
139 0 => 'support',
140 ),
141 );
142 $pane->shown = '1';
143 $display->content['new-4'] = $pane;
144 $display->panels['middle'][3] = 'new-4';
145
146 $page->display = $display;
147 $page->displays = array();
148 $pages["$page->name"] = $page;
149
150 return $pages;
151 }
152
153 /**
154 * Implementation of hook_default_panel_views.
155 */
156 function _project_issue_voting_default_panel_views() {
157 $panel_views = array();
158
159 $panel_view = new stdClass();
160 $panel_view->pvid = 'new';
161 $panel_view->view = 'project_issue_votes_by_category';
162 $panel_view->name = 'project_issue_votes_by_category';
163 $panel_view->description = 'View issue votes for a particular category (bug, feature, etc)';
164 $panel_view->title = 'Issue votes by category';
165 $panel_view->category = 'Views';
166 $panel_view->category_weight = '-1';
167 // NOTE: Using the block type here prevents the exposed filters and
168 // the page header text from being displayed.
169 $panel_view->view_type = 'block';
170 $panel_view->use_pager = '0';
171 $panel_view->pager_id = '0';
172 $panel_view->nodes_per_page = '20';
173 $panel_view->offset = '0';
174 $panel_view->link_to_view = '1';
175 $panel_view->more_link = '0';
176 $panel_view->more_text = '';
177 $panel_view->feed_icons = '0';
178 $panel_view->url_override = '0';
179 $panel_view->url = '';
180 $panel_view->url_from_panel = '0';
181 $panel_view->contexts = array (
182 0 => array (
183 'type' => 'user',
184 'context' => 'any',
185 'panel' => '0',
186 'fixed' => '',
187 'label' => 'Project issue: Category',
188 ),
189 );
190 $panel_view->allow_type = NULL;
191 $panel_view->allow_nodes_per_page = '1';
192 $panel_view->allow_offset = '0';
193 $panel_view->allow_use_pager = '0';
194 $panel_view->allow_link_to_view = '0';
195 $panel_view->allow_more_link = '0';
196 $panel_view->allow_more_text = '0';
197 $panel_view->allow_feed_icons = '0';
198 $panel_view->allow_url_override = '0';
199 $panel_view->allow_url_from_panel = '0';
200
201 $panel_views["$panel_view->name"] = $panel_view;
202
203 return $panel_views;
204 }

  ViewVC Help
Powered by ViewVC 1.1.2