/[drupal]/contributions/themes/TVframe/node-om_project.tpl.php
ViewVC logotype

Contents of /contributions/themes/TVframe/node-om_project.tpl.php

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


Revision 1.4 - (show annotations) (download) (as text)
Wed Oct 21 15:35:20 2009 UTC (5 weeks, 2 days ago) by kreynen
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, HEAD
Changes since 1.3: +260 -55 lines
File MIME type: text/x-php
Last updates before install profile changes
1 <?php
2 global $user;
3 global $blog_empty;
4 global $wiki_empty;
5 global $event_empty;
6 global $crew_empty;
7 global $members_empty;
8
9 if($node->content['og_mission']['#value']) {
10 $desc_empty = 0;
11 } else {
12 $desc_empty = 1;
13 }
14
15 if($node->field_public_om_credits[0]['view']) {
16 $credit_empty = 0;
17 } else {
18 $credit_empty = 1;
19 }
20
21 $adminof = $user->og_groups;
22 $current = $node->nid;
23 foreach ($adminof as $key => $data) {
24 if ($key == $current) {
25 $isadminof = 1;
26 }
27 };
28
29 if ($node->field_logo[0]['filepath']) {
30 $img_empty = 0;
31 } else {
32 $img_empty = 1;
33 }
34
35
36 $blog_content = views_embed_view('project_views', 'block_3', $node->nid );
37 $wiki_content = views_embed_view('project_views', 'block_4', $node->nid );
38 $event_content = views_embed_view('project_views', 'block_5', $node->nid );
39 $crew_content = views_embed_view('project_views', 'block_6', $node->nid );
40 $members = views_embed_view('og_members_block', 'block_3', $node->nid );
41 $shows = views_embed_view('project_views', 'block_7', $node->nid );
42
43 $lquery = "gids[]=".$node->nid;
44
45 ?>
46
47
48 <div class="node <?php print $node_classes; ?>" id="node-<?php print $node->nid; ?>"><div class="node-inner">
49
50 <!-- if teaser view -->
51 <?php if ($page == 0): ?>
52 <h2 class="title">
53 <a href="<?php print $node_url; ?>"><?php print $title; ?></a>
54 </h2>
55 <?php endif; ?>
56
57 <!-- if page view -->
58 <?php if (!$page == 0): ?>
59
60 <!-- open containing div -->
61 <div id="node-sidebar-container" class="clear-block">
62
63 <!-- open main area -->
64 <div id="content-main">
65
66 <!-- ****** ****** ****** Begin Project Description ****** ****** ****** -->
67
68 <?php print $node_region; ?>
69
70 <div class="block content-block">
71 <h2 class="title">Project Description</h2>
72 <div class="block-inner">
73 <?php if (!$desc_empty): ?>
74 <?php print $node->content['og_mission']['#value']; ?>
75 <?php elseif ($node->og_description): ?>
76 <?php print $node->og_description; ?>
77 <?php else: ?>
78 <p class="block-note">If you have permissions to edit this project you'll see an edit tab above. Click on the edit tab to create a description.</p>
79 <p>This project has no description.</p>
80 <?php endif; ?>
81 </div>
82 </div> <!-- /.block -->
83
84 <!-- elseif you are the project owner -->
85 <!-- add your shit! -->
86
87
88 <!-- ****** ****** ****** Begin Project Crew Requests ****** ****** ****** -->
89 <?php if (!$crew_empty): ?>
90 <div class="block content-block project-crew-requests">
91 <h2 class="title">Project Crew Requests</h2>
92 <div class="block-inner">
93 <p class="block-note">Post a new request by clicking <strong>Create Crew Requests</strong> in the <strong>My Project Tools</strong> block on the right.</p>
94 <?php print $crew_content; ?>
95 </div>
96 </div><!-- /.content-block -->
97 <?php endif; ?>
98
99
100 <!-- ****** ****** ****** Begin Project Event Postings ****** ****** ****** -->
101 <?php if (!$event_empty): ?>
102 <div class="block content-block project-events">
103 <h2 class="title">Project Events</h2>
104 <div class="block-inner">
105 <p class="block-note"><?php print l('Post a project event here','node/add/project-blog', array('query' => $lquery)); ?> or in the <strong>My Project Tools</strong> block on the right.</p>
106 <?php print $event_content; ?>
107 </div>
108 </div><!-- /.content-block -->
109 <?php endif; ?>
110
111 <!-- ****** ****** ****** Begin Project Blog Postings ****** ****** ****** -->
112 <?php if (!$blog_empty): ?>
113 <div class="block content-block project-blogs">
114 <h2 class="title">Project Blog Postings</h2>
115 <div class="block-inner">
116 <?php if ($logged_in): ?>
117 <p class="block-note"><?php print l('Create project bog post here','node/add/project-blog', array('query' => $lquery)); ?> or in the <strong>My Project Tools</strong> block on the right.</p>
118 <?php endif; ?>
119 <?php print $blog_content; ?>
120 </div>
121 </div><!-- /.content-block -->
122 <?php endif; ?>
123
124
125 <!-- ****** ****** ****** Begin wiki ****** ****** ****** -->
126 <?php if ($isadminof || !$wiki_empty): ?>
127 <div class="block content-block project-wiki">
128 <h2 class="title">Project Wiki</h2>
129 <div class="block-inner">
130 <?php if ($isadminof): ?>
131 <p class="block-note">You can do collaborative project work here or place notes for the project contributors to see. Make collaborative scripts, to do lists, lists of equipment you have available for the project, or any other type of collaborative documentation.</p>
132 <p><?php print l('create a project wiki','node/add/project-wiki', array('query' => $lquery)); ?></p>
133 <?php endif; ?>
134 <?php print $wiki_content; ?>
135 </div>
136 </div><!-- /.content-block -->
137 <?php endif; ?>
138
139 <!-- ****** ****** ****** Begin Project Credits ****** ****** ****** -->
140 <?php if (!$credit_empty): ?>
141 <div class="block content-block project-credits">
142 <h2 class="title">Project Credits</h2>
143 <div class="block-inner">
144 <?php print $node->field_public_om_credits[0]['view']; ?>
145 </div>
146 </div><!-- /.content-block -->
147 <?php endif; ?>
148
149 <!-- ****** ****** ****** Begin Project Status ****** ****** ****** -->
150 <?php if ($isadminof): ?>
151 <div class="block content-block project-status">
152 <h2 class="title">Project Status</h2>
153 <div class="block-inner">
154 <table>
155
156 <tr class="odd">
157 <td>Description</td>
158 <?php if ($desc_empty): ?>
159 <td>The full description is missing<br />(short description is being used)</td>
160 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/x.png" alt="" /></td>
161 <td><?php print l('add full description on edit page','node/'.$node->nid.'/edit'); ?></td>
162 <?php else: ?>
163 <td>This project has a description</td>
164 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/check.png" alt="" /></td>
165 <td><?php print l('edit this page','node/'.$node->nid.'/edit'); ?></td>
166 <?php endif; ?>
167 </tr>
168
169 <tr class="even">
170 <td>Project Image</td>
171 <?php if ($img_empty): ?>
172 <td>This project has no image/logo</td>
173 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/x.png" alt="" /></td>
174 <td><?php print l('upload an image on edit page','node/'.$node->nid.'/edit'); ?></td>
175 <?php else: ?>
176 <td>This project has an image/logo</td>
177 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/check.png" alt="" /></td>
178 <td><?php print l('change the image on edit page','node/'.$node->nid.'/edit'); ?></td>
179 <?php endif; ?>
180 </tr>
181
182 <tr class="odd">
183 <td>Blog</td>
184 <?php if ($blog_empty): ?>
185 <td>No blog posts exist</td>
186 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/x.png" alt="" /></td>
187 <td><?php print l('create a project blog','node/add/project-blog', array('query' => $lquery)); ?></td>
188 <?php else: ?>
189 <td>At least one blog post exists</td>
190 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/check.png" alt="" /></td>
191 <td><?php print l('edit project blog','node/add/project-blog', array('query' => $lquery)); ?></td>
192 <?php endif; ?>
193 </tr>
194
195 <tr class="even">
196 <td>Wiki</td>
197 <?php if ($wiki_empty): ?>
198 <td>The wiki hasn't been started</td>
199 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/x.png" alt="" /></td>
200 <td><?php print l('create a project wiki','node/add/project-wiki', array('query' => $lquery)); ?></td>
201 <?php else: ?>
202 <td>Wiki content exists</td>
203 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/check.png" alt="" /></td>
204 <td><?php print l('edit project wiki','node/add/project-wiki', array('query' => $lquery)); ?></td>
205 <?php endif; ?>
206 </tr>
207
208 <tr class="odd">
209 <td>Events</td>
210 <?php if ($event_empty): ?>
211 <td>This project has no events</td>
212 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/x.png" alt="" /></td>
213 <td><?php print l('create a project event','node/add/project-event', array('query' => $lquery)); ?></td>
214 <?php else: ?>
215 <td>This project has at least one event</td>
216 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/check.png" alt="" /></td>
217 <td><?php print l('edit project event','node/add/project-event', array('query' => $lquery)); ?></td>
218 <?php endif; ?>
219 </tr>
220
221 <tr class="even">
222 <td>Crew Requests</td>
223 <?php if ($crew_empty): ?>
224 <td>This project has no crew requests</td>
225 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/x.png" alt="" /></td>
226 <td><?php print l('create a project event','node/add/om-crew-request', array('query' => $lquery)); ?></td>
227 <?php else: ?>
228 <td>This project has crew requests</td>
229 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/check.png" alt="" /></td>
230 <td><?php print l('edit a project event','node/add/om-crew-request', array('query' => $lquery)); ?></td>
231 <?php endif; ?>
232 </tr>
233
234 <tr class="odd">
235 <td>Members</td>
236 <?php if ($members_empty): ?>
237 <td>This project has no members</td>
238 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/x.png" alt="" /></td>
239 <td><?php
240 $thispath = "og/users/".$node->nid."/add_user";
241 print l('add members',$thispath); ?></td>
242 <?php else: ?>
243 <td>This project has members</td>
244 <td><img src="http://www.denveropenmedia.org/sites/all/themes/TVframe/img/check.png" alt="" /></td>
245 <td><?php
246 $thispath = "og/users/".$node->nid."/faces";
247 print l('view members',$thispath)."<br />";
248 $thispath = "og/users/".$node->nid."/add_user";
249 print l('add members',$thispath); ?></td>
250 <?php endif; ?>
251 </tr>
252
253 </table>
254 </div>
255 </div><!-- /.content-block -->
256 <?php endif; ?>
257
258 <?php endif; ?><!-- end page view if -->
259
260
261
262 <?php if ($unpublished): ?>
263 <div class="unpublished"><?php print t('Unpublished'); ?></div>
264 <?php endif; ?>
265
266 <?php if ($picture) print $picture; ?>
267
268 <?php if ($submitted): ?>
269 <div class="submitted">
270 <?php print $submitted; ?>
271 </div>
272 <?php endif; ?>
273
274 <?php if (count($taxonomy)): ?>
275 <div class="taxonomy"><?php print t(' in ') . $terms; ?></div>
276 <?php endif; ?>
277
278 <!-- content variable removed here -->
279
280 <?php if ($links): ?>
281 <div class="links">
282 <?php print $links; ?>
283 </div>
284 <?php endif; ?>
285
286 <!-- if page view -->
287 <?php if (!$page == 0): ?>
288 </div> <!-- /#content-main -->
289
290 <!-- open sidebar -->
291 <div id="content-sidebar">
292
293 <!-- sidebar content -->
294 <div id="project-logo">
295 <?php if ($imgempty): ?>
296 <img src="<?php print base_path() . path_to_theme() ?>/img/project-not-uploaded.png" alt="default project logo" />
297
298 <?php if ($isadminof) {
299 print l('upload an image on the edit page','node/'.$node->nid.'/edit');
300 }; ?>
301
302 <?php else: ?>
303 <?php if ($node->field_logo[0]['filepath']) {
304 print theme('imagecache', '210 pixels wide scale', $node->field_logo[0]['filepath']);
305 } ?>
306 <?php endif; ?>
307 </div> <!-- /#project-logo -->
308
309 <!-- ****** ****** ****** Begin Project Info ****** ****** ****** -->
310 <?php if (!$desc_empty && $node->og_description || $node->field_om_public_contact_info[0]['value'] || $node->field_om_public_email[0]['value'] || $node->field_om_public_url[0]['value']): ?>
311
312 <div class="block content-block project-info">
313 <h2 class="title">Project Info</h2>
314 <div class="block-inner">
315 <div id="project-short-desc">
316
317 <?php if (!$desc_empty && $node->og_description): ?>
318 <?php print $node->og_description; ?>
319 <?php endif; ?>
320 </div> <!-- /#project-short-desc -->
321
322 <?php if ($node->field_om_public_contact_info[0]['value']): ?>
323 <?php $contact_field = $node->field_om_public_contact_info[0]['value']; ?>
324 <p>contact info: <strong><?php print $contact_field; ?></strong></p>
325 <?php endif; ?>
326
327 <?php if ($node->field_om_public_email[0]['value']): ?>
328 <?php $contact_field = $node->field_om_public_email[0]['value']; ?>
329 <p>email: <strong><?php print $contact_field; ?></strong></p>
330 <?php endif; ?>
331
332 <?php if ($node->field_om_public_url[0]['value']): ?>
333 <?php $contact_field = $node->field_om_public_url[0]['value']; ?>
334 <p><strong><a href="<?php print $contact_field; ?>"><?php print $contact_field; ?></a></strong></p>
335 <?php endif; ?>
336
337 </div> <!-- /.block-inner -->
338 </div> <!-- /.block-260 -->
339
340 <?php endif; ?>
341
342
343 <!-- ****** ****** ****** Begin Contributors ****** ****** ****** -->
344 <?php if ($user->uid): ?>
345 <div class="block content-block project-admin">
346 <h2 class="title">Contributors</h2>
347 <div class="block-inner">
348 <?php print views_embed_view('og_members_block', 'block_2', $node->nid ); ?>
349 </div> <!-- /.block-inner -->
350 </div> <!-- /.block-260 -->
351 <?php endif; ?>
352
353
354 <!-- ****** ****** ****** Begin Random Members ****** ****** ****** -->
355
356 <?php if (!$members_empty): ?>
357 <div class="block content-block project-members">
358 <h2 class="title">Random Members</h2>
359 <div class="block-inner">
360 <?php print views_embed_view('og_members_block', 'block_3', $node->nid ); ?>
361 </div> <!-- /.block-inner -->
362 </div> <!-- /.block-260 -->
363 <?php endif; ?>
364
365 <!-- ****** ****** ****** Begin All Shows ****** ****** ****** -->
366
367
368 <div class="block content-block project-shows">
369 <h2 class="title">All Shows</h2>
370 <div class="block-inner">
371 <?php print views_embed_view('project_views', 'block_7', $node->nid ); ?>
372 </div> <!-- /.block-inner -->
373 </div> <!-- /.block-260 -->
374
375
376
377 <!-- END sidebar content -->
378
379 </div> <!-- /#content-sidebar -->
380
381
382 </div> <!-- /#node-sidebar-container -->
383 <?php endif; ?>
384
385
386
387 </div></div> <!-- /node-inner, /node -->

  ViewVC Help
Powered by ViewVC 1.1.2