Skinned my account page

This commit is contained in:
Latif Khalifa
2013-10-14 08:22:32 +02:00
parent 182825f792
commit e9466ce592
5 changed files with 34 additions and 11 deletions

View File

@@ -4,6 +4,6 @@ php_flag display_errors on
ExpiresActive On
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType text/css "access plus 1 hour"
# ExpiresByType text/css "access plus 1 hour"
</IfModule>

View File

@@ -25,10 +25,11 @@ Layout::header();
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="hidden" name="user_id" value="<?php echo (int)$user->user_id; ?>" />
<table>
<table class="jtable">
<tr>
<td>Name</td>
<td><input type="text" name="name" size="30" value="<?php echo htmlentities($user->name); ?>" />&nbsp;<input type="submit" name="save_name" value="Save" /></td>
<td><input class="ui-widget-content" type="text" name="name" size="30" value="<?php echo htmlentities($user->name); ?>" />&nbsp;
<input class="ui-widget-content toolbarbutton" type="submit" name="save_name" value="Save" /></td>
</tr>
<tr>
<td>Email</td>

View File

@@ -27,6 +27,7 @@ div {
margin: 0;
}
/*
input {
color: #a0a0a0;
background-color: #2C3737;
@@ -38,6 +39,22 @@ input {
input:hover {
background-color: #445A5E;
}
*/
input, select, textarea {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
textarea,
select,
input[type="text"] {
padding: 0.25em 0.3em;
margin: 0.1em 0;
vertical-align: middle;
border-radius: 4px;
}
a, a:link, a:hover, a:visited, a:active {
text-decoration: none;

View File

@@ -171,7 +171,7 @@ class SearchFilter
<div class="filterelem">
Version<br/>
<select class="ui-widget-content" name="version" onchange="this.form.submit();" style="width: 100px; margin-top: 4px;">
<select class="ui-widget-content" name="version" onchange="this.form.submit();" style="width: 100px;">
<option value="" <?php echo !$this->version ? 'selected="selected"' : '' ?>>All</option>
<?php
for($i = 0; $i < count($ver); $i++)
@@ -195,7 +195,7 @@ for($i = 0; $i < count($ver); $i++)
<div class="filterelem">
Grid<br/>
<select class="ui-widget-content" name="grid" onchange="this.form.submit();" style="width: 200px; margin-top: 4px;">
<select class="ui-widget-content" name="grid" onchange="this.form.submit();" style="width: 200px;">
<option value="" <?php echo !$this->grid ? 'selected="selected"' : '' ?>>All</option>
<?php
for($i = 0; $i < count($grids); $i++)
@@ -209,8 +209,8 @@ for($i = 0; $i < count($grids); $i++)
<div class="filterelem">
Stacktrace contains<br/>
<input class="ui-widget-content ui-button" type="text" name="stacktrace" value="<?php echo htmlentities($this->stacktrace) ?>" style="text-align: left; padding-left: 4px;" />
<input class="ui-widget-content toolbarbutton" type="submit" name="do_search" value="Search" />
<input class="ui-widget-content" type="text" name="stacktrace" value="<?php echo htmlentities($this->stacktrace) ?>" />
<input class="toolbarbutton" type="submit" name="do_search" value="Search" />
</div>
</div>

View File

@@ -43,7 +43,7 @@ Layout::header();
<th>Name</th>
<th>Email</th>
<th>Access</th>
<th>Actions</th>
<th colspan="2">Actions</th>
</tr>
<?php for ($i=0; $i<count($users); $i++): ?>
<tr>
@@ -51,14 +51,19 @@ Layout::header();
<td><?php echo htmlentities($users[$i]->name); ?></td>
<td><?php echo htmlentities($users[$i]->email); ?></td>
<td><?php echo $users[$i]->isAdmin() ? "Admin" : ($users[$i]->isAllowed() ? "Granted" : "No"); ?></td>
<td>
<?php
if (!$users[$i]->isAdmin())
if ($users[$i]->isAdmin())
{
print '<td colspan="2">';
}
else
{
print "<td>";
$action = $users[$i]->isAllowed() ? "revoke" : "grant";
$url = URL_ROOT . "/users.php?action=$action&id=" . (int)$users[$i]->user_id;
$delete = URL_ROOT . "/users.php?action=remove&id=" . (int)$users[$i]->user_id;
print "<a class=\"toolbarbutton\" href=\"{$url}\">{$action}</a>&nbsp;&nbsp;";
print "<a class=\"toolbarbutton\" href=\"{$url}\">{$action}</a>";
print "</td><td>";
print "<a class=\"toolbarbutton\" href=\"{$delete}\" title=\"Caution: completely deletes information about this user.\" onclick=\"return confirm('Are you sure you want to completely remove this account? Just revoking access works too, and they can create it again by logging with their Google credentials.');\">delete account</a>";
}
?>