Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Commit

Permalink
Lots of UI tweaks and a few related entity improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Hall authored and Tyler Hall committed May 5, 2011
1 parent eabe804 commit 9a71b89
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 24 deletions.
2 changes: 1 addition & 1 deletion activations.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</ul>
<div class="clear"></div>

<table>
<table class="lines">
<thead>
<tr>
<td>Application</td>
Expand Down
4 changes: 4 additions & 0 deletions css/yuiapp.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,7 @@ a.big-button:hover {
width:100%;
height:350px;
}

table.lines tr {
border-bottom:1px solid #F0F0EE;
}
26 changes: 23 additions & 3 deletions feedback-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
$f->new = 0;
$f->update();
}

if(isset($_POST['btnNotes']))
{
$f->notes = $_POST['notes'];
$f->update();
redirect('feedback-view.php?id=' . $f->id);
}

// Get related orders
$db = Database::getDatabase();
Expand Down Expand Up @@ -59,7 +66,7 @@
</div>
<div class="bd">

<table>
<table class="lines">
<tr>
<th>App Name</th>
<td><?PHP echo $f->appname . ' ' . $f->appversion;?></td>
Expand Down Expand Up @@ -108,9 +115,22 @@
<input type="submit" name="btnDelete" value="Delete" id="btndelete" onclick="return confirm('Are you sure?');"/>
</p>
</form>

</div>
</div>
</div>

<div class="block">
<div class="hd">
<h2>Feedback Notes</h2>
</div>
<div clcass="bd">
<form action="feedback-view.php?id=<?PHP echo $f->id; ?>" method="post" class="bd">
<textarea style="width:100%;" name="notes" id="notes"><?PHP echo $f->notes; ?></textarea>
<input type="submit" name="btnNotes" value="Save Notes" id="btnNotes">
<span class="info">Notes will NOT be sent or made visible to customers.</span>
</form>
</div>
</div>

</div></div>
</div>
<div id="sidebar" class="yui-b">
Expand Down
4 changes: 2 additions & 2 deletions feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div class="clear"></div>
</div>
<div class="bd">
<table>
<table class="lines">
<thead>
<tr>
<td>ID</td>
Expand All @@ -49,7 +49,7 @@
<td><?PHP echo $f->id; ?></td>
<td><?PHP echo $f->appname; ?> <?PHP echo $f->appversion; ?></td>
<td><?PHP echo $f->type; ?></td>
<td><?PHP echo $f->email; ?></td>
<td><a href="mailto:<?PHP echo $f->email; ?>"><?PHP echo $f->email; ?></a></td>
<td><?PHP echo ($f->reply == 1) ? '<strong>Yes</strong>' : 'No'; ?></td>
<td><?PHP echo time2str($f->dt); ?></td>
<td><a href="feedback-view.php?id=<?PHP echo $f->id; ?>">View</a></td>
Expand Down
2 changes: 1 addition & 1 deletion includes/class.objects.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class Feedback extends DBObject
{
public function __construct($id = null)
{
parent::__construct('shine_feedback', array('appname', 'appversion', 'systemversion', 'email', 'reply', 'type', 'message', 'importance', 'critical', 'dt', 'ip', 'new', 'starred', 'reguser', 'regmail'), $id);
parent::__construct('shine_feedback', array('appname', 'appversion', 'systemversion', 'email', 'reply', 'type', 'message', 'importance', 'critical', 'dt', 'ip', 'new', 'starred', 'reguser', 'regmail', 'notes'), $id);
}
}

Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<h2>Your Applications</h2>
</div>
<div class="bd">
<table>
<table class="lines">
<thead>
<tr>
<td>Name</td>
Expand Down Expand Up @@ -83,7 +83,7 @@
<h2>Recent Orders (<?PHP echo number_format(Order::totalOrders()); ?> total)</h2>
</div>
<div class="bd">
<table>
<table class="lines">
<thead>
<tr>
<td>Date</td>
Expand Down
60 changes: 47 additions & 13 deletions order.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
}

$app = new Application($o->app_id);

// Get related orders
$db = Database::getDatabase();
$orders = DBObject::glob('Order', 'SELECT * FROM shine_orders WHERE payer_email = ' . $db->quote($o->payer_email) . ' AND id <> ' . $o->id . ' ORDER BY dt DESC');
?>
<?PHP include('inc/header.inc.php'); ?>

Expand All @@ -55,20 +59,59 @@
</h2>
</div>
<div class="bd">
<table>
<table class="lines">
<?PHP foreach($o->columns as $k => $v) : ?>
<?PHP if(strlen(trim($v)) > 0) : ?>
<tr>
<th><?PHP echo $k; ?></th>
<th><strong><?PHP echo $k; ?></strong></th>
<td><?PHP echo $v; ?></td>
</tr>
<?PHP endif; ?>
<?PHP endforeach; ?>
</table>
</div>
</div>


<div class="block">
<div class="hd">
<h2>Order Notes</h2>
</div>
<div class="bd">
<form action="order.php?id=<?PHP echo $o->id; ?>" method="post" class="bd">
<textarea style="width:100%;" name="notes" id="notes"><?PHP echo $o->notes; ?></textarea>
<input type="submit" name="btnNotes" value="Save Notes" id="btnNotes">
<span class="info">Notes will NOT be sent or made visible to customers.</span>
</form>
</div>
</div>

</div></div>
</div>
<div id="sidebar" class="yui-b">
<div class="block">
<div class="hd">
<h3>Related Orders</h3>
</div>
<div class="bd">
<table class="lines">
<thead>
<tr>
<td>Date</td>
<td>App Name</td>
</tr>
</thead>
<tbody>
<?PHP foreach($orders as $o2) : ?>
<tr>
<td><a href="order.php?id=<?PHP echo $o2->id; ?>"><?PHP echo time2str($o2->dt); ?></a></td>
<td><?PHP echo $o->applicationName(); ?></td>
</tr>
<?PHP endforeach; ?>
</tbody>
</table>
</div>
</div>

<div class="block">
<div class="hd">
<h3>License Options</h3>
Expand Down Expand Up @@ -122,16 +165,7 @@
<?PHP endif; ?>
</div>
</div>

<div class="block">
<div class="hd">
<h3>Order Notes</h3>
</div>
<form action="order.php?id=<?PHP echo $o->id; ?>" method="post" class="bd">
<textarea style="width:100%;" name="notes" id="notes"><?PHP echo $o->notes; ?></textarea>
<input type="submit" name="btnNotes" value="Save Notes" id="btnNotes">
</form>
</div>


</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</ul>
<div class="clear"></div>

<table>
<table class="lines">
<thead>
<tr>
<td>Application</td>
Expand Down
2 changes: 1 addition & 1 deletion tweets.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function twitterfy($str)
<div class="clear"></div>
</div>
<div class="bd">
<table>
<table class="lines">
<tbody>
<?PHP foreach($tweets as $t) : ?>
<?PHP if($t->new) : ?>
Expand Down

0 comments on commit 9a71b89

Please sign in to comment.