'widgets:add:description' => "Click on any widget button below to add it to your page.",
'widgets:position:fixed' => '(Fixed position on page)',
'widget:unavailable' => 'You have already added this widget',
+ 'widget:numbertodisplay' => 'Number of items to display',
'widget:delete' => 'Remove %s',
'widget:edit' => 'Customize this widget',
'adduser:ok' => "You have successfully added a new user.",
'adduser:bad' => "The new user could not be created.",
- 'item:object:reported_content' => "Reported items",
-
'user:set:name' => "Account name settings",
'user:name:label' => "My display name",
'user:name:success' => "Successfully changed your name on the system.",
'admin:widget:online_users:help' => 'Lists the users currently on the site',
'admin:widget:new_users' => 'New users',
'admin:widget:new_users:help' => 'Lists the newest users',
- 'admin:widget:content_stats' => 'Content Statistics',
+ 'admin:widget:content_stats' => 'Content statistics',
'admin:widget:content_stats:help' => 'Keep track of the content created by your users',
+ 'widget:content_stats:type' => 'Content type',
+ 'widget:content_stats:number' => 'Number',
/**
* Plugins
text-shadow:0 -1px 0 #999999;
}
-/* ECML */
-.ecml_admin_table {
- width:100%;
-}
-.ecml_admin_table td, th {
- border: 1px solid gray;
- text-align: center;
- padding: 5px;
-}
-.ecml_admin_table th, .ecml_keyword_desc {
- font-weight: bold;
-}
-.ecml_row_odd {
- background-color: #EEE;
-}
-.ecml_row_even {
-
-}
-.ecml_restricted {
- color: #555;
-}
-
.admin_plugin_reorder {
float:right;
width:200px;
* Content stats widget
*/
-$max = 5;
+$max = $vars['entity']->num_display;
$entity_stats = get_entity_statistics();
$object_stats = $entity_stats['object'];
arsort($object_stats);
$object_stats = array_slice($object_stats, 0, $max);
-echo '<table class="elgg-table">';
+echo '<table class="elgg-table-alt">';
+echo '<tr><th>' . elgg_echo('widget:content_stats:type') . '</th>';
+echo '<th>' . elgg_echo('widget:content_stats:number') . '</th></tr>';
foreach ($object_stats as $subtype => $num) {
$name = elgg_echo("item:object:$subtype");
echo "<tr><td>$name</td><td>$num</td></tr>";
}
echo '</table>';
+
+echo elgg_view('output/url', array(
+ 'href' => 'pg/admin/statistics/overview',
+ 'text' => 'more',
+));
--- /dev/null
+<?php
+/**
+ * Content statistics widget edit view
+ */
+
+
+// set default value
+if (!isset($vars['entity']->num_display)) {
+ $vars['entity']->num_display = 8;
+}
+
+$params = array(
+ 'internalname' => 'params[num_display]',
+ 'value' => $vars['entity']->num_display,
+ 'options' => array(5, 8, 10, 12, 15, 20),
+);
+$dropdown = elgg_view('input/pulldown', $params);
+
+?>
+<p>
+ <?php echo elgg_echo('widget:numbertodisplay'); ?>:
+ <?php echo $dropdown; ?>
+</p>
<?php
-
/**
- * Elgg Friends
* Friend widget options
*
- * @package ElggFriends
- * @subpackage Core
*/
-$selections = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 30, 50, 100);
-$icon_sizes = array('small', 'tiny');
-
-// set defaults
+// set default value for display number
if (!isset($vars['entity']->num_display)) {
$vars['entity']->num_display = 12;
- $vars['entity']->icon_size = 'small';
}
+$params = array(
+ 'internalname' => 'params[num_display]',
+ 'value' => $vars['entity']->num_display,
+ 'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 30, 50, 100),
+);
+$display_dropdown = elgg_view('input/pulldown', $params);
+
+
// handle upgrade to 1.7.2 from previous versions
if ($vars['entity']->icon_size == 1) {
$vars['entity']->icon_size = 'small';
} elseif ($vars['entity']->icon_size == 2) {
$vars['entity']->icon_size = 'tiny';
}
-?>
-<p>
- <?php echo elgg_echo("friends:num_display"); ?>:
- <select name="params[num_display]">
-<?php
-foreach ($selections as $selection) {
- $selected = '';
- if ($vars['entity']->num_display == $selection) {
- $selected = 'selected="selected"';
- }
- echo "<option value=\"$selection\" $selected>$selection</option>";
+// set default value for icon size
+if (!isset($vars['entity']->icon_size)) {
+ $vars['entity']->icon_size = 'small';
}
+
+$params = array(
+ 'internalname' => 'params[icon_size]',
+ 'value' => $vars['entity']->icon_size,
+ 'options_values' => array(
+ 'small' => elgg_echo('friends:small'),
+ 'tiny' => elgg_echo('friends:tiny'),
+ ),
+);
+$size_dropdown = elgg_view('input/pulldown', $params);
+
+
?>
- </select>
+<p>
+ <?php echo elgg_echo('friends:num_display'); ?>:
+ <?php echo $display_dropdown; ?>
</p>
<p>
- <?php echo elgg_echo("friends:icon_size"); ?>
- <select name="params[icon_size]">
-<?php
-foreach ($icon_sizes as $size) {
- $selected = '';
- if ($vars['entity']->icon_size == $size) {
- $selected = 'selected="selected"';
- }
- $label = elgg_echo("friends:$size");
- echo "<option value=\"$size\" $selected>$label</option>";
-}
-?>
- </select>
+ <?php echo elgg_echo('friends:icon_size'); ?>:
+ <?php echo $size_dropdown; ?>
</p>
--- /dev/null
+<?php
+/**
+ * New users widget edit view
+ */
+
+
+// set default value
+if (!isset($vars['entity']->num_display)) {
+ $vars['entity']->num_display = 5;
+}
+
+$params = array(
+ 'internalname' => 'params[num_display]',
+ 'value' => $vars['entity']->num_display,
+ 'options' => array(5, 8, 10, 12, 15, 20),
+);
+$dropdown = elgg_view('input/pulldown', $params);
+
+?>
+<p>
+ <?php echo elgg_echo('widget:numbertodisplay'); ?>:
+ <?php echo $dropdown; ?>
+</p>
--- /dev/null
+<?php
+/**
+ * Online users widget edit view
+ */
+
+// set default value
+if (!isset($vars['entity']->num_display)) {
+ $vars['entity']->num_display = 8;
+}
+
+$params = array(
+ 'internalname' => 'params[num_display]',
+ 'value' => $vars['entity']->num_display,
+ 'options' => array(5, 8, 10, 12, 15, 20),
+);
+$dropdown = elgg_view('input/pulldown', $params);
+
+?>
+<p>
+ <?php echo elgg_echo('widget:numbertodisplay'); ?>:
+ <?php echo $dropdown; ?>
+</p>