This repository has been archived by the owner on Apr 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Beginning to reintegrate Tickets functionality.
- Loading branch information
Tyler Hall
committed
May 5, 2011
1 parent
4e7e661
commit eabe804
Showing
11 changed files
with
729 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?PHP | ||
require 'includes/master.inc.php'; | ||
$Auth->requireAdmin('login.php'); | ||
$nav = 'tickets'; | ||
|
||
$app = new Application($_GET['id']); | ||
if(!$app->ok()) redirect('tickets.php'); | ||
?> | ||
<?PHP include('inc/header.inc.php'); ?> | ||
|
||
<div id="bd"> | ||
<div id="yui-main"> | ||
<div class="yui-b"><div class="yui-g"> | ||
|
||
<div class="block tabs spaces"> | ||
<div class="hd"> | ||
<h2><?PHP echo $a->name; ?> Ticket Summary</h2> | ||
<ul> | ||
<li class="active"><a href="tickets-app-summary.php?id=<?PHP echo $app->id; ?>"><?PHP echo $app->name; ?> Summary</a></li> | ||
<li><a href="tickets-tickets.php?app_id=<?PHP echo $app->id; ?>">Tickets</a></li> | ||
<li><a href="tickets-milestones.php?app_id=<?PHP echo $app->id; ?>">Milestones</a></li> | ||
</ul> | ||
<div class="clear"></div> | ||
</div> | ||
<div class="bd"> | ||
|
||
</div> | ||
</div> | ||
|
||
</div></div> | ||
</div> | ||
<div id="sidebar" class="yui-b"> | ||
<div class="block"> | ||
<div class="hd"><h3>Create a New Item</h3></div> | ||
<div class="bd"> | ||
<p class="text-center"><a href="tickets-new.php?app_id=<?PHP echo $app->id; ?>" class="big-button">New Ticket</a></p> | ||
<p class="text-center"><a href="tickets-milestone-new.php?app_id=<?PHP echo $app->id; ?>" class="big-button">New Milestone</a></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<?PHP include('inc/footer.inc.php'); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?PHP | ||
require 'includes/master.inc.php'; | ||
$Auth->requireAdmin('login.php'); | ||
$nav = 'tickets'; | ||
|
||
$app = new Application($_GET['app_id']); | ||
if(!$app->ok()) redirect('tickets.php'); | ||
|
||
if(isset($_POST['btnNew'])) | ||
{ | ||
if($Error->ok()) | ||
{ | ||
$m = new Milestone(); | ||
$m->app_id = $app->id; | ||
$m->title = trim($_POST['title']); | ||
$m->description = $_POST['description']; | ||
$m->status = 'open'; | ||
$m->dt_due = dater($_POST['due']); | ||
|
||
if(strlen($m->title) == 0) | ||
$m->title = 'Untitled Milestone'; | ||
|
||
$m->insert(); | ||
redirect('tickets-milestones.php?app_id=' . $app->id); | ||
} | ||
else | ||
{ | ||
$title = $_POST['title']; | ||
$description = $_POST['description']; | ||
$due = $_POST['due']; | ||
} | ||
} | ||
else | ||
{ | ||
$title = ''; | ||
$description = ''; | ||
$due = ''; | ||
} | ||
?> | ||
<?PHP include('inc/header.inc.php'); ?> | ||
|
||
<div id="bd"> | ||
<div id="yui-main"> | ||
<div class="yui-b"><div class="yui-g"> | ||
|
||
<div class="block tabs spaces"> | ||
<div class="hd"> | ||
<h2><?PHP echo $a->name; ?> Ticket Summary</h2> | ||
<ul> | ||
<li><a href="tickets-app-summary.php?id=<?PHP echo $app->id; ?>"><?PHP echo $app->name; ?> Summary</a></li> | ||
<li><a href="tickets-tickets.php?app_id=<?PHP echo $app->id; ?>">Tickets</a></li> | ||
<li class="active"><a href="tickets-milestones.php?app_id=<?PHP echo $app->id; ?>">Milestones</a></li> | ||
</ul> | ||
<div class="clear"></div> | ||
</div> | ||
<div class="bd"> | ||
<form action="tickets-milestone-new.php?app_id=<?PHP echo $app->id;?>" method="post"> | ||
<p><label for="title">Title</label> <input type="text" name="title" id="title" value="<?PHP echo $title;?>" class="text"></p> | ||
<p><label for="description">Description</label><br><textarea name="description" id="description" class="text"><?PHP echo $description ?></textarea><span class="info">Markdown is allowed</span></p> | ||
<p><label for="due">Due Date:</label> <input type="text" name="due" id="due" value="<?PHP echo $due;?>" class="text"></p> | ||
<p><input type="submit" name="btnNew" value="Create Milestone" id="btnNew"></p> | ||
</form> | ||
</div> | ||
</div> | ||
|
||
</div></div> | ||
</div> | ||
<div id="sidebar" class="yui-b"> | ||
<div class="block"> | ||
<div class="hd"><h3>Create a New Item</h3></div> | ||
<div class="bd"> | ||
<p class="text-center"><a href="tickets-new.php?app_id=<?PHP echo $app->id; ?>" class="big-button">New Ticket</a></p> | ||
<p class="text-center"><a href="tickets-milestone-new.php?app_id=<?PHP echo $app->id; ?>" class="big-button">New Milestone</a></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script type="text/javascript" charset="utf-8"> | ||
window.onload = function() { | ||
document.getElementById('title').focus(); | ||
} | ||
</script> | ||
<?PHP include('inc/footer.inc.php'); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?PHP | ||
require 'includes/master.inc.php'; | ||
$Auth->requireAdmin('login.php'); | ||
$nav = 'tickets'; | ||
|
||
$m = new Milestone($_GET['id']); | ||
if(!$m->ok()) redirect('tickets.php'); | ||
$app = new Application($m->app_id); | ||
if(!$app->ok()) redirect('tickets.php'); | ||
|
||
if(isset($_POST['btnUpdate'])) | ||
{ | ||
if($Error->ok()) | ||
{ | ||
$m->app_id = $app->id; | ||
$m->title = trim($_POST['title']); | ||
$m->description = $_POST['description']; | ||
$m->status = 'open'; | ||
$m->dt_due = dater($_POST['due']); | ||
|
||
if(strlen($m->title) == 0) | ||
$m->title = 'Untitled Milestone'; | ||
|
||
$m->insert(); | ||
redirect('tickets-milestones.php?app_id=' . $app->id); | ||
} | ||
else | ||
{ | ||
$title = $_POST['title']; | ||
$description = $_POST['description']; | ||
$due = $_POST['due']; | ||
} | ||
} | ||
else | ||
{ | ||
$title = $m->title; | ||
$description = $m->description; | ||
$due = dater($m->dt_due, 'Y-m-d'); | ||
} | ||
?> | ||
<?PHP include('inc/header.inc.php'); ?> | ||
|
||
<div id="bd"> | ||
<div id="yui-main"> | ||
<div class="yui-b"><div class="yui-g"> | ||
|
||
<div class="block tabs spaces"> | ||
<div class="hd"> | ||
<h2><?PHP echo $a->name; ?> Ticket Summary</h2> | ||
<ul> | ||
<li><a href="tickets-app-summary.php?id=<?PHP echo $app->id; ?>"><?PHP echo $app->name; ?> Summary</a></li> | ||
<li><a href="tickets-tickets.php?app_id=<?PHP echo $app->id; ?>">Tickets</a></li> | ||
<li class="active"><a href="tickets-milestones.php?app_id=<?PHP echo $app->id; ?>">Milestones</a></li> | ||
</ul> | ||
<div class="clear"></div> | ||
</div> | ||
<div class="bd"> | ||
<form action="tickets-milestone.php?id=<?PHP echo $m->id;?>" method="post"> | ||
<p><label for="title">Title</label> <input type="text" name="title" id="title" value="<?PHP echo $title;?>" class="text"></p> | ||
<p><label for="description">Description</label><br><textarea name="description" id="description" class="text"><?PHP echo $description ?></textarea><span class="info">Markdown is allowed</span></p> | ||
<p><label for="due">Due Date:</label> <input type="text" name="due" id="due" value="<?PHP echo $due;?>" class="text"></p> | ||
<p><input type="submit" name="btnUpdate" value="Update Milestone" id="btnUpdate"></p> | ||
</form> | ||
</div> | ||
</div> | ||
|
||
</div></div> | ||
</div> | ||
<div id="sidebar" class="yui-b"> | ||
<div class="block"> | ||
<div class="hd"><h3>Create a New Item</h3></div> | ||
<div class="bd"> | ||
<p class="text-center"><a href="tickets-new.php?app_id=<?PHP echo $app->id; ?>" class="big-button">New Ticket</a></p> | ||
<p class="text-center"><a href="tickets-milestone-new.php?app_id=<?PHP echo $app->id; ?>" class="big-button">New Milestone</a></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script type="text/javascript" charset="utf-8"> | ||
window.onload = function() { | ||
document.getElementById('title').focus(); | ||
} | ||
</script> | ||
<?PHP include('inc/footer.inc.php'); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?PHP | ||
require 'includes/master.inc.php'; | ||
$Auth->requireAdmin('login.php'); | ||
$nav = 'tickets'; | ||
|
||
$app = new Application($_GET['app_id']); | ||
if(!$app->ok()) redirect('tickets.php'); | ||
|
||
$milestones = DBObject::glob('milestone', "SELECT * FROM shine_milestones WHERE app_id = '{$app->id}' ORDER BY dt_due ASC"); | ||
?> | ||
<?PHP include('inc/header.inc.php'); ?> | ||
|
||
<div id="bd"> | ||
<div id="yui-main"> | ||
<div class="yui-b"><div class="yui-g"> | ||
|
||
<div class="block tabs spaces"> | ||
<div class="hd"> | ||
<h2><?PHP echo $a->name; ?> Ticket Summary</h2> | ||
<ul> | ||
<li><a href="tickets-app-summary.php?id=<?PHP echo $app->id; ?>"><?PHP echo $app->name; ?> Summary</a></li> | ||
<li><a href="tickets-tickets.php?app_id=<?PHP echo $app->id; ?>">Tickets</a></li> | ||
<li class="active"><a href="tickets-milestones.php?app_id=<?PHP echo $app->id; ?>">Milestones</a></li> | ||
</ul> | ||
<div class="clear"></div> | ||
</div> | ||
<div class="bd"> | ||
<table> | ||
<thead> | ||
<tr> | ||
<td>Title</td> | ||
<td>Due</td> | ||
<td>Progres</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?PHP foreach($milestones as $m): ?> | ||
<tr> | ||
<td><a href="tickets-milestone.php?id=<?PHP echo $m->id; ?>"><?PHP echo $m->title; ?></a></td> | ||
<td><?PHP echo dater($m->dt_due, 'F j'); ?></td> | ||
<td><span class="pbar"><span class="inner" style="width:<?PHP echo $m->percent(); ?>%;"></span><span class="percent"><?PHP echo $m->percent(); ?>%</span></span></td> | ||
</tr> | ||
<?PHP endforeach; ?> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
|
||
</div></div> | ||
</div> | ||
<div id="sidebar" class="yui-b"> | ||
<div class="block"> | ||
<div class="hd"><h3>Create a New Item</h3></div> | ||
<div class="bd"> | ||
<p class="text-center"><a href="tickets-new.php?app_id=<?PHP echo $app->id; ?>" class="big-button">New Ticket</a></p> | ||
<p class="text-center"><a href="tickets-milestone-new.php?app_id=<?PHP echo $app->id; ?>" class="big-button">New Milestone</a></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<?PHP include('inc/footer.inc.php'); ?> |
Oops, something went wrong.