зеркало из https://github.com/mozilla/gecko-dev.git
Work on improving the admin interface somewhat.
This commit is contained in:
Родитель
5973d02c58
Коммит
f7ebd48a1c
|
@ -72,6 +72,24 @@ class AdminController extends AppController {
|
|||
$party = $this->Party->read();
|
||||
$this->set('party', $party);
|
||||
$this->data = $party;
|
||||
$this->data['Party']['name'] = preg_replace("/&#(\d{2,5});/e",
|
||||
'$this->Unicode->unicode2utf(${1})',
|
||||
html_entity_decode($this->data['Party']['name']));
|
||||
$this->data['Party']['vname'] = preg_replace("/&#(\d{2,5});/e",
|
||||
'$this->Unicode->unicode2utf(${1})',
|
||||
html_entity_decode($this->data['Party']['vname']));
|
||||
$this->data['Party']['website'] = preg_replace("/&#(\d{2,5});/e",
|
||||
'$this->Unicode->unicode2utf(${1})',
|
||||
html_entity_decode($this->data['Party']['website']));
|
||||
$this->data['Party']['address'] = preg_replace("/&#(\d{2,5});/e",
|
||||
'$this->Unicode->unicode2utf(${1})',
|
||||
html_entity_decode($this->data['Party']['address']));
|
||||
$this->data['Party']['notes'] = preg_replace("/&#(\d{2,5});/e",
|
||||
'$this->Unicode->unicode2utf(${1})',
|
||||
html_entity_decode($this->data['Party']['notes']));
|
||||
$this->data['Party']['flickrusr'] = preg_replace("/&#(\d{2,5});/e",
|
||||
'$this->Unicode->unicode2utf(${1})',
|
||||
html_entity_decode($this->data['Party']['flickrusr']));
|
||||
break;
|
||||
|
||||
case 'comment':
|
||||
|
@ -96,6 +114,8 @@ class AdminController extends AppController {
|
|||
|
||||
case 'party':
|
||||
$this->Party->id = $id;
|
||||
$clean = new Sanitize();
|
||||
$clean->cleanArray($this->data);
|
||||
$this->Party->save($this->data);
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php if (isset($user)): ?>
|
||||
<h1>User <?php echo $user['User']['name'].' ('.$user['User']['id']; ?>)</h1>
|
||||
<h1><?php echo $user['User']['name'].' (<a href="'.APP_BASE.$html->url('/users/view/'.$user['User']['id']).'">'.$user['User']['id']; ?>)</h1>
|
||||
<form class="fxform" action="<?php echo $html->url('/admin/edit/user/'.$user['User']['id']); ?>" method="post">
|
||||
<div>
|
||||
<label for="UserName" class="label-large">Name:</label>
|
||||
|
@ -37,7 +37,7 @@
|
|||
</form>
|
||||
|
||||
<?php endif; if (isset($party)): ?>
|
||||
<h1>Party <?php echo $party['Party']['name'].' ('.$party['Party']['id']; ?>)</h1>
|
||||
<h1><?php echo $party['Party']['name'].' (<a href="'.APP_BASE.$html->url('/parties/view/'.$party['Party']['id']).'">'.$party['Party']['id']; ?>)</h1>
|
||||
<form class="fxform" action="<?php echo $html->url('/admin/edit/party/'.$party['Party']['id']); ?>" method="post">
|
||||
<div>
|
||||
<label for="PartyOwner" class="label-large">Party Owner:</label>
|
||||
|
@ -108,7 +108,7 @@
|
|||
</form>
|
||||
|
||||
<?php endif; if(isset($comment)): ?>
|
||||
<h1>Comment by <?php echo $owner.' (<a href="'.APP_BASE.$html->url('/admin/edit/user/'.$comment['Comment']['owner']).'">'.$comment['Comment']['owner']; ?></a>)</h1>
|
||||
<h1>Comment #<?php echo $comment['Comment']['id']; ?> by <?php echo '<a href="'.APP_BASE.$html->url('/admin/edit/user/'.$comment['Comment']['owner']).'">'.$owner; ?></a></h1>
|
||||
<form class="fxform" action="<?php echo $html->url('/admin/edit/comment/'.$comment['Comment']['id']); ?>" method="post">
|
||||
<div>
|
||||
<label for="CommentAssoc" class="label-large">Party:</label>
|
||||
|
|
Загрузка…
Ссылка в новой задаче