-
Notifications
You must be signed in to change notification settings - Fork 988
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: Load storage usage with Ajax instead of on page load
- Loading branch information
1 parent
9fd0c42
commit bbd3f61
Showing
5 changed files
with
91 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,20 @@ | ||
<?php | ||
|
||
/** | ||
* @var string $uploaddir | ||
* @since 2017-09-20 | ||
* @author Olle Härstedt | ||
*/ | ||
|
||
|
||
|
||
?> | ||
|
||
<label><?php eT('Overview'); ?></label> | ||
<table class='table table-striped table-bordered'> | ||
<tr> | ||
<td><?php eT('Total storage:'); ?></td> | ||
<td><?php echo $totalStorage; ?></td> | ||
</tr> | ||
<tr> | ||
<td><?php eT('Survey storage:'); ?></td> | ||
<td><?php echo $surveySize; ?></td> | ||
</tr> | ||
<tr> | ||
<td><?php eT('Template storage:'); ?></td> | ||
<td><?php echo $templateSize; ?></td> | ||
</tr> | ||
<tr> | ||
<td><?php eT('Label set storage:'); ?></td> | ||
<td><?php echo $labelSize; ?></td> | ||
</tr> | ||
</table> | ||
|
||
<?php if ($surveys): ?> | ||
<label><?php eT('Survey storage'); ?></label> | ||
<table class='table table-striped table-bordered'> | ||
<?php foreach ($surveys as $survey): ?> | ||
<tr> | ||
<td><?php echo $survey['name']; ?> (<?php echo $survey['sid']; ?>)</td> | ||
<td><?php echo $survey['size']; ?></td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</table> | ||
<?php endif; ?> | ||
|
||
<?php if ($templates): ?> | ||
<label><?php eT('Template storage'); ?></label> | ||
<table class='table table-striped table-bordered'> | ||
<?php foreach ($templates as $templates): ?> | ||
<tr> | ||
<td><?php echo $templates['name']; ?></td> | ||
<td><?php echo $templates['size']; ?></td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</table> | ||
<?php endif; ?> | ||
<div id='global-settings-storage'> | ||
<input type='hidden' name='global-settings-storage-url' value='<?php echo Yii::app()->createUrl('admin/globalsettings', array('sa' => 'getStorageData')); ?>' /> | ||
<button id='global-settings-calculate-storage' class='btn btn-default '> | ||
<span class='fa fa-cogs'></span> | ||
<?php eT('Calculate storage'); ?> | ||
</button> | ||
<br/> | ||
<span class='text-muted'> | ||
<?php eT('Depending on the number of uploaded files, this might take some time.'); ?> | ||
</span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
/** | ||
* @since 2017-09-20 | ||
* @author Olle Härstedt | ||
*/ | ||
|
||
?> | ||
|
||
<label><?php eT('Overview'); ?></label> | ||
<table class='table table-striped table-bordered'> | ||
<tr> | ||
<td><?php eT('Total storage:'); ?></td> | ||
<td><?php echo $totalStorage; ?></td> | ||
</tr> | ||
<tr> | ||
<td><?php eT('Survey storage:'); ?></td> | ||
<td><?php echo $surveySize; ?></td> | ||
</tr> | ||
<tr> | ||
<td><?php eT('Template storage:'); ?></td> | ||
<td><?php echo $templateSize; ?></td> | ||
</tr> | ||
<tr> | ||
<td><?php eT('Label set storage:'); ?></td> | ||
<td><?php echo $labelSize; ?></td> | ||
</tr> | ||
</table> | ||
|
||
<?php if ($surveys): ?> | ||
<label><?php eT('Survey storage'); ?></label> | ||
<table class='table table-striped table-bordered'> | ||
<?php foreach ($surveys as $survey): ?> | ||
<tr> | ||
<td><?php echo $survey['name']; ?> (<?php echo $survey['sid']; ?>)</td> | ||
<td><?php echo $survey['size']; ?></td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</table> | ||
<?php endif; ?> | ||
|
||
<?php if ($templates): ?> | ||
<label><?php eT('Template storage'); ?></label> | ||
<table class='table table-striped table-bordered'> | ||
<?php foreach ($templates as $templates): ?> | ||
<tr> | ||
<td><?php echo $templates['name']; ?></td> | ||
<td><?php echo $templates['size']; ?></td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</table> | ||
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters