[hg] galaxy 1663: Fix for showing deleted datasets in a history, ...
details: http://www.bx.psu.edu/hg/galaxy/rev/0af3897ce585 changeset: 1663:0af3897ce585 user: Greg Von Kuster <greg@bx.psu.edu> date: Fri Dec 12 14:33:51 2008 -0500 description: Fix for showing deleted datasets in a history, also yet another fix for the new users report, users are now sorted descending by last login, as the report states. 4 file(s) affected in this change: lib/galaxy/webapps/reports/controllers/users.py lib/galaxy/webapps/reports/templates/users_last_access_date.mako templates/history/options.mako templates/root/history.mako diffs (73 lines): diff -r d53da5b089a8 -r 0af3897ce585 lib/galaxy/webapps/reports/controllers/users.py --- a/lib/galaxy/webapps/reports/controllers/users.py Fri Dec 12 12:12:59 2008 -0500 +++ b/lib/galaxy/webapps/reports/controllers/users.py Fri Dec 12 14:33:51 2008 -0500 @@ -1,6 +1,6 @@ from datetime import datetime, timedelta from time import strftime -import calendar +import calendar, operator from galaxy.webapps.reports.base.controller import * import galaxy.model from galaxy.model.orm import * @@ -112,6 +112,7 @@ else: # The user has never logged in users.append( ( user.email, "never logged in" ) ) + users = sorted( users, key=operator.itemgetter( 1 ), reverse=True ) return trans.fill_template( 'users_last_access_date.mako', users=users, not_logged_in_for_days=not_logged_in_for_days, diff -r d53da5b089a8 -r 0af3897ce585 lib/galaxy/webapps/reports/templates/users_last_access_date.mako --- a/lib/galaxy/webapps/reports/templates/users_last_access_date.mako Fri Dec 12 12:12:59 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/users_last_access_date.mako Fri Dec 12 14:33:51 2008 -0500 @@ -13,7 +13,12 @@ <td> <form method="post" controller="users" action="last_access_date"> <p> - Users that have not logged in to Galaxy for + %if users: + ${len( users ) } + %else: + 0 + %endif + users have not logged in to Galaxy for <input type="textfield" value="${not_logged_in_for_days}" size="3" name="not_logged_in_for_days"> days. <button name="action" value="not_logged_in_for_days">Go</button> </p> diff -r d53da5b089a8 -r 0af3897ce585 templates/history/options.mako --- a/templates/history/options.mako Fri Dec 12 12:12:59 2008 -0500 +++ b/templates/history/options.mako Fri Dec 12 14:33:51 2008 -0500 @@ -11,15 +11,15 @@ <ul> %if user: - <li><a href="${h.url_for( action='history_rename', id=history.id )}" target="galaxy_main">Rename</a> current history (stored as "${history.name}")</li> - <li><a href="${h.url_for( action='history_available')}" target="galaxy_main">List</a> previously stored histories</li> + <li><a href="${h.url_for( controller='root', action='history_rename', id=history.id )}" target="galaxy_main">Rename</a> current history (stored as "${history.name}")</li> + <li><a href="${h.url_for( controller='root', action='history_available')}" target="galaxy_main">List</a> previously stored histories</li> %if len( history.active_datasets ) > 0: - <li><a href="${h.url_for('/history_new')}">Create</a> a new empty history</li> + <li><a href="${h.url_for( controller='root', action='history_new' )}">Create</a> a new empty history</li> %endif <li><a href="${h.url_for( controller='workflow', action='build_from_current_history' )}">Construct workflow</a> from the current history</li> - <li><a href="${h.url_for( action='history_share' )}" target="galaxy_main">Share</a> current history</div> + <li><a href="${h.url_for( controller='root', action='history_share' )}" target="galaxy_main">Share</a> current history</div> %endif - <li><a href="${h.url_for( action='history', show_deleted=True)}" target="galaxy_history">Show deleted</a> datasets in history</li> - <li><a href="${h.url_for( action='history_delete', id=history.id )}" confirm="Are you sure you want to delete the current history?">Delete</a> current history</div> + <li><a href="${h.url_for( controller='root', action='history', show_deleted=True)}" target="galaxy_history">Show deleted</a> datasets in history</li> + <li><a href="${h.url_for( controller='root', action='history_delete', id=history.id )}" confirm="Are you sure you want to delete the current history?">Delete</a> current history</div> </ul> diff -r d53da5b089a8 -r 0af3897ce585 templates/root/history.mako --- a/templates/root/history.mako Fri Dec 12 12:12:59 2008 -0500 +++ b/templates/root/history.mako Fri Dec 12 14:33:51 2008 -0500 @@ -248,7 +248,7 @@ <%namespace file="history_common.mako" import="render_dataset" /> -%if ( show_deleted and len( history.datasets ) < 1 ) or len( history.active_datasets ) < 1: +%if ( show_deleted and not history.activatable_datasets ) or ( not show_deleted and not history.active_datasets ): <div class="infomessagesmall" id="emptyHistoryMessage"> %else: <%
participants (1)
-
Greg Von Kuster