Add a Storage tab, to provide a place to define your storage areas

This commit is contained in:
Isaac Connor 2015-12-15 11:13:21 -05:00
parent 14dc447145
commit 20f9a01a66
1 changed files with 30 additions and 1 deletions

View File

@ -31,6 +31,7 @@ $tabs['skins'] = translate('Display');
$tabs['system'] = translate('System'); $tabs['system'] = translate('System');
$tabs['config'] = translate('Config'); $tabs['config'] = translate('Config');
$tabs['servers'] = translate('Servers'); $tabs['servers'] = translate('Servers');
$tabs['storage'] = translate('Storage');
$tabs['paths'] = translate('Paths'); $tabs['paths'] = translate('Paths');
$tabs['web'] = translate('Web'); $tabs['web'] = translate('Web');
$tabs['images'] = translate('Images'); $tabs['images'] = translate('Images');
@ -237,7 +238,35 @@ elseif ( $tab == "users" )
<input type="button" value="<?php echo translate('AddNewServer') ?>" onclick="createPopup( '?view=server&amp;id=0', 'zmServer', 'server' );"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>/><input type="submit" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled"/><input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow();"/> <input type="button" value="<?php echo translate('AddNewServer') ?>" onclick="createPopup( '?view=server&amp;id=0', 'zmServer', 'server' );"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>/><input type="submit" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled"/><input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow();"/>
</div> </div>
</form> </form>
<?php
} else if ( $tab == "storage" ) { ?>
<form name="storageForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input type="hidden" name="view" value="<?php echo $view ?>"/>
<input type="hidden" name="tab" value="<?php echo $tab ?>"/>
<input type="hidden" name="action" value="delete"/>
<input type="hidden" name="object" value="storage"/>
<table id="contentTable" class="major storageTable" cellspacing="0">
<thead>
<tr>
<th class="colName"><?php echo translate('name') ?></th>
<th class="colPath"><?php echo translate('path') ?></th>
<th class="colMark"><?php echo translate('Mark') ?></th>
</tr>
</thead>
<tbody>
<?php foreach( dbFetchAll( 'SELECT * FROM Storage ORDER BY Name' ) as $row ) { ?>
<tr>
<td class="colName"><?php echo makePopupLink( '?view=storage&amp;id='.$row['Id'], 'zmStorage', 'storage', validHtmlStr($row['Name']), $canEdit ) ?></td>
<td class="colPath"><?php echo makePopupLink( '?view=storage&amp;id='.$row['Id'], 'zmStorage', 'storage', validHtmlStr($row['Path']), $canEdit ) ?></td>
<td class="colMark"><input type="checkbox" name="markIds[]" value="<?php echo $row['Id'] ?>" onclick="configureDeleteButton( this );"<?php if ( !$canEdit ) { ?> disabled="disabled"<?php } ?>/></td>
</tr>
<?php } #end foreach Server ?>
</tbody>
</table>
<div id="contentButtons">
<input type="button" value="<?php echo translate('AddNewStorage') ?>" onclick="createPopup( '?view=storage&amp;id=0', 'zmStorage', 'storage' );"<?php if ( !canEdit( 'System' ) ) { ?> disabled="disabled"<?php } ?>/><input type="submit" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled"/><input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow();"/>
</div>
</form>
<?php <?php
} else { } else {
if ( $tab == "system" ) { if ( $tab == "system" ) {