Update of /cvsroot/php-blog/serendipity/include/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17912/include/admin
Modified Files:
entries.inc.php plugins.inc.php templates.inc.php
users.inc.php
Log Message:
- Add some images to the administration, more to come and some might change
- Redesign image manager
- Add a success message when setting a new template
- Use diffirent method to install templates, forget about using forms and javascript
Index: templates.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/templates.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- templates.inc.php 27 Nov 2004 22:14:15 -0000 1.3
+++ templates.inc.php 10 Dec 2004 16:56:06 -0000 1.4
@@ -8,14 +8,13 @@
return;
}
-if ($serendipity['GET']['adminAction'] == 'save' ) {
- serendipity_set_config_var('template', $serendipity['POST']['theme']);
+if ($serendipity['GET']['adminAction'] == 'install' ) {
+ serendipity_set_config_var('template', $serendipity['GET']['theme']);
+ echo '<div class="serendipityAdminMsgSuccess">'. sprintf(TEMPLATE_SET, $serendipity['GET']['theme']) .'</div>';
}
?>
<?php echo SELECT_TEMPLATE; ?>
-<div>
- <form method="post" action="<?php echo $serendipity['serendipityHTTPPath']; ?>serendipity_admin.php?serendipity[adminModule]=templates&serendipity[adminAction]=save">
<?php
$i = 0;
foreach (serendipity_fetchTemplates() as $theme) {
@@ -35,22 +34,21 @@
$class = (($i % 2) ? 'even' : 'uneven');
- $jsLine = " onmousedown=\"document.getElementById('serendipity_theme_radio_". $theme ."').checked = true;\"";
-# $jsLine .= " onmouseout=\"document.getElementById('serendipity_theme_". $theme ."').className='';\"";
- $jsLine .= " onmouseover=\"style.cursor = 'pointer';\"";
?>
<div class="serendipity_admin_list_item serendipity_admin_list_item_<?php echo $class ?>">
<table width="100%" id="serendipity_theme_<?php echo $theme; ?>">
<tr>
- <td colspan="2" <?php echo $jsLine ?>><strong><?php echo $info['name']; ?></strong></td>
- <td valign="middle" align="center" width="70" <?php echo $jsLine ?> rowspan="2">
- <div><input type="radio" name="serendipity[theme]" value="<?php echo $theme; ?>" id="serendipity_theme_radio_<?php echo $theme; ?>" <?php echo $is_active; ?> /></div>
+ <td colspan="2"><strong><?php echo $info['name']; ?></strong></td>
+ <td valign="middle" align="center" width="70" rowspan="2">
+<?php if ( $serendipity['template'] != $theme ) { ?>
+ <a href="?serendipity[adminModule]=templates&serendipity[adminAction]=install&serendipity[theme]=<?php echo $theme ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/install_now.png') ?>" alt="<?php echo SET_AS_TEMPLATE ?>" title="<?php echo SET_AS_TEMPLATE ?>" border="0" /></a>
+<?php } ?>
</td>
</tr>
<tr>
- <td width="100" <?php echo $jsLine ?> style="padding-left: 10px"><?php echo $preview; ?></td>
- <td valign="top" <?php echo $jsLine ?>>
+ <td width="100" style="padding-left: 10px"><?php echo $preview; ?></td>
+ <td valign="top">
<?php echo AUTHOR; ?> : <?php echo $info['author'];?><br />
<?php echo LAST_UPDATED; ?>: <?php echo $info['date']; ?>
</td>
@@ -60,9 +58,6 @@
<?php
}
?>
- <div align="right"><input type="submit" name="submit" value="<?php echo SET_AS_TEMPLATE; ?>" /></div>
- </form>
-</div>
<?php
/* vim: set sts=4 ts=4 expandtab : */
?>
Index: users.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/users.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- users.inc.php 8 Dec 2004 21:04:34 -0000 1.7
+++ users.inc.php 10 Dec 2004 16:56:06 -0000 1.8
@@ -92,11 +92,19 @@
$i = 0;
foreach($users as $user) {
if ($user['userlevel'] < $serendipity['serendipityUserlevel'] || $user['authorid'] == $serendipity['authorid'] || $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN ) {
+
+ if ( $user['userlevel'] >= USERLEVEL_ADMIN ) {
+ $img = serendipity_getTemplateFile('admin/img/user_admin.png');
+ } elseif ( $user['userlevel'] >= USERLEVEL_CHIEF ) {
+ $img = serendipity_getTemplateFile('admin/img/user_chief.png');
+ } else {
+ $img = serendipity_getTemplateFile('admin/img/user_editor.png');
+ }
?>
<div class="serendipity_admin_list_item serendipity_admin_list_item_<?php echo ($i++ % 2) ? 'even' : 'uneven' ?>">
<table width="100%">
<tr>
- <td><?php echo htmlspecialchars($user['username']); ?></td>
+ <td><img src="<?php echo $img ?>" alt="" style="border: 0px none ; vertical-align: bottom; display: inline;" /> <?php echo htmlspecialchars($user['username']); ?></td>
<td width="100" align="center"><?php echo $user['userlevel']; ?></td>
<td width="200" align="right"> [<a href="?serendipity[adminModule]=users&serendipity[adminAction]=edit&serendipity[userid]=<?php echo $user['authorid'] ?>"><?php echo EDIT ?></a>]
- [<a href="?serendipity[adminModule]=users&serendipity[adminAction]=delete&serendipity[userid]=<?php echo $user['authorid'] ?>"><?php echo DELETE ?></a>]</td>
Index: entries.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/entries.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- entries.inc.php 6 Dec 2004 11:14:20 -0000 1.9
+++ entries.inc.php 10 Dec 2004 16:56:05 -0000 1.10
@@ -183,7 +183,7 @@
$rows++;
// Find out if the entry has been modified later than 30 minutes after creation
if ($entry['timestamp'] <= ($entry['last_modified'] - 60*30)) {
- $lm = '<a href="#" title="' . LAST_UPDATED . ': ' . serendipity_formatTime(DATE_FORMAT_SHORT, $entry['last_modified']) . '" onclick="alert(this.title)">*</a>';
+ $lm = '<a href="#" title="' . LAST_UPDATED . ': ' . serendipity_formatTime(DATE_FORMAT_SHORT, $entry['last_modified']) . '" onclick="alert(this.title)"><img src="'. serendipity_getTemplateFile('admin/img/clock.png') .'" alt="*" style="border: 0px none ; vertical-align: bottom;" /></a>';
} else {
$lm = '';
}
Index: plugins.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/plugins.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- plugins.inc.php 9 Dec 2004 13:36:17 -0000 1.7
+++ plugins.inc.php 10 Dec 2004 16:56:06 -0000 1.8
@@ -91,13 +91,13 @@
if ($sort_idx == 0) {
$moveup = ' ';
} else {
- $moveup = '<a href="?serendipity[adminModule]=plugins&submit=move+up&serendipity[plugin_to_move]=' . $key . $event_only_uri . '" style="border: 0"><img src="' . serendipity_getTemplateFile('img/up.png') .'" border="0" alt="' . UP . '" /></a>';
+ $moveup = '<a href="?serendipity[adminModule]=plugins&submit=move+up&serendipity[plugin_to_move]=' . $key . $event_only_uri . '" style="border: 0"><img src="' . serendipity_getTemplateFile('admin/img/uparrow.png') .'" border="0" alt="' . UP . '" /></a>';
}
if ($sort_idx == (count($plugins)-1)) {
$movedown = ' ';
} else {
- $movedown = ($moveup != '' ? ' ' : '') . '<a href="?serendipity[adminModule]=plugins&submit=move+down&serendipity[plugin_to_move]=' . $key . $event_only_uri . '" style="border: 0"><img src="' . serendipity_getTemplateFile('img/down.png') . '" alt="'. DOWN .'" border="0" /></a>';
+ $movedown = ($moveup != '' ? ' ' : '') . '<a href="?serendipity[adminModule]=plugins&submit=move+down&serendipity[plugin_to_move]=' . $key . $event_only_uri . '" style="border: 0"><img src="' . serendipity_getTemplateFile('admin/img/downarrow.png') . '" alt="'. DOWN .'" border="0" /></a>';
}
?>
<tr>
@@ -545,7 +545,7 @@
<td><strong><?php echo $plug['name'] ?></strong></td>
<td width="100" align="center" valign="middle" rowspan="3">
<?php if ( $plug['installable'] == true ) { ?>
- <a href="?serendipity[adminModule]=plugins&serendipity[pluginPath]=<?php echo $plug['pluginPath']; ?>&serendipity[install_plugin]=<?php echo $plug['plugin_class'] ?>"><?php echo INSTALL ?></a>
+ <a href="?serendipity[adminModule]=plugins&serendipity[pluginPath]=<?php echo $plug['pluginPath']; ?>&serendipity[install_plugin]=<?php echo $plug['plugin_class'] ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/install_now.png') ?>" title="<?php echo INSTALL ?>" alt="<?php echo INSTALL ?>" border="0"></a>
<?php } else { ?>
<span style="color: #cccccc"><?php echo ALREADY_INSTALLED ?></span>
<?php } ?>
@@ -614,19 +614,24 @@
}
}
}
+?>
+ <?php echo BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS ?>
+ <br />
+ <br />
- echo BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS . '<br /><br />';
+ <h3><?php echo SIDEBAR_PLUGINS ?></h3>
+ <a href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew"><img src="<?php echo serendipity_getTemplateFile('admin/img/install.png') ?>" style="border: 0px none ; vertical-align: middle; display: inline;" alt=""> <?php echo sprintf(CLICK_HERE_TO_INSTALL_PLUGIN, SIDEBAR_PLUGIN) ?></a>
- echo '<h3>' . SIDEBAR_PLUGINS . '</h3>';
- echo '<a href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew">'. sprintf(CLICK_HERE_TO_INSTALL_PLUGIN, SIDEBAR_PLUGIN) .'</a>';
+ <?php show_plugins(false); ?>
- show_plugins(false);
+ <br />
+ <br />
- echo '<br /><br />';
+ <h3><?php echo EVENT_PLUGINS ?></h3>
+ <a href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[type]=event"><img src="<?php echo serendipity_getTemplateFile('admin/img/install.png') ?>" style="border: 0px none ; vertical-align: middle; display: inline;" alt=""> <?php echo sprintf(CLICK_HERE_TO_INSTALL_PLUGIN, EVENT_PLUGIN) ?></a>
+ <?php show_plugins(true); ?>
- echo '<h3>' . EVENT_PLUGINS . '</h3>';
- echo '<a href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[type]=event">'. sprintf(CLICK_HERE_TO_INSTALL_PLUGIN, EVENT_PLUGIN) .'</a>';
- show_plugins(true);
+<?php
}
/* vim: set sts=4 ts=4 expandtab : */
?>
|