diff --git a/LICENSE.txt b/LICENSE.txt index 69978e57efb..23e45c00eae 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -17,4 +17,9 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Some icons found in Galaxy are from the Silk Icons set, available under +the Creative Commons Attribution 2.5 License, from: + +http://www.famfamfam.com/lab/icons/silk/ diff --git a/cron/parse_builds.py b/cron/parse_builds.py index 4afd94d8167..19c1206164e 100644 --- a/cron/parse_builds.py +++ b/cron/parse_builds.py @@ -8,8 +8,12 @@ build description import sys import urllib -import pkg_resources; pkg_resources.require( "elementtree" ) -from elementtree import ElementTree +if sys.version_info[:2] >= ( 2, 5 ): + import xml.etree.ElementTree as ElementTree +else: + from galaxy import eggs + import pkg_resources; pkg_resources.require( "elementtree" ) + from elementtree import ElementTree URL = "http://genome-test.cse.ucsc.edu/cgi-bin/das/dsn" diff --git a/cron/parse_builds_3_sites.py b/cron/parse_builds_3_sites.py index fba60015420..a7bef94667d 100644 --- a/cron/parse_builds_3_sites.py +++ b/cron/parse_builds_3_sites.py @@ -5,8 +5,12 @@ Connects to sites and determines which builds are available at each. import sys import urllib -import pkg_resources; pkg_resources.require( "elementtree" ) -from elementtree import ElementTree +if sys.version_info[:2] >= ( 2, 5 ): + import xml.etree.ElementTree as ElementTree +else: + from galaxy import eggs + import pkg_resources; pkg_resources.require( "elementtree" ) + from elementtree import ElementTree sites = ['http://genome.ucsc.edu/cgi-bin/', 'http://archaea.ucsc.edu/cgi-bin/', diff --git a/cron/updateucsc.sh.sample b/cron/updateucsc.sh.sample index ff4350bbf43..31630248517 100644 --- a/cron/updateucsc.sh.sample +++ b/cron/updateucsc.sh.sample @@ -6,7 +6,7 @@ # Edit this line to refer to galaxy's path: GALAXY=/galaxy/path -export PYTHONPATH=${GALAXY}/modules:${GALAXY}/eggs:${GALAXY}/lib +export PYTHONPATH=${GALAXY}/lib # setup directories mkdir ${GALAXY}/tool-data/shared/ucsc/new @@ -57,4 +57,4 @@ then echo "Manual addition was successful." else echo "Manual addition failed" >&2 -fi \ No newline at end of file +fi diff --git a/datatypes_conf.xml.sample b/datatypes_conf.xml.sample index 3bb5997181e..431d9da7c95 100644 --- a/datatypes_conf.xml.sample +++ b/datatypes_conf.xml.sample @@ -141,6 +141,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + both are always True (is sqlite actually + # storing a string here, which is always true when not empty?) + app.model.session.execute( "ALTER TABLE 'galaxy_user' ADD COLUMN 'deleted' BOOLEAN default 0" ) + except sqlalchemy.exceptions.OperationalError, e: + print_warning( "adding column 'deleted' failed: %s" % ( e ) ) + try: + app.model.session.execute( "ALTER TABLE 'galaxy_user' ADD COLUMN 'purged' BOOLEAN default 0" ) + except sqlalchemy.exceptions.OperationalError, e: + print_warning( "adding column 'purged' failed: %s" % ( e ) ) + else: + try: + app.model.session.execute( "ALTER TABLE galaxy_user ADD COLUMN deleted BOOLEAN default false" ) + except ( sqlalchemy.exceptions.ProgrammingError, sqlalchemy.exceptions.OperationalError ), e: + # Postgres and MySQL raise different Exceptions for this same failure. + print_warning( "adding column 'deleted' failed: %s" % ( e ) ) + try: + app.model.session.execute( "ALTER TABLE galaxy_user ADD COLUMN purged BOOLEAN default false" ) + except ( sqlalchemy.exceptions.ProgrammingError, sqlalchemy.exceptions.OperationalError ), e: + print_warning( "adding column 'purged' failed: %s" % ( e ) ) + + # history_dataset_association table - these alters are the same, regardless if we are using sqlite + try: + app.model.session.execute( "ALTER TABLE history_dataset_association ADD COLUMN copied_from_library_folder_dataset_association_id INTEGER" ) + except ( sqlalchemy.exceptions.ProgrammingError, sqlalchemy.exceptions.OperationalError ), e: + print_warning( "adding column 'copied_from_library_folder_dataset_association_id' failed: %s" % ( e ) ) + + # metadata_file table + try: + app.model.session.execute( "ALTER TABLE metadata_file ADD COLUMN lda_id INTEGER" ) + except ( sqlalchemy.exceptions.ProgrammingError, sqlalchemy.exceptions.OperationalError ), e: + print_warning( "adding column 'lda_id' failed: %s" % ( e ) ) + + + # Create indexes for new columns in the galaxy_user and metadata_file tables + try: + i = sqlalchemy.Index( 'ix_galaxy_user_deleted', app.model.User.table.c.deleted ) + i.create() + except Exception, e: + print_warning( "Adding index failed: %s" % ( e ) ) + try: + i = sqlalchemy.Index( 'ix_galaxy_user_purged', app.model.User.table.c.purged ) + i.create() + except Exception, e: + print_warning( "Adding index failed: %s" % ( e ) ) + try: + i = sqlalchemy.Index( 'ix_metadata_file_lda_id', app.model.MetadataFile.table.c.lda_id ) + i.create() + except Exception, e: + print_warning( "Adding index failed: %s" % ( e ) ) + + + # Shutdown the app + app.shutdown() + del app + print + print "Columns added to tables, restarting app, with database_create_tables=True" + + # Restart the app, this time with create_tables == True + configuration['database_create_tables'] = True + app = galaxy.app.UniverseApplication( global_conf = ini_file, **configuration ) + + # Add foreign key constraints as necessary for new columns added above + print "Adding foreign key constraints" + if dialect != "sqlite": + try: + app.model.session.execute( "ALTER TABLE history_dataset_association ADD FOREIGN KEY (copied_from_library_folder_dataset_association_id) REFERENCES library_folder_dataset_association(id)" ) + except Exception, e: + print_warning( "Adding foreign key constraint to table has failed for an unknown reason: %s" % ( e ) ) + try: + app.model.session.execute( "ALTER TABLE metadata_file ADD FOREIGN KEY (lda_id) REFERENCES library_folder_dataset_association(id)" ) + except Exception, e: + print_warning( "Adding foreign key constraint to table has failed for an unknown reason: %s" % ( e ) ) + + else: + # SQLite ignores ( but parses on initial table creation ) foreign key constraints anyway + # See: http://www.sqlite.org/omitted.html (there is some way to set up behavior using triggers) + print_warning( "Adding foreign key constraints to table is not supported in SQLite." ) + + print "creating private roles and setting defaults for existing users and their histories and datasets" + security_agent = app.security_agent + # For each user: + # 1. make sure they have a private role + # 2. set DefaultUserPermissions + # 3. set DefaultHisstoryPermissions on existing histories + # 4. set ActionDatasetRoleAssociations on each history's activatable_datasets + default_user_action = security_agent.permitted_actions.DATASET_MANAGE_PERMISSIONS.action + + for user in app.model.User.query().all(): + print + print "################" + print "Setting up user %s." % user.email + private_role = security_agent.get_private_user_role( user ) + if not private_role: + security_agent.create_private_user_role( user ) + print "Created private role for %s" % user.email + else: + print_warning( "%s already has a private role, re-setting defaults anyway" % user.email ) + print "Setting DefaultUserPermissions for user %s" % user.email + # Delete all of the current default permissions for the user + for dup in user.default_permissions: + dup.delete() + dup.flush() + # Add the new default permissions for the user + dup = app.model.DefaultUserPermissions( user, default_user_action, private_role ) + dup.flush() + # Set DefaultHistoryPermissions on all of the user's active histories and associated datasets + # TODO: fix mapping for history.activatable_datasets so it doesn't throw an exception on the + # following query when eagerloading activatable_datasets. Fix all of the queries below that + # call history.active_datasets to be history.activatable_datasets when this works. + histories = app.model.History.filter( and_( app.model.History.table.c.user_id==user.id, + app.model.History.table.c.purged==False ) ) \ + .options( eagerload( 'active_datasets' ) ).all() + print "Setting DefaultHistoryPermissions for %d un-purged histories associated with %s" % ( len( histories ), user.email ) + for history in histories: + # Delete all of the current default permissions for the history + for dhp in history.default_permissions: + dhp.delete() + dhp.flush() + # Add the new default permissions for the history + dhp = app.model.DefaultHistoryPermissions( history, default_user_action, private_role ) + dhp.flush() + print "Setting ActionDatasetRoleAssociations for %d un-purged datasets in history %d" % ( len( history.active_datasets ), history.id ) + # Set the permissions on the current history's datasets that are not purged + for hda in history.active_datasets: + dataset = hda.dataset + if dataset.library_associations: + # Don't change permissions on a dataset associated with a library + continue + if [ assoc for assoc in dataset.history_associations if assoc.history not in user.histories ]: + # Don't change permissions on a dataset associated with a history not owned by the user + continue + # Delete all of the current permissions on the dataset + for adra in dataset.actions: + adra.delete() + adra.flush() + # Add the new permissions on the dataset + adra = app.model.ActionDatasetRoleAssociation( default_user_action, dataset, private_role ) + adra.flush() + app.shutdown() + print + print "Update finished, please review output for warnings and errors." + empty_xml.close() #close tempfile, it will automatically be deleted off system + + +if __name__ == "__main__": + main() diff --git a/scripts/update_database/update_database_with_security_libraries.sh b/scripts/update_database/update_database_with_security_libraries.sh new file mode 100644 index 00000000000..65013437651 --- /dev/null +++ b/scripts/update_database/update_database_with_security_libraries.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# This script must be executed from the $UNIVERSE_HOME directory +# e.g., sh ./scripts/update_database/update_database_with_security_libraries.sh + +. ./scripts/get_python.sh +. ./setup_paths.sh + +$GALAXY_PYTHON ./scripts/update_database/update_database_with_security_libraries.py ./universe_wsgi.ini $@ diff --git a/static/images/silk/book.png b/static/images/silk/book.png new file mode 100644 index 00000000000..b0f4dd7928c Binary files /dev/null and b/static/images/silk/book.png differ diff --git a/static/images/silk/book_open.png b/static/images/silk/book_open.png new file mode 100644 index 00000000000..7d863f94974 Binary files /dev/null and b/static/images/silk/book_open.png differ diff --git a/static/images/silk/folder.png b/static/images/silk/folder.png new file mode 100644 index 00000000000..784e8fa4823 Binary files /dev/null and b/static/images/silk/folder.png differ diff --git a/static/images/silk/folder_page.png b/static/images/silk/folder_page.png new file mode 100644 index 00000000000..1ef6e11438f Binary files /dev/null and b/static/images/silk/folder_page.png differ diff --git a/static/images/silk/resultset_bottom.png b/static/images/silk/resultset_bottom.png new file mode 100644 index 00000000000..22848b0061c Binary files /dev/null and b/static/images/silk/resultset_bottom.png differ diff --git a/static/images/silk/resultset_next.png b/static/images/silk/resultset_next.png new file mode 100644 index 00000000000..e252606d3e6 Binary files /dev/null and b/static/images/silk/resultset_next.png differ diff --git a/static/images/welcomePhoto.jpg b/static/images/welcomePhoto.jpg index 91abdf31496..33fc6a470df 100644 Binary files a/static/images/welcomePhoto.jpg and b/static/images/welcomePhoto.jpg differ diff --git a/static/june_2007_style/base.css.tmpl b/static/june_2007_style/base.css.tmpl index a8fba0e69c0..fc06c2008ff 100644 --- a/static/june_2007_style/base.css.tmpl +++ b/static/june_2007_style/base.css.tmpl @@ -142,6 +142,7 @@ div.form-row label select, input, textarea { + font: inherit; font-size: 115%; } @@ -152,7 +153,7 @@ select, textarea, input[type="text"], input[type="file"] /* Messages */ -.errormessage, .warningmessage, .donemessage, .infomessage, .welcomeBlue, .welcomeRed +.errormessage, .warningmessage, .donemessage, .infomessage, .welcomeBlue, .welcomeRed , .screencastBox, .yellowbox, .redbox, .bluebox, .greenbox { padding: 10px; padding-left: 52px; @@ -201,6 +202,85 @@ select, textarea, input[type="text"], input[type="file"] background-image: none; } +.screencastBox +{ + padding-left: 10px; + border-color: #AAAA66; + background-color: #FFFFCC; + background-image: none; +} + +.redbox +{ + border: none; + padding: 10px; + border-color: #000000; + background-color: #FF6666; + background-image: none; + border-right-width: 1px; + border-right-style: dotted; + border-bottom-width: 1px; + border-bottom-style: dotted; + margin-top: 5px; + min-height: 32px; + +} + +.yellowbox +{ + border: none; + padding: 10px; + border-color: #000000; + background-color: #FFCC00; + background-image: none; + border-right-width: 1px; + border-right-style: dotted; + border-bottom-width: 1px; + border-bottom-style: dotted; + margin-top: 5px; + min-height: 32px; +} + +.bluebox +{ + border: none; + padding: 10px; + border-color: #000000; + background-color: #6666FF; + background-image: none; + border-right-width: 1px; + border-right-style: dotted; + border-bottom-width: 1px; + border-bottom-style: dotted; + margin-top: 5px; + color: #FFFFFF; + min-height: 32px; +} + +.greenbox +{ + border: none; + padding: 10px; + border-color: #000000; + background-color: #00CC00; + background-image: none; + border-right-width: 1px; + border-right-style: dotted; + border-bottom-width: 1px; + border-bottom-style: dotted; + margin-top: 5px; + min-height: 32px; +} + +.redbox li, .yellowbox li, .bluebox li, .greenbox li { + list-style: disc; + text-transform: none; + list-style-position: inside; + list-style-image: none; + margin: 3px; +} + + .errormessagesmall, .warningmessagesmall, .donemessagesmall, .infomessagesmall { padding: 5px; @@ -283,6 +363,11 @@ table.colored tr background: $table_row_bg; } +table.colored tr.odd_row +{ + background: $odd_row_bg; +} + div.debug { margin: 10px; @@ -350,6 +435,40 @@ ul.toolParameterExpandableCollapsable list-style: none; } +ul.manage-table-actions { + float: right; + margin-top: -2.5em; +} +ul.manage-table-actions li { + display: block; + float: left; + margin-left: 0.5em; +} + +## State colors + +.state-color-queued { + border-color: $history_queued_border; + background: $history_queued_bg; +} + +.state-color-ok { + border-color: $history_ok_border; + background: $history_ok_bg; +} + +.state-color-error { + border-color: $history_error_border; + background: $history_error_bg; +} + +.state-color-running { + border-color: $history_running_border; + background: $history_running_bg; +} + +## Button styles + .action-button { background: #eeeeee; color: #333; @@ -365,6 +484,9 @@ ul.toolParameterExpandableCollapsable -moz-border-radius: 0.5em; -webkit-border-radius: 0.5em; border-radius: 0.5em; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; } .action-button > * { @@ -373,13 +495,15 @@ ul.toolParameterExpandableCollapsable .action-button:hover { color: black; - background: #aaaaaa; + background: #dddddd; } .action-button:active { color: white; background: #aaaaaa; } +## Popup menu styles + div.popupmenu { display: none; background: #eeeeee; @@ -394,6 +518,9 @@ div.popupmenu { -moz-border-radius: 0.5em; -webkit-border-radius: 0.5em; border-radius: 0.5em; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; } div.popupmenu-item { @@ -416,4 +543,40 @@ div.popupmenu-item:hover { .popup-arrow:hover { color: black; +} + +div.permissionContainer { + padding-left: 20px; +} + +## Data grid style + +.grid { + padding-top: 1em; + border-collapse: collapse; + width: 100%; +} +.grid tbody td { + border-top: solid #DDDDDD 1px; + border-bottom: solid #DDDDDD 1px; + padding: 0.5em 1em; +} +.grid thead th { + background: $table_header_bg; + background-image: url(form_title_bg.png); + background-repeat: repeat-x; + background-position: top; + border-top: solid $table_border 1px; + border-bottom: solid $table_border 1px; + padding: 0.5em 1em; + text-align: left; +} +.grid tfoot td { + background-color: #F8F8F8; + border-top: solid #DDDDDD 1px; + border-bottom: solid #DDDDDD 1px; + padding: 0.5em 1em; +} +.grid .current { + background-color: #EEEEFF; } \ No newline at end of file diff --git a/static/june_2007_style/blue/base.css b/static/june_2007_style/blue/base.css index 4de4530b076..2962cfb40b2 100644 --- a/static/june_2007_style/blue/base.css +++ b/static/june_2007_style/blue/base.css @@ -16,6 +16,7 @@ img border: 0; } + a:link, a:visited, a:active { color: #303030; @@ -141,6 +142,7 @@ div.form-row label select, input, textarea { + font: inherit; font-size: 115%; } @@ -151,7 +153,7 @@ select, textarea, input[type="text"], input[type="file"] /* Messages */ -.errormessage, .warningmessage, .donemessage, .infomessage, .welcomeBlue, .welcomeRed +.errormessage, .warningmessage, .donemessage, .infomessage, .welcomeBlue, .welcomeRed , .screencastBox, .yellowbox, .redbox, .bluebox, .greenbox { padding: 10px; padding-left: 52px; @@ -200,6 +202,85 @@ select, textarea, input[type="text"], input[type="file"] background-image: none; } +.screencastBox +{ + padding-left: 10px; + border-color: #AAAA66; + background-color: #FFFFCC; + background-image: none; +} + +.redbox +{ + border: none; + padding: 10px; + border-color: #000000; + background-color: #FF6666; + background-image: none; + border-right-width: 1px; + border-right-style: dotted; + border-bottom-width: 1px; + border-bottom-style: dotted; + margin-top: 5px; + min-height: 32px; + +} + +.yellowbox +{ + border: none; + padding: 10px; + border-color: #000000; + background-color: #FFCC00; + background-image: none; + border-right-width: 1px; + border-right-style: dotted; + border-bottom-width: 1px; + border-bottom-style: dotted; + margin-top: 5px; + min-height: 32px; +} + +.bluebox +{ + border: none; + padding: 10px; + border-color: #000000; + background-color: #6666FF; + background-image: none; + border-right-width: 1px; + border-right-style: dotted; + border-bottom-width: 1px; + border-bottom-style: dotted; + margin-top: 5px; + color: #FFFFFF; + min-height: 32px; +} + +.greenbox +{ + border: none; + padding: 10px; + border-color: #000000; + background-color: #00CC00; + background-image: none; + border-right-width: 1px; + border-right-style: dotted; + border-bottom-width: 1px; + border-bottom-style: dotted; + margin-top: 5px; + min-height: 32px; +} + +.redbox li, .yellowbox li, .bluebox li, .greenbox li { + list-style: disc; + text-transform: none; + list-style-position: inside; + list-style-image: none; + margin: 3px; +} + + .errormessagesmall, .warningmessagesmall, .donemessagesmall, .infomessagesmall { padding: 5px; @@ -282,6 +363,11 @@ table.colored tr background: white; } +table.colored tr.odd_row +{ + background: #DADFEF; +} + div.debug { margin: 10px; @@ -293,7 +379,7 @@ div.debug div.odd_row { - background: #FFFF99; + background: #DADFEF; } #footer { @@ -348,6 +434,38 @@ ul.toolParameterExpandableCollapsable list-style: none; } +ul.manage-table-actions { + float: right; + margin-top: -2.5em; +} +ul.manage-table-actions li { + display: block; + float: left; + margin-left: 0.5em; +} + + +.state-color-queued { + border-color: #888888; + background: #EEEEEE; +} + +.state-color-ok { + border-color: #66AA66; + background: #CCFFCC; +} + +.state-color-error { + border-color: #AA6666; + background: #FFCCCC; +} + +.state-color-running { + border-color: #AAAA66; + background: #FFFFCC; +} + + .action-button { background: #eeeeee; color: #333; @@ -363,6 +481,9 @@ ul.toolParameterExpandableCollapsable -moz-border-radius: 0.5em; -webkit-border-radius: 0.5em; border-radius: 0.5em; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; } .action-button > * { @@ -371,13 +492,14 @@ ul.toolParameterExpandableCollapsable .action-button:hover { color: black; - background: #aaaaaa; + background: #dddddd; } .action-button:active { color: white; background: #aaaaaa; } + div.popupmenu { display: none; background: #eeeeee; @@ -392,6 +514,9 @@ div.popupmenu { -moz-border-radius: 0.5em; -webkit-border-radius: 0.5em; border-radius: 0.5em; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; } div.popupmenu-item { @@ -414,4 +539,39 @@ div.popupmenu-item:hover { .popup-arrow:hover { color: black; +} + +div.permissionContainer { + padding-left: 20px; +} + + +.grid { + padding-top: 1em; + border-collapse: collapse; + width: 100%; +} +.grid tbody td { + border-top: solid #DDDDDD 1px; + border-bottom: solid #DDDDDD 1px; + padding: 0.5em 1em; +} +.grid thead th { + background: #ebd9b2; + background-image: url(form_title_bg.png); + background-repeat: repeat-x; + background-position: top; + border-top: solid #d8b365 1px; + border-bottom: solid #d8b365 1px; + padding: 0.5em 1em; + text-align: left; +} +.grid tfoot td { + background-color: #F8F8F8; + border-top: solid #DDDDDD 1px; + border-bottom: solid #DDDDDD 1px; + padding: 0.5em 1em; +} +.grid .current { + background-color: #EEEEFF; } \ No newline at end of file diff --git a/static/june_2007_style/blue/history.css b/static/june_2007_style/blue/history.css index 3a2243bf20d..1dd55a464cd 100644 --- a/static/june_2007_style/blue/history.css +++ b/static/june_2007_style/blue/history.css @@ -80,6 +80,13 @@ div.historyItem-running */ } +div.historyItem-noPermission +{ + filter: alpha(opacity=60); + -moz-opacity: .60; + opacity: .60; +} + div.historyItem-queued { } @@ -101,4 +108,4 @@ pre.peek th { color: white; background: #023858; -} \ No newline at end of file +} diff --git a/static/june_2007_style/blue/library.css b/static/june_2007_style/blue/library.css new file mode 100644 index 00000000000..6a3004ad548 --- /dev/null +++ b/static/june_2007_style/blue/library.css @@ -0,0 +1,71 @@ +.libraryRow { + background-color: #d2c099; +} + +.datasetHighlighted { + background-color: #C1C9E5; +} + +div.historyItemBody { + padding: 4px 4px 2px 4px; +} + +li.folderRow, +li.datasetRow +{ + border-top: solid 1px #ddd; +} + +li.folderRow:hover, +li.datasetRow:hover +{ + background-color: #C1C9E5; +} + +img.expanderIcon { + padding-right: 4px; +} + +input.datasetCheckbox, +li, ul +{ + padding: 0; + margin: 0; +} + +.rowTitle +{ + padding: 2px; +} + +ul { + list-style: none; +} + +.libraryTitle th { + text-align: left; +} + +pre.peek +{ + background: white; + color: black; + width: 100%; + overflow: auto; +} + +pre.peek th +{ + color: white; + background: #023858; +} + +a.expandLink { + text-decoration: none; +} + +span.expandLink { + width: 100%; + height: 100%; + display: block; +} diff --git a/static/june_2007_style/blue/masthead.css b/static/june_2007_style/blue/masthead.css index f206e7f1b44..b89faddb0a8 100644 --- a/static/june_2007_style/blue/masthead.css +++ b/static/june_2007_style/blue/masthead.css @@ -7,6 +7,7 @@ body margin: 3px; margin-right: 5px; margin-left: 5px; + overflow: hidden; } div.pageTitle @@ -24,3 +25,38 @@ a:link, a:visited, a:active { color: #eeeeee; } + +#tab-bar-bottom +{ + z-index: -1; + position:absolute; + top:27px; left: 0; + width: 100%; + height: 100%; + background: #222532; +} + +span.link-group +{ + margin: 0; + padding: 0; + display: inline; + padding-bottom: 10px; + margin-bottom: -10px; +} + +span.link-group span +{ + margin: 0; + padding: 0; + display: inline; +} + +span.link-group span.active-link +{ + background: #222532; + padding-left: 3px; padding-right: 3px; + margin-left: -3px; margin-right: -3px; + padding-bottom: 10px; + margin-bottom: -10px; +} \ No newline at end of file diff --git a/static/june_2007_style/blue/panel_layout.css b/static/june_2007_style/blue/panel_layout.css index b7ec445bc43..e48f52009af 100644 --- a/static/june_2007_style/blue/panel_layout.css +++ b/static/june_2007_style/blue/panel_layout.css @@ -45,6 +45,19 @@ body font-weight: bold; } +#messagebox +{ + position:absolute; + top:33px; + left:0; + width:100%; + height:24px !important; + overflow: hidden; + border-bottom: solid #999 1px; + font-size: 90%; +} + + #left, #left-border, #center, #right-border, #right { position: absolute; @@ -118,35 +131,9 @@ body right: 0px; z-index: 200; } -td.panel-header -{ - background: #f5f5f5; - background-image: url(panel_header_bg.png); - background-position: top center; - background-repeat: repeat-x; - padding: 0; - border-bottom: solid #999 1px; -} -div.panel-header -{ - margin: 0; - padding: 4px; - padding-right: 10px; - padding-left: 10px; - color: #333; - font-weight: bold; -} - -table.column-layout -{ - position: absolute; - width: 100%; - height: 100%; -} .unified-panel-header { height: 2em; - overflow: hidden; z-index: 1000; background: #cccccc; background-image: url(panel_header_bg.png); @@ -159,19 +146,21 @@ table.column-layout padding-left: 10px; color: #333; font-weight: bold; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; } - + .unified-panel-header-inner { padding-top: 0.45em; } - + .menu-bg { background: #C1C9E5 url(menu_bg.png) top repeat-x; } div.unified-panel-body { position: absolute; - z-index: 1; top: 2em; bottom: 0; width: 100%; @@ -197,50 +186,14 @@ div.unified-panel-body { color: black; background: #aaaaaa; } + .panel-header-button:active { color: white; background: #aaaaaa; } -div.popupmenu { - display: none; - background: #eee; - position: fixed; - z-index: 20000; - background: #cccccc; - background-image: url(panel_header_bg.png); - background-position: top center; - background-repeat: repeat-x; - border: solid #999 1px; - padding-top: 3px; - padding-bottom: 3px; -} - -div.popupmenu-top { - padding-bottom: 3px; -} -div.popupmenu-top-inner { - height: 10px; - width: 20px; - margin-top: -13px; - margin-left: auto; - margin-right: 20px; - background: url(popupmenu_callout_top.png); -} - -div.popupmenu-item { - padding: 3px; - padding-left: 10px; - padding-right: 10px; - cursor: pointer; -} - -div.popupmenu-item:hover { - background: #AAAAEE; -} - #overlay { - position: absolute; + position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 20000; } @@ -271,6 +224,34 @@ div.popupmenu-item:hover { padding: 5px; } -.dialog-box body { - overflow: scroll; + +.panel-error-message, .panel-warning-message, .panel-done-message, .panel-info-message +{ + height: 24px; + line-height: 24px; + color: #303030; + padding: 0px; + padding-left: 26px; + background-color: #FFCCCC; + background-image: url(error_small.png); + background-repeat: no-repeat; + background-position: 6px 50%; +} + +.panel-warning-message +{ + background-image: url(warn_small.png); + background-color: #FFFFCC; +} + +.panel-done-message +{ + background-image: url(done_small.png); + background-color: #CCFFCC; +} + +.panel-info-message +{ + background-image: url(info_small.png); + background-color: #CCCCFF; } \ No newline at end of file diff --git a/static/june_2007_style/blue_colors.ini b/static/june_2007_style/blue_colors.ini index 447ca3f98bc..5b9f320b296 100644 --- a/static/june_2007_style/blue_colors.ini +++ b/static/june_2007_style/blue_colors.ini @@ -15,7 +15,7 @@ form_border=#d8b365 #form_body_bg=#FFFFFF form_body_bg_top=#FFFFFF form_body_bg_bottom=#FFFFFF -odd_row_bg=#FFFF99 +odd_row_bg=#DADFEF # Messages error_message_border=#AA6666 error_message_bg=#FFCCCC @@ -48,6 +48,7 @@ masthead_bg=#2C3143 masthead_text=#eeeeee masthead_bg_hatch=- masthead_link=#eeeeee +masthead_active_tab_bg=#222532 # ---- Layout ----------------------------------------------------------------- # Overall background color (including space between panels) layout_bg=#eee diff --git a/static/june_2007_style/history.css.tmpl b/static/june_2007_style/history.css.tmpl index 30c285b20fb..362cc3a3b23 100644 --- a/static/june_2007_style/history.css.tmpl +++ b/static/june_2007_style/history.css.tmpl @@ -80,6 +80,13 @@ div.historyItem-running */ } +div.historyItem-noPermission +{ + filter: alpha(opacity=60); + -moz-opacity: .60; + opacity: .60; +} + div.historyItem-queued { } @@ -101,4 +108,4 @@ pre.peek th { color: white; background: $peek_table_header; -} \ No newline at end of file +} diff --git a/static/june_2007_style/library.css.tmpl b/static/june_2007_style/library.css.tmpl new file mode 100644 index 00000000000..75f8678a05c --- /dev/null +++ b/static/june_2007_style/library.css.tmpl @@ -0,0 +1,71 @@ +.libraryRow { + background-color: $form_title_bg_bottom; +} + +.datasetHighlighted { + background-color: $menu_bg_over; +} + +div.historyItemBody { + padding: 4px 4px 2px 4px; +} + +li.folderRow, +li.datasetRow +{ + border-top: solid 1px #ddd; +} + +li.folderRow:hover, +li.datasetRow:hover +{ + background-color: $menu_bg_over; +} + +img.expanderIcon { + padding-right: 4px; +} + +input.datasetCheckbox, +li, ul +{ + padding: 0; + margin: 0; +} + +.rowTitle +{ + padding: 2px; +} + +ul { + list-style: none; +} + +.libraryTitle th { + text-align: left; +} + +pre.peek +{ + background: white; + color: black; + width: 100%; + overflow: auto; +} + +pre.peek th +{ + color: white; + background: $peek_table_header; +} + +a.expandLink { + text-decoration: none; +} + +span.expandLink { + width: 100%; + height: 100%; + display: block; +} diff --git a/static/june_2007_style/make_style.py b/static/june_2007_style/make_style.py index f3d0c8a804d..5d62c7f1f56 100755 --- a/static/june_2007_style/make_style.py +++ b/static/june_2007_style/make_style.py @@ -1,7 +1,11 @@ #!/usr/bin/env python +#from galaxy import eggs +#import pkg_resources +#pkg_resources.require("Cheetah") + import sys, string, os.path -from galaxy import eggs +#from galaxy import eggs import pkg_resources pkg_resources.require( "Cheetah" ) @@ -18,8 +22,8 @@ def run( cmd ): templates = [ ( "base.css.tmpl", "base.css" ), ( "panel_layout.css.tmpl", "panel_layout.css" ), - ( "panel_layout_ie.css.tmpl", "panel_layout_ie.css" ), ( "masthead.css.tmpl", "masthead.css"), + ( "library.css.tmpl", "library.css"), ( "history.css.tmpl", "history.css" ), ( "tool_menu.css.tmpl", "tool_menu.css" ), ( "reset.css.tmpl", "reset.css" ) ] @@ -69,7 +73,8 @@ for line in open( vars ): for input, output in templates: print input ,"->", output open( os.path.join( out_dir, output ), "w" ).write( str( Template( file=input, searchList=[context] ) ) ) - + +""" for rule, output in images: t = string.Template( rule ).substitute( context ) print t, "->", output @@ -79,3 +84,4 @@ for src, bg, out in shared_images: t = "./png_over_color.py shared_images/%s %s %s" % ( src, context[bg], os.path.join( out_dir, out ) ) print t run( t.split() ) +""" diff --git a/static/june_2007_style/masthead.css.tmpl b/static/june_2007_style/masthead.css.tmpl index 0c759f2aba6..a6d3b7ea5c7 100644 --- a/static/june_2007_style/masthead.css.tmpl +++ b/static/june_2007_style/masthead.css.tmpl @@ -7,6 +7,7 @@ body margin: 3px; margin-right: 5px; margin-left: 5px; + overflow: hidden; } div.pageTitle @@ -24,3 +25,38 @@ a:link, a:visited, a:active { color: $masthead_link; } + +#tab-bar-bottom +{ + z-index: -1; + position:absolute; + top:27px; left: 0; + width: 100%; + height: 100%; + background: $masthead_active_tab_bg; +} + +span.link-group +{ + margin: 0; + padding: 0; + display: inline; + padding-bottom: 10px; + margin-bottom: -10px; +} + +span.link-group span +{ + margin: 0; + padding: 0; + display: inline; +} + +span.link-group span.active-link +{ + background: $masthead_active_tab_bg; + padding-left: 3px; padding-right: 3px; + margin-left: -3px; margin-right: -3px; + padding-bottom: 10px; + margin-bottom: -10px; +} \ No newline at end of file diff --git a/static/june_2007_style/panel_layout.css.tmpl b/static/june_2007_style/panel_layout.css.tmpl index 0479767977b..016b228a0e0 100644 --- a/static/june_2007_style/panel_layout.css.tmpl +++ b/static/june_2007_style/panel_layout.css.tmpl @@ -45,6 +45,19 @@ body font-weight: bold; } +#messagebox +{ + position:absolute; + top:33px; + left:0; + width:100%; + height:24px !important; + overflow: hidden; + border-bottom: solid #999 1px; + font-size: 90%; +} + + #left, #left-border, #center, #right-border, #right { position: absolute; @@ -118,31 +131,6 @@ body right: 0px; z-index: 200; } -td.panel-header -{ - background: ${panel_header_bg_top}; - background-image: url(panel_header_bg.png); - background-position: top center; - background-repeat: repeat-x; - padding: 0; - border-bottom: solid ${layout_border} 1px; -} -div.panel-header -{ - margin: 0; - padding: 4px; - padding-right: 10px; - padding-left: 10px; - color: #333; - font-weight: bold; -} - -table.column-layout -{ - position: absolute; - width: 100%; - height: 100%; -} .unified-panel-header { height: 2em; @@ -158,6 +146,9 @@ table.column-layout padding-left: 10px; color: #333; font-weight: bold; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; } .unified-panel-header-inner { @@ -201,43 +192,6 @@ div.unified-panel-body { background: #aaaaaa; } -div.popupmenu { - display: none; - background: #eee; - position: fixed; - z-index: 20000; - background: ${panel_header_bg_bottom}; - background-image: url(panel_header_bg.png); - background-position: top center; - background-repeat: repeat-x; - border: solid ${layout_border} 1px; - padding-top: 3px; - padding-bottom: 3px; -} - -div.popupmenu-top { - padding-bottom: 3px; -} -div.popupmenu-top-inner { - height: 10px; - width: 20px; - margin-top: -13px; - margin-left: auto; - margin-right: 20px; - background: url(popupmenu_callout_top.png); -} - -div.popupmenu-item { - padding: 3px; - padding-left: 10px; - padding-right: 10px; - cursor: pointer; -} - -div.popupmenu-item:hover { - background: ${layout_hover}; -} - #overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; @@ -268,4 +222,37 @@ div.popupmenu-item:hover { .dialog-box .body, .dialog-box .buttons { padding: 5px; +} + +## Messages for message box, slightly different style + +.panel-error-message, .panel-warning-message, .panel-done-message, .panel-info-message +{ + height: 24px; + line-height: 24px; + color: $base_text; + padding: 0px; + padding-left: 26px; + background-color: $error_message_bg; + background-image: url(error_small.png); + background-repeat: no-repeat; + background-position: 6px 50%; +} + +.panel-warning-message +{ + background-image: url(warn_small.png); + background-color: $warn_message_bg; +} + +.panel-done-message +{ + background-image: url(done_small.png); + background-color: $done_message_bg; +} + +.panel-info-message +{ + background-image: url(info_small.png); + background-color: $info_message_bg; } \ No newline at end of file diff --git a/static/scripts/galaxy.base.js b/static/scripts/galaxy.base.js index a14244dcac8..f343c31269a 100644 --- a/static/scripts/galaxy.base.js +++ b/static/scripts/galaxy.base.js @@ -1,3 +1,19 @@ +$.fn.makeAbsolute = function(rebase) { + return this.each(function() { + var el = $(this); + var pos = el.position(); + el.css({ + position: "absolute", + marginLeft: 0, marginTop: 0, + top: pos.top, left: pos.left, + right: $(window).width() - ( pos.left + el.width() ) + }); + if (rebase) { + el.remove().appendTo("body"); + } + }); +} + jQuery(document).ready( function() { // Links with confirmation jQuery( "a[@confirm]" ).click( function() { diff --git a/static/scripts/galaxy.panels.js b/static/scripts/galaxy.panels.js index 7463991fbf9..efe2ccb0a2a 100644 --- a/static/scripts/galaxy.panels.js +++ b/static/scripts/galaxy.panels.js @@ -79,7 +79,12 @@ function make_left_panel( panel_el, center_el, border_el ) { } } ).find( "div" ).show();; - + var force_panel = function( op ) { + if ( ( hidden && op == 'show' ) || ( ! hidden && op == 'hide' ) ) { + toggle(); + } + } + return { force_panel: force_panel }; }; function make_right_panel( panel_el, center_el, border_el ) { @@ -173,7 +178,12 @@ function make_right_panel( panel_el, center_el, border_el ) { } } ).find( "div" ).show(); - return { handle_minwidth_hint: handle_minwidth_hint }; + var force_panel = function( op ) { + if ( ( hidden && op == 'show' ) || ( ! hidden && op == 'hide' ) ) { + toggle(); + } + } + return { handle_minwidth_hint: handle_minwidth_hint, force_panel: force_panel }; }; // Modal dialog boxes @@ -234,4 +244,4 @@ function make_popupmenu( button_element, options ) { } ); }; $( button_element ).click( click ); -}; \ No newline at end of file +}; diff --git a/static/scripts/packed/galaxy.panels.js b/static/scripts/packed/galaxy.panels.js index 241d997a112..fd71a3f43d6 100644 --- a/static/scripts/packed/galaxy.panels.js +++ b/static/scripts/packed/galaxy.panels.js @@ -1 +1 @@ -var hidden_width=7;var border_tweak=9;var jq=jQuery;function ensure_dd_helper(){if(jq("#DD-helper").length==0){$("
").css({background:"white",opacity:0,zIndex:9000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function make_left_panel(E,A,B){var D=false;var C=null;resize=function(F){var G=F;if(F<0){F=0}jq(E).css("width",F);jq(B).css("left",G);jq(A).css("left",F+7);if(document.recalc){document.recalc()}};toggle=function(){if(D){jq(B).removeClass("hover");jq(B).animate({left:C},"fast");jq(E).css("left",-C).show().animate({left:0},"fast",function(){resize(C);jq(B).removeClass("hidden")});D=false}else{C=jq(B).position().left;jq(A).css("left",hidden_width);if(document.recalc){document.recalc()}jq(B).removeClass("hover");jq(E).animate({left:-C},"fast");jq(B).animate({left:-1},"fast",function(){jq(this).addClass("hidden")});D=true}};jq(B).hover(function(){jq(this).addClass("hover")},function(){jq(this).removeClass("hover")}).draggable({start:function(F,G){jq("#DD-helper").show()},stop:function(F,G){jq("#DD-helper").hide();return false},drag:function(F,G){x=G.position.left;x=Math.min(400,Math.max(100,x));if(D){jq(E).css("left",0);jq(B).removeClass("hidden");D=false}resize(x);G.position.left=x;G.position.top=$(this).data("draggable").originalPosition.top},click:function(){toggle()}}).find("div").show()}function make_right_panel(A,E,G){var I=false;var F=false;var C=null;var D=function(J){jq(A).css("width",J);jq(E).css("right",J+9);jq(G).css("right",J).css("left","");if(document.recalc){document.recalc()}};var H=function(){if(I){jq(G).removeClass("hover");jq(G).animate({right:C},"fast");jq(A).css("right",-C).show().animate({right:0},"fast",function(){D(C);jq(G).removeClass("hidden")});I=false}else{C=jq(document).width()-jq(G).position().left-border_tweak;jq(E).css("right",hidden_width+1);if(document.recalc){document.recalc()}jq(G).removeClass("hover");jq(A).animate({right:-C},"fast");jq(G).animate({right:-1},"fast",function(){jq(this).addClass("hidden")});I=true}F=false};var B=function(J){var K=jq(E).width()-(I?C:0);if(K").text(F).click(G));A.append(" ")});A.show()}else{A.hide()}var A=$(".dialog-box").find(".extra_buttons").html("");if(C){$.each(C,function(F,G){A.append($("
-
+

diff --git a/templates/dataset/edit_attributes.mako b/templates/dataset/edit_attributes.mako index 39936d24f4c..3a450ba83d3 100644 --- a/templates/dataset/edit_attributes.mako +++ b/templates/dataset/edit_attributes.mako @@ -1,146 +1,195 @@ <%inherit file="/base.mako"/> -<%def name="title()">History Item Attributes +<%def name="title()">Edit Dataset Attributes <%def name="datatype( dataset, datatypes )"> - + -
-
Edit Attributes
-
-
- -
- -
- -
-
-
-
- -
- -
-
-
- %for name, spec in data.metadata.spec.items(): - %if spec.visible: +<% + if isinstance( data, trans.app.model.HistoryDatasetAssociation ): + id_name = 'id' + elif isinstance( data, trans.app.model.LibraryFolderDatasetAssociation ): + id_name = 'lid' +%> + +%if ( id_name == 'id' or trans.app.security_agent.allow_action( trans.user, data.permitted_actions.DATASET_EDIT_METADATA, dataset = data ) ): +
+
Edit Attributes
+
+ +
- -
- ${data.metadata.get_html_by_name( name )} -
-
+ +
+ +
+
- %endif - %endfor -
- -
- -
- -
- -
-
- This will inspect the dataset and attempt to correct the above column values - if they are not accurate. -
-
- %if data.missing_meta(): -
Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.
- %endif -
-
- -

- - <% converters = data.get_converter_types() %> - %if len( converters ) > 0: -

-
Convert to new format
-
-
- -
- +
+ +
+ +
+
+
+ %for name, spec in data.metadata.spec.items(): + %if spec.visible: +
+ +
+ ${data.metadata.get_html_by_name( name )} +
+
+
+ %endif + %endfor +
+ +
+ +
+
- +
-
- This will create a new dataset with the contents of this - dataset converted to a new format. + This will inspect the dataset and attempt to correct the above column values if they are not accurate.
+
+ %if data.missing_meta(): +
Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.
+ %endif +
+
+

+ %if id_name == 'id': + <% converters = data.get_converter_types() %> + %if len( converters ) > 0: +

+
Convert to new format
+
+
+ +
+ +
+ +
+
+ This will create a new dataset with the contents of this dataset converted to a new format. +
+
+
+
+ +
+
+
+
+

+ %endif + %endif +

+
Change data type
+
+
+ +
+ +
+ ${datatype( data, datatypes )} +
+
+ This will change the datatype of the existing dataset + but not modify its contents. Use this if Galaxy + has incorrectly guessed the type of your dataset. +
+
+
+
+ +
+
+
+
+

+%else: +

+
View Attributes
+
+
+ Name: ${data.name}
-
-
- -
- -
-
- -

- %endif + Info: ${data.info} +

+ Data Format: ${data.ext} +
+ %for name, spec in data.metadata.spec.items(): + %if spec.visible: + ${spec.desc}: + %if spec.unwrap( spec.get( name ) ): + ${spec.unwrap( spec.get( name ) )} + %else: + ${spec.no_value} + %endif +
+ %endif + %endfor +
+
+
+

+%endif - -

-
Change data type
-
-
- -
- -
- ${datatype( data, datatypes )} +%if trans.app.security_agent.allow_action( trans.user, data.permitted_actions.DATASET_MANAGE_PERMISSIONS, dataset = data ): + <%namespace file="/dataset/security_common.mako" import="render_permission_form" /> + ${render_permission_form( data.dataset, data.name, h.url_for( action='edit' ), id_name, data.id, trans.user.all_roles() )} +%elif trans.user: +
+
View permissions
+
+
+ %if data.dataset.actions: +
    + %for action, roles in trans.app.security_agent.get_dataset_permissions( data.dataset ).items(): + %if roles: +
  • ${action.description}
  • +
      + %for role in roles: +
    • ${role.name}
    • + %endfor +
    + %endif + %endfor +
+ %else: +

This dataset is accessible by everyone (it is public).

+ %endif
- -
- This will change the datatype of the existing dataset - but not modify its contents. Use this if Galaxy - has incorrectly guessed the type of your dataset. -
-
-
-
- -
- -
-
- -

-

-
Copy History Item
-
- Click here to make a copy of this history item. -
-
-

+
+
+%endif diff --git a/templates/dataset/security_common.mako b/templates/dataset/security_common.mako new file mode 100644 index 00000000000..039a9a7ba6d --- /dev/null +++ b/templates/dataset/security_common.mako @@ -0,0 +1,87 @@ +<%def name="render_select( current_actions, action_key, action, all_roles )"> + <% + in_roles = [] + for a in current_actions: + if a.action == action.action: + in_roles.append( a.role ) + out_roles = filter( lambda x: x not in in_roles, all_roles ) + %> +

${action.description}

+
+
+ Roles associated:
+
+
+
+
+ Roles not associated:
+
+ +
+
+ + +<%def name="render_permission_form( obj, obj_name, form_url, id_name, id, all_roles )"> + <% + if isinstance( obj, trans.app.model.User ): + current_actions = obj.default_permissions + obj_str = 'user %s' % obj_name + elif isinstance( obj, trans.app.model.History ): + current_actions = obj.default_permissions + obj_str = 'history %s' % obj_name + elif isinstance( obj, trans.app.model.Dataset ): + current_actions = obj.actions + obj_str = obj_name + else: + current_actions = obj.dataset.actions + obj_str = 'unknown object %s' %obj_name + %> + +
+
Manage permissions and role associations for ${obj_str}
+
+
+ +
+ %for k, v in trans.app.model.Dataset.permitted_actions.items(): +
+ ${render_select( current_actions, k, v, all_roles )} +
+ %endfor +
+ +
+
+
+
+

+ diff --git a/templates/form.mako b/templates/form.mako index c003de02585..9fe2a413884 100644 --- a/templates/form.mako +++ b/templates/form.mako @@ -10,6 +10,10 @@ $(function(){ +%if header: + ${header} +%endif +

${form.title}
@@ -21,9 +25,11 @@ $(function(){ cls += " form-row-error" %>
+ %if input.use_label: + %endif
diff --git a/templates/history/list.mako b/templates/history/list.mako index a30e5c5f7c2..a5de3273c68 100644 --- a/templates/history/list.mako +++ b/templates/history/list.mako @@ -1,65 +1,201 @@ <%inherit file="/base.mako"/> <%def name="title()">Your saved histories -%if error_msg: -

-

${error_msg}
-
-

-%endif -%if ok_msg: -

-

${ok_msg}
-
-

+%if message: +

+

${message}
+
+

%endif -%if user.histories: -

Stored Histories

- %if show_deleted: - - %else: - - %endif -
- - - %for history in user.histories: - %if ( show_deleted and not history.purged ) or not( history.deleted ): - - - - - - +<%def name="javascripts()"> + ${parent.javascripts()} + + + +<%def name="stylesheets()"> + + + + + +

Stored Histories

+ + + + + %if show_deleted: + + %endif + +
NameSizeLast modifiedActions
- ${history.name} - %if history == trans.get_history(): - (current history) - %endif - ${len(history.active_datasets)}${str(history.update_time)[:19]} - %if not history.deleted: - rename
- switch to
- delete
- %else: - undelete
- %endif -
+ + + + + + + + + + + + + + %for i, history in enumerate( user.histories ): + + %if ( show_deleted and not history.purged ) or not( history.deleted ): + + + + + + + + + + + + + + + + + + %endif + + %endfor + + + + + + + + + + +
Name (click to activate)Datasets (by state)StatusLast update
+ %if not history.deleted: + ${history.name} + + %else: + ${history.name} + %endif + + + <% + total_ok = sum( 1 for d in history.active_datasets if d.state == 'ok' ) + total_running = sum( 1 for d in history.active_datasets if d.state == 'running' ) + total_queued = sum( 1 for d in history.active_datasets if d.state == 'queued' ) + total_error = sum( 1 for d in history.active_datasets if d.state == 'error' ) + %> + + %if total_ok: +
${total_ok}
+ %else: +
+ %endif + + %if total_error: +
${total_error}
+ %endif + + %if total_running: +
${total_running}
+ %else: +
+ %endif + + %if total_queued: +
${total_queued}
+ %else: +
+ %endif + +
+ %if history == trans.get_history(): + active + %endif + %if history.deleted: + deleted + %endif + ${h.date.distance_of_time_in_words( history.update_time, h.date.datetime.utcnow() )} +
+ + %if not history.deleted: + rename
+ switch to
+ delete
+ %else: + undelete
+ %endif + +
+
+ For selected histories: + + + + %if show_deleted: + + %endif +
+
-%else: - You have no stored histories -%endif + + + diff --git a/templates/history/options.mako b/templates/history/options.mako index dfe3ffd9d09..bb807cb2e97 100644 --- a/templates/history/options.mako +++ b/templates/history/options.mako @@ -11,15 +11,16 @@
    %if user: -
  • Rename current history (stored as "${history.name}")
  • -
  • List previously stored histories
  • +
  • Rename current history (stored as "${history.name}")
  • +
  • List previously stored histories
  • %if len( history.active_datasets ) > 0:
  • Create a new empty history
  • %endif
  • Construct workflow from the current history
  • -
  • Share current history
+
  • Share current history
  • +
  • Change default permissions for the current history
  • %endif
  • Show deleted datasets in history
  • -
  • Delete current history
  • +
  • Delete current history
  • diff --git a/templates/history/permissions.mako b/templates/history/permissions.mako new file mode 100644 index 00000000000..a189523440d --- /dev/null +++ b/templates/history/permissions.mako @@ -0,0 +1,7 @@ +<%inherit file="/base.mako"/> +<%def name="title()">Change Default Permissions on New Datasets in This History +<%namespace file="/dataset/security_common.mako" import="render_permission_form" /> + +%if trans.user: + ${render_permission_form( trans.history, trans.history.name, h.url_for(), 'id', None, trans.user.all_roles() )} +%endif diff --git a/templates/history/rename.mako b/templates/history/rename.mako index 07b9a4a9ee2..02b5f01c7c3 100644 --- a/templates/history/rename.mako +++ b/templates/history/rename.mako @@ -4,7 +4,7 @@
    Rename History
    -
    + %for history in histories: diff --git a/templates/history/share.mako b/templates/history/share.mako index 5e64e66756a..3ec8a41581e 100644 --- a/templates/history/share.mako +++ b/templates/history/share.mako @@ -1,30 +1,117 @@ <%inherit file="/base.mako"/> <%def name="title()">Share histories -
    -
    Share Histories
    -
    Current NameNew Name
    - - - %for history in histories: - - - - %endfor - - %if send_to_err: - - %endif - - -
    History Name:Number of Datasets:Share Link
    ${history.name} - - %if len(history.datasets) < 1: -
    - This history contains no data. +%if not can_change and not cannot_change: +
    +
    Share Histories
    + + + + %for history in histories: + + + + + + %endfor + + %if send_to_err: + + %endif + + +
    History Name:Number of Datasets:Share Link
    ${history.name} + %if len( history.datasets ) < 1: +
    This history contains no data.
    + %else: + ${len(history.datasets)} + %endif +
    copy link to share
    Email of User to share with:
    ${send_to_err}
    - %else: - ${len(history.datasets)} - %endif -
    copy link to share
    Email of User to share with:
    ${send_to_err}
    -
    \ No newline at end of file +%else: + +
    + %for history in histories: + + %endfor + +
    + The history or histories you've chosen to share contain datasets that the user with which you're sharing does not have permission to access. + These datasets are shown below. Datasets that the user has permission to access are not shown. +
    +

    + %if can_change: +

    + The following datasets can be shared with ${email} by updating their permissions: +

    + + + %for history, datasets in can_change.items(): + + + + + %endfor +
    HistoriesDatasets
    ${history.name} + %for dataset in datasets: + ${dataset.name}
    + %endfor +
    +

    +

    + %endif + %if cannot_change: +

    + The following datasets cannot be shared with ${email} because you are not authorized to change the permissions on them. +

    + + + %for history, datasets in cannot_change.items(): + + + + + %endfor +
    HistoriesDatasets
    ${history.name} + %for dataset in datasets: + ${dataset.name}
    + %endfor +
    +

    +

    + %endif +

    + How would you like to proceed? +

    + %if can_change: + Set datasets above to public access + %if cannot_change: + (where possible) + %endif +
    + Set datasets above to private access for me and the user(s) with whom I am sharing + %if cannot_change: + (where possible) + %endif +
    + %endif + Share anyway + %if can_change: + (don't change any permissions) + %endif +
    + Don't share
    +
    +
    +

    +
    +%endif diff --git a/templates/library/browser.mako b/templates/library/browser.mako new file mode 100644 index 00000000000..f326fc25119 --- /dev/null +++ b/templates/library/browser.mako @@ -0,0 +1,210 @@ +<%inherit file="/base.mako"/> +<%namespace file="common.mako" import="render_dataset" /> +<%namespace file="/message.mako" import="render_msg" /> + +<%def name="title()">Import from Library +<%def name="stylesheets()"> + + + + +<% +def name_sorted( l ): + return sorted( l, lambda a, b: cmp( a.name.lower(), b.name.lower() ) ) +%> + + + + + + + +<%def name="render_folder( parent, parent_pad )"> + <% + if not trans.app.security_agent.check_folder_contents( trans.user, parent ): + return "" + pad = parent_pad + 20 + if parent_pad == 0: + expander = "/static/images/silk/resultset_bottom.png" + folder = "/static/images/silk/folder_page.png" + subfolder = False + else: + expander = "/static/images/silk/resultset_next.png" + folder = "/static/images/silk/folder.png" + subfolder = True + %> +
  • + +
    + + ${parent.name} + %if parent.description: + - ${parent.description} + %endif + +
    +
  • + %if subfolder: + -%endif \ No newline at end of file +%endif diff --git a/templates/user/permissions.mako b/templates/user/permissions.mako new file mode 100644 index 00000000000..45b44795f38 --- /dev/null +++ b/templates/user/permissions.mako @@ -0,0 +1,7 @@ +<%inherit file="/base.mako"/> +<%def name="title()">Change Default Permissions on New Histories +<%namespace file="/dataset/security_common.mako" import="render_permission_form" /> + +%if trans.user: + ${render_permission_form( trans.user, trans.user.email, h.url_for(), 'id', None, trans.user.all_roles() )} +%endif diff --git a/templates/workflow/editor.mako b/templates/workflow/editor.mako index 825c5fc401e..fe1afd7b4ee 100644 --- a/templates/workflow/editor.mako +++ b/templates/workflow/editor.mako @@ -1,6 +1,18 @@ <%inherit file="/base_panels.mako"/> -<%def name="title()">Galaxy Workflow Editor +<%def name="init()"> +<% + self.active_view="workflow" + self.message_box_visible=True + self.message_box_class="warning" +%> + + +<%def name="message_box_content()"> + Workflow support is currently in beta testing. + Workflows may not work with all tools, may fail unexpectedly, and may + not be compatible with future updates to Galaxy. + <%def name="late_javascripts()"> @@ -229,7 +241,7 @@ } var close_editor = function() { - <% next_url = h.url_for( controller='root', m_c='workflow' ) %> + <% next_url = h.url_for( controller='workflow', action='index' ) %> if ( workflow && workflow.has_changes ) { do_close = function() { window.onbeforeunload = undefined; @@ -301,11 +313,12 @@ <%def name="stylesheets()"> - ${parent.stylesheets()} - - ## Also include "base.css" for styling tool menu and forms (details) + ## Include "base.css" for styling tool menu and forms (details) + ## But make sure styles for the layout take precedence + ${parent.stylesheets()} +