Project

General

Profile

« Previous | Next » 

Revision e76931e2

Added by Stephen Beaver over 9 years ago

Sort the Available Widgets before display
Remove unused modal

View differences:

src/usr/local/www/index.php
324 324
		<div class="content">
325 325
			<div class="row">
326 326
<?php
327
foreach ($widgets as $widgetname => $widgetconfig):
327

  
328
// Build the Available Widgets table using a sorted copy of the $widgets array
329
$available = $widgets;
330
ksort($available);
331

  
332
foreach ($available as $widgetname => $widgetconfig):
328 333
	if ($widgetconfig['display'] == 'none'):
329 334
?>
330 335
		<div class="col-sm-3"><a href="#" id="btnadd-<?=$widgetname?>"><i class="fa fa-plus"></i> <?=$widgetconfig['name']?></a></div>
......
335 340
	</div>
336 341
</div>
337 342

  
338
<div class="modal fade">
339
	<div class="modal-dialog">
340
		<div class="modal-content">
341
			<div class="modal-header">
342
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
343
				<h4 class="modal-title"><?=gettext("Welcome to the Dashboard page"); ?>!</h4>
344
			</div>
345
			<div class="modal-body">
346
				<p>
347
					<?=gettext("This page allows you to customize the information you want to be displayed!");?>
348
					<?=gettext("To get started click the ");?> FIXME <?=gettext(" icon to add widgets.");?><br />
349
					<br />
350
					<?=gettext("You can move any widget around by clicking and dragging the title.");?>
351
				</p>
352
			</div>
353
			<div class="modal-footer">
354
				<button type="button" class="btn btn-default btn-primary" data-dismiss="modal">Close</button>
355
			</div>
356
		</div>
357
	</div>
358
</div>
359

  
360 343
<div class="hidden" id="widgetSequence">
361 344
	<form action="/" method="post" id="widgetSequence_form" name="widgetForm">
362 345
		<input type="hidden" name="sequence" value="" />

Also available in: Unified diff