Author: dom Date: 2006-09-11 18:26:57 +0100 (Mon, 11 Sep 2006) New Revision: 853
Modified: trunk/Changes trunk/lib/OpenGuides.pm trunk/templates/admin_home.tt Log: Temporary fix to make admin page not blow up on large guides: only list 100 most recently modified nodes.
Modified: trunk/Changes =================================================================== --- trunk/Changes 2006-09-11 07:55:40 UTC (rev 852) +++ trunk/Changes 2006-09-11 17:26:57 UTC (rev 853) @@ -4,6 +4,8 @@ Admin interface Nodes missing metadata interface Moderation support (based on Wiki::Toolkit moderation) + Please note: the above three functions should be considered unstable, + and may change over future releases. Four new config file options: moderation_requires_password, enable_node_image, enable_common_categories, enable_common_locales Search::InvertedIndex support is deprecated as of this release.
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2006-09-11 07:55:40 UTC (rev 852) +++ trunk/lib/OpenGuides.pm 2006-09-11 17:26:57 UTC (rev 853) @@ -1424,11 +1424,9 @@ my $formatter = $self->wiki->formatter; my $script_name = $self->config->script_name;
- # Grab all the nodes - my @all_nodes = $wiki->list_all_nodes(with_details=>1); - @all_nodes = sort { $a->{'name'} cmp $b->{'name'} } @all_nodes; + # Grab all the recent nodes + my @all_nodes = $wiki->list_recent_changes(last_n_changes => 100);
- # Split into nodes, Locales and Categories my @nodes; my @categories;
Modified: trunk/templates/admin_home.tt =================================================================== --- trunk/templates/admin_home.tt 2006-09-11 07:55:40 UTC (rev 852) +++ trunk/templates/admin_home.tt 2006-09-11 17:26:57 UTC (rev 853) @@ -9,20 +9,23 @@ [% END %] <h2>Site Administration</h2> <ul> - <li><a href="#nodes">Nodes</a></li> - <li><a href="#locales">Locales</a></li> - <li><a href="#categories">Categories</a></li> + <li><a href="#nodes">Recent nodes</a></li> + <li><a href="#locales">Recent locales</a></li> + <li><a href="#categories">Recent categories</a></li> <li><a href="[% cgi_url %]?action=show_needing_moderation">Pages needing moderation</a> <li><a href="[% cgi_url %]?action=show_missing_metadata">Pages missing metadata</a> </ul>
+<p>The lists below show the 100 most recently modified nodes.</p> + <a name="nodes"></a> <table id="nodes"> -<tr><th>Node name</th><th>Current Version</th><th>Moderation</th><th>Actions</th></tr> +<tr><th>Node name</th><th>Current Version</th><th>Last modified</th><th>Moderation</th><th>Actions</th></tr> [% FOREACH node = nodes %] <tr> <td class="admin_name"><a href="[% node.view_url %]">[% node.name %]</a></td> <td class="admin_version">[% node.version %]</td> + <td class="admin_lastmode">[% node.last_modified %]</td> <td class="admin_moderate">[% IF node.moderate %]yes[% ELSE %]no[% END %]</td> <td class="admin_action"> <a href="[% node.versions_url %]">View all versions</a> or @@ -36,11 +39,12 @@
<a name="locales"></a> <table id="locales"> -<tr><th>Locale name</th><th>Current Version</th><th>Moderation</th><th>Actions</th></tr> +<tr><th>Locale name</th><th>Current Version</th><th>Last modified</th><th>Moderation</th><th>Actions</th></tr> [% FOREACH locale = locales %] <tr> <td class="admin_name"><a href="[% locale.view_url %]">[% locale.name %]</a></td> <td class="admin_version">[% locale.version %]</td> + <td class="admin_lastmode">[% locale.last_modified %]</td> <td class="admin_moderate">[% IF node.moderate %]yes[% ELSE %]no[% END %]</td> <td class="admin_action"> <a href="[% locale.versions_url %]">View all versions</a> or @@ -54,11 +58,12 @@
<a name="categories"></a> <table id="categories"> -<tr><th>Category name</th><th>Current Version</th><th>Moderation</th><th>Actions</th></tr> +<tr><th>Category name</th><th>Current Version</th><th>Last modified</th><th>Moderation</th><th>Actions</th></tr> [% FOREACH cat = categories %] <tr> <td class="admin_name"><a href="[% cat.view_url %]">[% cat.name %]</a></td> <td class="admin_version">[% cat.version %]</td> + <td class="admin_lastmode">[% cat.last_modified %]</td> <td class="admin_moderate">[% IF node.moderate %]yes[% ELSE %]no[% END %]</td> <td class="admin_action"> <a href="[% cat.versions_url %]">View all versions</a> or
openguides-commits@lists.openguides.org