-
Notifications
You must be signed in to change notification settings - Fork 1
/
page-ticket-details.php
56 lines (47 loc) · 1.21 KB
/
page-ticket-details.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/*
* Template Name: Trac Ticket Details
* Description: a page to show the details for a ticket.
*/
$DEBUG = False;
get_header();
wp_enqueue_style('wptc-trac-ticket');
// get parent page's slug
$parent_slug = get_page($post->post_parent)->post_name;
$ticket_id = $_GET['id'];
if ($DEBUG) {
$ticket = wptc_get_ticket_changelog($ticket_id);
echo '<pre>';
var_dump($ticket);
echo '</pre>';
}
?>
<div id="left_column">
<div class='leftnav'>
<div class='widget'>
<h2 class='widgettitle'>Sprint Navigation</h2>
<?php wptc_widget_sprint_nav()?>
</div>
</div>
</div>
<div id="right_column">
<?php echo wptc_widget_ticket_info($ticket_id); ?>
<?php echo wptc_widget_ticket_changelog($ticket_id); ?>
<?php
// debug message...
if ($DEBUG) {
$parent_post = get_page($post->post_parent);
echo <<<EOT
<p>get to know current page:</p>
<pre>
REQUEST_URI: {$_SERVER['REQUEST_URI']}<br/>
Request args:
Current Page's slug (post_name): {$post->post_name}<br/>
Current page's parent page ID (post_parent): {$post->post_parent}<br/>
Current page's parent page slug: {$parent_post->post_name}
</pre>
EOT;
}
?>
</div>
<?php get_footer(); ?>