diff --git a/README.md b/README.md index 7b9516acc..b242f9869 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,7 @@ To contribute, first read [How to Contribute][Contributing]. | `python manage.py collectstatic` | [django](https://docs.djangoproject.com/en/3.2/howto/static-files/) | `python manage.py createsuperuser` | [django cms](https://docs.django-cms.org/en/release-3.8.x/how_to/install.html#admin-user), [django](https://docs.djangoproject.com/en/3.2/ref/django-admin/#createsuperuser) + [Camino]: https://github.com/TACC/Camino diff --git a/poetry.lock b/poetry.lock index 4dd79a685..f684671c2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -747,13 +747,15 @@ taggit-helpers = ["django-taggit-helpers"] [[package]] name = "djangocms-bootstrap4" -version = "3.0.1" +version = "3.0.2" description = "Adds Bootstrap 4 components as plugins." optional = false python-versions = "*" groups = ["main"] -files = [] -develop = false +files = [ + {file = "djangocms_bootstrap4-3.0.2-py3-none-any.whl", hash = "sha256:3b7e7eb1b7551cf433bf2bb0f3601d47645203c3bb4ad75ec097eb4bd81a34cf"}, + {file = "djangocms_bootstrap4-3.0.2.tar.gz", hash = "sha256:e931aefadbd22ab00e6cea8b7224da767afea125df15bf0c8a8d5f7872153e64"}, +] [package.dependencies] django-cms = ">=3.7,<4" @@ -767,12 +769,6 @@ djangocms-text-ckeditor = ">=3.1.0" [package.extras] static-ace = ["djangocms-static-ace"] -[package.source] -type = "git" -url = "https://github.com/django-cms/djangocms-bootstrap4.git" -reference = "49983f4" -resolved_reference = "49983f4175ec4a4e2b5076993a893cbdd79c4ab2" - [[package]] name = "djangocms-column" version = "2.0.0" @@ -2502,4 +2498,4 @@ testing = ["func-timeout", "jaraco.itertools"] [metadata] lock-version = "2.1" python-versions = ">=3.11,<4.0" -content-hash = "0e49bdbb7a51070f47f88658d8fb9cdcdc2c20fd3140267b933c7d0fd3f9743e" +content-hash = "2ac17635289fc7cf2692591557221b048c40769a3ea1a108915ed19fc43cd098" diff --git a/pyproject.toml b/pyproject.toml index 6b42d2cd1..e58c7c762 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tacc-core-cms-backend" -version = "v4.35.14" +version = "v4.36.14" description = "DjangoCMS backend for the TACC ACI-WMA Core-CMS Codebase." authors = ["TACC-WMA "] @@ -45,9 +45,7 @@ djangocms-admin-style = "~3.2.6" djangocms-apphook-setup = "0.4.1" djangocms-attributes-field = "2.1.0" djangocms-blog = "^1.2" -# TO get a commit in main (since v3.0.1) to fix Container error -# https://github.com/django-cms/djangocms-bootstrap4/pull/164 -djangocms-bootstrap4 = {git = "https://github.com/django-cms/djangocms-bootstrap4.git", rev = "49983f4"} +djangocms-bootstrap4 = "^3.0" djangocms-column = "^2.0" djangocms-file = "3.0.0" djangocms-forms-maintained = { git = "https://github.com/TACC/djangocms-forms", rev = "6b59ff366495915f06f4d6fac01a2f0aa9efecaf" } diff --git a/taccsite_cms/_settings/djangocms_plugins.py b/taccsite_cms/_settings/djangocms_plugins.py index 21c8d6dec..5406aa1d9 100644 --- a/taccsite_cms/_settings/djangocms_plugins.py +++ b/taccsite_cms/_settings/djangocms_plugins.py @@ -38,7 +38,9 @@ ('center', _('Align center')), ] DJANGOCMS_PICTURE_TEMPLATES = [ - ('no_link_to_ext_image', _('Do not link to external image')), + ('no_link_to_ext_image', _('Do not link to "External image"')), + ('zoom_effect', _('Zoom image on hover')), + ('zoom_effect_no_link_to_ext_image', _('Zoom image on hover & Do not link to "External image"')), ] ######################## diff --git a/taccsite_cms/apps.py b/taccsite_cms/apps.py index 4775f2ae9..478f0765d 100644 --- a/taccsite_cms/apps.py +++ b/taccsite_cms/apps.py @@ -1,7 +1,9 @@ import logging + from django.apps import AppConfig from django.db.models.signals import post_migrate +from .djangocms_picture.extend import extendPicturePlugin from .djangocms_bootstrap4.contrib.bootstrap4_link.extend import extendBootstrap4LinkPlugin logger = logging.getLogger(f"portal.{__name__}") @@ -12,6 +14,7 @@ class TaccsiteCmsConfig(AppConfig): def ready(self): post_migrate.connect(self.create_groups, sender=self) + extendPicturePlugin() extendBootstrap4LinkPlugin() def create_groups(self, sender, **kwargs): diff --git a/taccsite_cms/contrib/bootstrap4_djangocms_picture/cms_plugins.py b/taccsite_cms/contrib/bootstrap4_djangocms_picture/cms_plugins.py deleted file mode 100644 index 3edf41136..000000000 --- a/taccsite_cms/contrib/bootstrap4_djangocms_picture/cms_plugins.py +++ /dev/null @@ -1,23 +0,0 @@ -# To support generic Image plugin without uninstalling Bootstrap's -# FAQ: Bootstrap Image plugin has features not desirable in TACC plugins -# FAQ: We must not break sites that already use Bootstrap Image plugin -try: - from django.utils.translation import gettext as _ - - from cms.plugin_pool import plugin_pool - - from djangocms_picture.cms_plugins import PicturePlugin - from djangocms_bootstrap4.contrib.bootstrap4_picture.cms_plugins import Bootstrap4PicturePlugin - - # To clairfy for users how this plugin differs from Generic > Image - Bootstrap4PicturePlugin.name = _('Picture / Image (Responsive)') - - # To re-register generic Picture plugin - # SEE: https://github.com/django-cms/djangocms-bootstrap4/blob/master/djangocms_bootstrap4/contrib/bootstrap4_picture/cms_plugins.py#L54 - plugin_pool.register_plugin(PicturePlugin) - -# To avoid server crash if Boostrap plugin is not registered -# CAVEAT: If import statement fails for reason other than Bootstrap presence, -# then that failure, and the failure of this plugin, is silent -except ImportError: - pass diff --git a/taccsite_cms/djangocms_picture/extend.py b/taccsite_cms/djangocms_picture/extend.py new file mode 100644 index 000000000..21798b481 --- /dev/null +++ b/taccsite_cms/djangocms_picture/extend.py @@ -0,0 +1,163 @@ +def extendPicturePlugin(): + from django.utils.translation import gettext_lazy as _ + + from cms.plugin_pool import plugin_pool + + ZOOM_TEMPLATE_NAME = 'zoom_effect' + ZOOM_TEMPLATE_LABEL = 'Zoom image on hover' + ZOOM_TEMPLATE_NOTE = _('The "%(zoom_template_label)s" templates only have effect if Image either has a Link or is within a Link.') % {"zoom_template_label": ZOOM_TEMPLATE_LABEL} + ZOOM_TEMPLATE_ERROR = _(' "%(zoom_template_label)s" templates require Image to either have a Link or be within a Link.') % {"zoom_template_label": ZOOM_TEMPLATE_LABEL} + + LINK_TEMPLATE_NAME = 'no_link_to_ext_image' + + def add_help_text(form_instance): + """Adds help text for: 'Template' field""" + + if 'template' in form_instance.fields: + form_instance.fields['template'].help_text += _(' %(ZOOM_TEMPLATE_NOTE)s') % {"ZOOM_TEMPLATE_NOTE": ZOOM_TEMPLATE_NOTE} + + def whether_to_render_link(instance): + has_explicit_link = bool(instance.link_url or instance.link_page_id) + # FAQ: The djangocms_picture has "feature" such that an image with + # "External image" URL will automatically link to that resource + has_implicit_link = bool(instance.get_link()) and not has_explicit_link + + allow_implicit_link = not LINK_TEMPLATE_NAME in instance.template + + if has_explicit_link or (has_implicit_link and allow_implicit_link): + return True + + return False + + def validate_zoom_template(instance): + """Validates: 'Template' field choice 'Zoom image …'""" + from django.core.exceptions import ValidationError + from djangocms_link.cms_plugins import LinkPlugin + + errors = {} + + would_render_link = whether_to_render_link(instance) + should_add_zoom_effect = ZOOM_TEMPLATE_NAME in instance.template + parent_plugin = instance.parent.get_plugin_instance()[0] if instance.parent else None + is_in_link = instance.parent.plugin_type == 'LinkPlugin' if instance.parent else False + + if (should_add_zoom_effect and not would_render_link and not is_in_link): + errors['template'] = ZOOM_TEMPLATE_ERROR + + if errors: + raise ValidationError(errors) + + def get_more_context_variables(instance): + """ + Calculate boolean context variables to simplify template logic. + Returns a dictionary of context variables. + """ + # Figure/Caption + has_caption_text = bool(instance.caption_text) + has_child_plugins = bool(instance.child_plugin_instances) + has_figure_content = has_caption_text or has_child_plugins + + # Template + is_zoom_template = ZOOM_TEMPLATE_NAME in instance.template + + # Link + should_render_link = whether_to_render_link(instance) + + # Zoom Effect + should_add_zoom_effect = is_zoom_template + should_wrap_image_for_zoom = ( + should_add_zoom_effect and + (has_figure_content or not should_render_link) + ) + should_add_zoom_class_to_link = ( + should_add_zoom_effect and + should_render_link and + not has_figure_content + ) + + # Attributes + should_add_attributes_to_image = ( + not has_figure_content and + not should_render_link + ) + + return { + 'should_render_link': should_render_link, + 'has_figure_content': has_figure_content, + 'should_wrap_image_for_zoom': should_wrap_image_for_zoom, + 'should_add_zoom_class_to_link': should_add_zoom_class_to_link, + 'should_add_attributes_to_image': should_add_attributes_to_image, + } + + + # djangocms_picture + from djangocms_picture.cms_plugins import PicturePlugin as OriginalPicturePlugin + from djangocms_picture.models import Picture as OriginalPicture + + class PicturePluginForm(OriginalPicturePlugin.form): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + add_help_text(self) + + class PicturePluginModel(OriginalPicture): + class Meta: + proxy = True + + def clean(self): + super().clean() + validate_zoom_template(self) + + class PicturePlugin(OriginalPicturePlugin): + model = PicturePluginModel + form = PicturePluginForm + name = 'Image' + + def render(self, context, instance, placeholder): + context = super().render(context, instance, placeholder) + + more_context = get_more_context_variables(instance) + context.update(more_context) + + return context + + # To support generic Image plugin without uninstalling Bootstrap's + # FAQ: Had been done cuz Image plugin had percieved use cases, + # but is since not regularly used, but is used, thus maintained + # FAQ: No need to unregister cuz Bootstrap4PicturePlugin does that + # https://github.com/django-cms/djangocms-bootstrap4/blob/3.0.0/djangocms_bootstrap4/contrib/bootstrap4_picture/cms_plugins.py#L54 + # plugin_pool.unregister_plugin(OriginalPicturePlugin) + plugin_pool.register_plugin(PicturePlugin) + + + # djangocms_bootstrap4: bootstrap4_picture + from djangocms_bootstrap4.contrib.bootstrap4_picture.cms_plugins import Bootstrap4PicturePlugin as OriginalBootstrap4PicturePlugin + from djangocms_bootstrap4.contrib.bootstrap4_picture.models import Bootstrap4Picture as OriginalBootstrap4Picture + + class Bootstrap4PictureForm(OriginalBootstrap4PicturePlugin.form): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + add_help_text(self) + + class Bootstrap4PictureModel(OriginalBootstrap4Picture): + class Meta: + proxy = True + + def clean(self): + super().clean() + validate_zoom_template(self) + + class Bootstrap4PicturePlugin(OriginalBootstrap4PicturePlugin): + model = Bootstrap4PictureModel + form = Bootstrap4PictureForm + name = 'Picture / Image (Responsive)' + + def render(self, context, instance, placeholder): + context = super().render(context, instance, placeholder) + + more_context = get_more_context_variables(instance) + context.update(more_context) + + return context + + plugin_pool.unregister_plugin(OriginalBootstrap4PicturePlugin) + plugin_pool.register_plugin(Bootstrap4PicturePlugin) diff --git a/taccsite_cms/management/commands/README.md b/taccsite_cms/management/commands/README.md index d2416238d..e28094462 100644 --- a/taccsite_cms/management/commands/README.md +++ b/taccsite_cms/management/commands/README.md @@ -2,6 +2,7 @@ - [How to Use](#how-to-use) - [List Pages Using Each Template](#list-pages-using-each-template) +- [List Pages Using Plugins](#list-pages-using-plugins) - [Set Groups & Permissions](#set-groups--permissions) - [Reference](#reference) @@ -25,6 +26,21 @@ Usage: python manage.py list_page_templates ``` +## List Pages Using Plugins + +This command lists all pages that use a specific plugin instance (given a plugin instance ID), along with the page's path. + +Usage: +```sh +python manage.py list_plugin_pages [ ...] +``` + +Example: +```sh +python manage.py list_plugin_pages 42 99 +``` + + ## Set Groups & Permissions Every file in [`group_perms/`](./group_perms) represents a group. Each group's intended usage is described at the top of its file. Permissions are set via function calls in each file.[^1] diff --git a/taccsite_cms/management/commands/list_plugin_pages.py b/taccsite_cms/management/commands/list_plugin_pages.py new file mode 100644 index 000000000..8ae1b244d --- /dev/null +++ b/taccsite_cms/management/commands/list_plugin_pages.py @@ -0,0 +1,25 @@ +from django.core.management import BaseCommand +from django.apps import apps + +class Command(BaseCommand): + help = 'Finds the page that uses a specific plugin instance by its ID' + + def add_arguments(self, parser): + parser.add_argument('plugin_instance_ids', nargs='+', type=str) + + def handle(self, *args, **options): + for plugin_instance_id in options['plugin_instance_ids']: + page = self.find_page_using_plugin_instance(plugin_instance_id) + if page: + self.stdout.write(f'Plugin instance ID {plugin_instance_id} is used on page: {page.get_path()}') + else: + self.stdout.write(f'No page found using plugin instance ID {plugin_instance_id}') + + def find_page_using_plugin_instance(self, plugin_instance_id): + try: + CMSPlugin = apps.get_model('cms', 'CMSPlugin') + plugin_instance = CMSPlugin.objects.get(id=plugin_instance_id) + page = plugin_instance.placeholder.page if plugin_instance.placeholder else None + return page + except CMSPlugin.DoesNotExist: + return None diff --git a/taccsite_cms/settings.py b/taccsite_cms/settings.py index a4a4ebeda..ed33357a4 100644 --- a/taccsite_cms/settings.py +++ b/taccsite_cms/settings.py @@ -264,6 +264,15 @@ def gettext(s): return s "is_remote": False, "img_file_src": "site_cms/img/favicons/favicon.ico", } +favicon_path = f"/static/site_cms/favicon/" +PORTAL_FAVICON_HTML = f''' + + + + + + +''' ######################## @@ -352,8 +361,10 @@ def gettext(s): return s # FAQ: List custom directory first, so custom templates take precedence # SEE: https://docs.djangoproject.com/en/2.2/topics/templates/#configuration 'DIRS': glob( + # XXX: Strange and from my ignorant implementation os.path.join(BASE_DIR, 'taccsite_custom') ) + [ + os.path.join(BASE_DIR, 'taccsite_custom', 'templates'), os.path.join(BASE_DIR, 'taccsite_cms', 'templates') ], 'OPTIONS': { @@ -484,7 +495,6 @@ def gettext(s): return s # django CMS Bootstrap # IDEA: Extend Bootstrap apps instead of overwrite 'taccsite_cms.contrib.bootstrap4_djangocms_link', - 'taccsite_cms.contrib.bootstrap4_djangocms_picture', # TACC CMS Plugins 'djangocms_tacc_image_gallery', @@ -707,6 +717,7 @@ def get_subdirs_as_module_names(path): 'PORTAL_BRANDING', 'PORTAL_LOGO', 'PORTAL_FAVICON', + 'PORTAL_FAVICON_HTML', 'PORTAL_IS_TACC_CORE_PORTAL', 'PORTAL_HAS_LOGIN', 'PORTAL_LOGIN_PATH', diff --git a/taccsite_cms/settings_custom.example.py b/taccsite_cms/settings_custom.example.py index 9cc4973ee..d413f8860 100644 --- a/taccsite_cms/settings_custom.example.py +++ b/taccsite_cms/settings_custom.example.py @@ -86,6 +86,17 @@ "is_remote": True, "img_file_src": "https://cdn.jsdelivr.net/gh/TACC/Core-CMS@v4.33.0/taccsite_cms/static/site_cms/img/favicons/favicon.ico", } +# The PORTAL_FAVICON_HTML takes precedence over PORTAL_FAVICON, +# This HTML is like output from https://realfavicongenerator.net/ circa 2025-09 +# favicon_path = "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@________/________/favicon/" +# PORTAL_FAVICON_HTML = f''' +# +# +# +# +# +# +# ''' ######################## # SEARCH @@ -101,16 +112,16 @@ # DJANGOCMS_BLOG ######################## -BLOG_AUTO_SETUP = True # Set to False after setup (minimize overhead) -BLOG_AUTO_HOME_TITLE ='Home' -BLOG_AUTO_BLOG_TITLE = 'News' -BLOG_AUTO_APP_TITLE = 'News' -BLOG_AUTO_NAMESPACE = 'News' -BLOG_ENABLE_COMMENTS = False +# BLOG_AUTO_SETUP = True # Set to False after setup (minimize overhead) +# BLOG_AUTO_HOME_TITLE ='Home' +# BLOG_AUTO_BLOG_TITLE = 'News' +# BLOG_AUTO_APP_TITLE = 'News' +# BLOG_AUTO_NAMESPACE = 'News' +# BLOG_ENABLE_COMMENTS = False ######################## # DJANGOCMS_BLOG: TACC ######################## -PORTAL_BLOG_SHOW_CATEGORIES = True -PORTAL_BLOG_SHOW_TAGS = True +# PORTAL_BLOG_SHOW_CATEGORIES = True +# PORTAL_BLOG_SHOW_TAGS = True diff --git a/taccsite_cms/static/site_cms/css/src/_imports/components/django.cms.blog.app.page.css b/taccsite_cms/static/site_cms/css/src/_imports/components/django.cms.blog.app.page.css index 4a6c5ef4f..13dadc8da 100644 --- a/taccsite_cms/static/site_cms/css/src/_imports/components/django.cms.blog.app.page.css +++ b/taccsite_cms/static/site_cms/css/src/_imports/components/django.cms.blog.app.page.css @@ -170,6 +170,15 @@ Styleguide Components.DjangoCMS.Blog.App.Page margin-inline: auto; } +/* To add space under aligned images */ +/* NOTE: All images should be aligned by news editor, + so missing space is considered news editor error */ +:--article-page .blog-content .align-right, +:--article-page .blog-content .align-center, +:--article-page .blog-content .align-left { + margin-bottom: var(--global-space--grid-gap); +} + /* To always align Bootstrap blockquote text left */ /* FAQ: Boostrap, loaded in foundation layer, used !important */ /* TODO: When extending Core-Styles c-news, .blockquote... is only for CMS */ diff --git a/taccsite_cms/static/site_cms/css/src/_imports/components/django.cms.picture.css b/taccsite_cms/static/site_cms/css/src/_imports/components/django.cms.picture.css index ee1caa672..623683b3e 100644 --- a/taccsite_cms/static/site_cms/css/src/_imports/components/django.cms.picture.css +++ b/taccsite_cms/static/site_cms/css/src/_imports/components/django.cms.picture.css @@ -2,10 +2,9 @@ /* SEE: https://github.com/django-cms/djangocms-picture/blob/2.3.0/djangocms_picture/models.py#L24-L34 */ @import url("@tacc/core-styles/src/lib/_imports/components/align.css"); -/* Allow anchor tag to wrap like a block but still behave inline */ -/* FAQ: TACC/Core-CMS causes this tag-class combination, so it must manage it */ -/* FAQ: TACC/Core-CMS moves (side effect) Picture classes to
or */ -a.img-fluid { +/* Give linked image same box-model behavior as image */ +/* FAQ: Not doing this for `figure` cuz it is already a block */ +a.editor-img-wrap { display: inline-block; } @@ -26,11 +25,11 @@ img.align-center { /* To apply djangocms-bootstrap4/…_picture class styles from parent to image */ /* FAQ: TACC/Core-CMS moves (side effect) Picture classes to
or */ /* SEE: taccsite_cms/templates/djangocms_picture/default/picture.html */ -:is(figure, a).img-fluid img { +.editor-img-wrap:is(figure, a).img-fluid img { max-width: 100%; height: auto; } -:is(figure, a).img-thumbnail img { +.editor-img-wrap:is(figure, a).img-thumbnail img { padding: 0.25rem; background-color: #fff; border: 1px solid #dee2e6; @@ -38,19 +37,18 @@ img.align-center { max-width: 100%; height: auto; } -:is(figure, a).rounded img { +.editor-img-wrap:is(figure, a).rounded img { /* NOTE: Bootstrap used 0.25rem */ border-radius: 1rem !important; /* overwrite Bootstrap (uses !important) */ } /* To undo some djangocms-bootstrap4/…_picture class styles on parent */ /* FAQ: The duplicate styles on parent tags look odd or are unnecessary */ -:is(figure, a).img-thumbnail { +.editor-img-wrap:is(figure, a).img-thumbnail { padding: unset; background-color: unset; border: unset; border-radius: unset; } -:is(figure, a).rounded { +.editor-img-wrap:is(figure, a).rounded { border-radius: unset !important; /* overwrite Bootstrap (uses !important) */ } - diff --git a/taccsite_cms/static/site_cms/css/src/template.guide.css b/taccsite_cms/static/site_cms/css/src/template.guide.css index 48e02c7fc..4b87cfd3f 100644 --- a/taccsite_cms/static/site_cms/css/src/template.guide.css +++ b/taccsite_cms/static/site_cms/css/src/template.guide.css @@ -5,10 +5,7 @@ /* TRUMPS */ -@import url("@tacc/core-styles/src/lib/_imports/trumps/s-document.css"); @import url("@tacc/core-styles/src/lib/_imports/trumps/s-guide-doc.css"); -@import url("@tacc/core-styles/src/lib/_imports/trumps/s-inline-dl.css"); -@import url("@tacc/core-styles/src/lib/_imports/trumps/u-nested-text-content.css"); /* NOTE: The Portal v3 / Core-Styles v2 docs are unexpected. The plan was for all documentation to be in docs.tacc.utexas.edu. diff --git a/taccsite_cms/static/site_cms/css/test/djangocms-picture.css b/taccsite_cms/static/site_cms/css/test/djangocms-picture.css new file mode 100644 index 000000000..0a91e3675 --- /dev/null +++ b/taccsite_cms/static/site_cms/css/test/djangocms-picture.css @@ -0,0 +1,72 @@ +main { + .col { + /* To support notes */ + + :is(a, figure, span) { + position: relative; + } + :is(a, figure, span)::before { + position: absolute; + inset: 0 auto auto 0; + font-size: smaller; + background: rgb(from black r g b / 50%); + z-index: 1; + padding-inline: 0.5em; + } + + + /* To make notes unique */ + + a::before { + top: 0; + color: aqua; + content: ''; + } + a[class]::before { + content: ''; + } + a[data-class]::before { + content: ''; + } + + figure::before { + top: 3lh; + color: fuchsia; + content: '
'; + } + figure[class]::before { + content: '
'; + } + figure[data-class]::before { + content: '
'; + } + + span::before { + top: 6lh; + color: yellow; + content: ''; + } + + + /* To align notes to mimic tag hierarchy */ + + a > span::before, + a > figure::before, + figure > span::before { + margin-left: 1em; + } + a > figure > span::before { + margin-left: 2em; + } + + + /* To disable unsupported combos */ + + .u-image-zoom--on-hover:is( + span:not(a > *, a > figure > *), + figure:not(a > *) + ) { + opacity: 0.5; + } + } +} diff --git a/taccsite_cms/static/site_cms/favicon/apple-touch-icon.png b/taccsite_cms/static/site_cms/favicon/apple-touch-icon.png new file mode 100644 index 000000000..0697cb2d0 Binary files /dev/null and b/taccsite_cms/static/site_cms/favicon/apple-touch-icon.png differ diff --git a/taccsite_cms/static/site_cms/favicon/favicon-96x96.png b/taccsite_cms/static/site_cms/favicon/favicon-96x96.png new file mode 100644 index 000000000..202fb3677 Binary files /dev/null and b/taccsite_cms/static/site_cms/favicon/favicon-96x96.png differ diff --git a/taccsite_cms/static/site_cms/favicon/favicon.ico b/taccsite_cms/static/site_cms/favicon/favicon.ico new file mode 100644 index 000000000..9f44baf99 Binary files /dev/null and b/taccsite_cms/static/site_cms/favicon/favicon.ico differ diff --git a/taccsite_cms/static/site_cms/favicon/favicon.svg b/taccsite_cms/static/site_cms/favicon/favicon.svg new file mode 100644 index 000000000..d5550f7dc --- /dev/null +++ b/taccsite_cms/static/site_cms/favicon/favicon.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/taccsite_cms/static/site_cms/favicon/site.webmanifest b/taccsite_cms/static/site_cms/favicon/site.webmanifest new file mode 100644 index 000000000..913ac9706 --- /dev/null +++ b/taccsite_cms/static/site_cms/favicon/site.webmanifest @@ -0,0 +1,21 @@ +{ + "name": "Texas Advanced Computing Center", + "short_name": "TACC", + "icons": [ + { + "src": "/site_cms/favicon/web-app-manifest-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "/site_cms/favicon/web-app-manifest-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/taccsite_cms/static/site_cms/favicon/web-app-manifest-192x192.png b/taccsite_cms/static/site_cms/favicon/web-app-manifest-192x192.png new file mode 100644 index 000000000..3ca5458ed Binary files /dev/null and b/taccsite_cms/static/site_cms/favicon/web-app-manifest-192x192.png differ diff --git a/taccsite_cms/static/site_cms/favicon/web-app-manifest-512x512.png b/taccsite_cms/static/site_cms/favicon/web-app-manifest-512x512.png new file mode 100644 index 000000000..c0f2de012 Binary files /dev/null and b/taccsite_cms/static/site_cms/favicon/web-app-manifest-512x512.png differ diff --git a/taccsite_cms/static/site_cms/img/favicons/favicon.ico b/taccsite_cms/static/site_cms/img/favicons/favicon.ico deleted file mode 100644 index 533966ed9..000000000 Binary files a/taccsite_cms/static/site_cms/img/favicons/favicon.ico and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/create-account.institute.png b/taccsite_cms/static/site_cms/img/guides/create-account.institute.png deleted file mode 100644 index 992e0b22b..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/create-account.institute.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/create-account.login.png b/taccsite_cms/static/site_cms/img/guides/create-account.login.png deleted file mode 100644 index 2143af131..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/create-account.login.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/create-account.tacc.png b/taccsite_cms/static/site_cms/img/guides/create-account.tacc.png deleted file mode 100644 index 52361b7aa..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/create-account.tacc.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-1a-get-dn.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-1a-get-dn.png deleted file mode 100644 index e654155af..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-1a-get-dn.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-1b-tacc-profile.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-1b-tacc-profile.png deleted file mode 100644 index 9c4a5ab69..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-1b-tacc-profile.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-1c-asociate-dn.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-1c-asociate-dn.png deleted file mode 100644 index cc89c7e01..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-1c-asociate-dn.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2a-login.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2a-login.png deleted file mode 100644 index 0ab6bc228..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2a-login.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2b-file-manager.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2b-file-manager.png deleted file mode 100644 index 4d689645b..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2b-file-manager.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2c-endpoints.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2c-endpoints.png deleted file mode 100644 index b97d15c3c..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2c-endpoints.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2d-access-computer.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2d-access-computer.png deleted file mode 100644 index 11ece9a18..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2d-access-computer.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2d-create-endpoint.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2d-create-endpoint.png deleted file mode 100644 index bca57d833..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2d-create-endpoint.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2e-your-collections.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2e-your-collections.png deleted file mode 100644 index 27c58b902..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2e-your-collections.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2f-select-system.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2f-select-system.png deleted file mode 100644 index f56f7a62e..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2f-select-system.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.3DEM.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.3DEM.png deleted file mode 100644 index 199117f33..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.3DEM.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.A2CPS.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.A2CPS.png deleted file mode 100644 index 4d7f4b1c9..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.A2CPS.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.CEP.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.CEP.png deleted file mode 100644 index c2d301969..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.CEP.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.ECCO.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.ECCO.png deleted file mode 100644 index 1b9d04f7d..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.ECCO.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.PT2050.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.PT2050.png deleted file mode 100644 index 3cd00a0c5..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.PT2050.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.UTRC.png b/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.UTRC.png deleted file mode 100644 index f1b2bb96f..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer.globus/step-2g-project-id.UTRC.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer/1-determine-path.png b/taccsite_cms/static/site_cms/img/guides/data_transfer/1-determine-path.png deleted file mode 100644 index 6bed4cb78..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer/1-determine-path.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer/2-open-connection-context.png b/taccsite_cms/static/site_cms/img/guides/data_transfer/2-open-connection-context.png deleted file mode 100644 index 4e2742a9c..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer/2-open-connection-context.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer/3-open-connection-modal.png b/taccsite_cms/static/site_cms/img/guides/data_transfer/3-open-connection-modal.png deleted file mode 100644 index dec4a9dc0..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer/3-open-connection-modal.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/data_transfer/4-new-bookmark.png b/taccsite_cms/static/site_cms/img/guides/data_transfer/4-new-bookmark.png deleted file mode 100644 index cf9455b36..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/data_transfer/4-new-bookmark.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/files-access.empty.png b/taccsite_cms/static/site_cms/img/guides/files-access.empty.png deleted file mode 100644 index e21c60fe0..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/files-access.empty.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/files-access.form.png b/taccsite_cms/static/site_cms/img/guides/files-access.form.png deleted file mode 100644 index c9d71d73e..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/files-access.form.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/files-access.navigation.png b/taccsite_cms/static/site_cms/img/guides/files-access.navigation.png deleted file mode 100644 index e411bd482..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/files-access.navigation.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/files-access.warning.png b/taccsite_cms/static/site_cms/img/guides/files-access.warning.png deleted file mode 100644 index bb971915c..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/files-access.warning.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/login-portal.from-home.jpg b/taccsite_cms/static/site_cms/img/guides/login-portal.from-home.jpg deleted file mode 100644 index eb0731da3..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/login-portal.from-home.jpg and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/login-tacc.approval.jpg b/taccsite_cms/static/site_cms/img/guides/login-tacc.approval.jpg deleted file mode 100644 index 43b521329..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/login-tacc.approval.jpg and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/login-tacc.form.jpg b/taccsite_cms/static/site_cms/img/guides/login-tacc.form.jpg deleted file mode 100644 index 3f4d16e59..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/login-tacc.form.jpg and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/login-tapis.approval.png b/taccsite_cms/static/site_cms/img/guides/login-tapis.approval.png deleted file mode 100644 index fd4850672..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/login-tapis.approval.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/login-tapis.form.png b/taccsite_cms/static/site_cms/img/guides/login-tapis.form.png deleted file mode 100644 index b93ac2103..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/login-tapis.form.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-access.completed.png b/taccsite_cms/static/site_cms/img/guides/onboarding-access.completed.png deleted file mode 100644 index 5223b9f0c..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-access.completed.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-access.staffwait.png b/taccsite_cms/static/site_cms/img/guides/onboarding-access.staffwait.png deleted file mode 100644 index e64969100..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-access.staffwait.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-access.userwait.png b/taccsite_cms/static/site_cms/img/guides/onboarding-access.userwait.png deleted file mode 100644 index 0e53b50ac..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-access.userwait.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-allocations.completed.png b/taccsite_cms/static/site_cms/img/guides/onboarding-allocations.completed.png deleted file mode 100644 index fc36d5a16..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-allocations.completed.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-allocations.processing.png b/taccsite_cms/static/site_cms/img/guides/onboarding-allocations.processing.png deleted file mode 100644 index dca4350b8..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-allocations.processing.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.apps.png b/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.apps.png deleted file mode 100644 index 9cf945be1..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.apps.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.completed.png b/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.completed.png deleted file mode 100644 index 169ad82d3..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.completed.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.processing.png b/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.processing.png deleted file mode 100644 index a37b3a5a0..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.processing.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.userwait.png b/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.userwait.png deleted file mode 100644 index 1042d0d8b..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-mfa.userwait.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-project.completed.png b/taccsite_cms/static/site_cms/img/guides/onboarding-project.completed.png deleted file mode 100644 index 6ce96940f..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-project.completed.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-project.staffwait.png b/taccsite_cms/static/site_cms/img/guides/onboarding-project.staffwait.png deleted file mode 100644 index 1d5d1c723..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-project.staffwait.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-project.userwait.png b/taccsite_cms/static/site_cms/img/guides/onboarding-project.userwait.png deleted file mode 100644 index f7c7eb7cf..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-project.userwait.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-storage.completed.png b/taccsite_cms/static/site_cms/img/guides/onboarding-storage.completed.png deleted file mode 100644 index bfa7b37b6..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-storage.completed.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding-storage.processing.png b/taccsite_cms/static/site_cms/img/guides/onboarding-storage.processing.png deleted file mode 100644 index 2b740097f..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding-storage.processing.png and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding.completed.jpg b/taccsite_cms/static/site_cms/img/guides/onboarding.completed.jpg deleted file mode 100644 index de60fd98a..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding.completed.jpg and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding.pending.jpg b/taccsite_cms/static/site_cms/img/guides/onboarding.pending.jpg deleted file mode 100644 index 0fd1854da..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding.pending.jpg and /dev/null differ diff --git a/taccsite_cms/static/site_cms/img/guides/onboarding.sample-progress.jpg b/taccsite_cms/static/site_cms/img/guides/onboarding.sample-progress.jpg deleted file mode 100644 index 81ae7a0db..000000000 Binary files a/taccsite_cms/static/site_cms/img/guides/onboarding.sample-progress.jpg and /dev/null differ diff --git a/taccsite_cms/templates/assets_custom.html b/taccsite_cms/templates/assets_custom.html index 60ecefb61..45d57cf73 100644 --- a/taccsite_cms/templates/assets_custom.html +++ b/taccsite_cms/templates/assets_custom.html @@ -8,9 +8,13 @@ {% endcomment %} -{% with settings.PORTAL_FAVICON as favicon %} - -{% endwith %} +{% if settings.PORTAL_FAVICON_HTML %} + {{ settings.PORTAL_FAVICON_HTML|safe }} +{% else %} + {% with settings.PORTAL_FAVICON as favicon %} + + {% endwith %} +{% endif %} {% with settings.PORTAL_STYLES as styles %} diff --git a/taccsite_cms/templates/cms_menu.html b/taccsite_cms/templates/cms_menu.html index bcd6b1e4d..0d67909c8 100644 --- a/taccsite_cms/templates/cms_menu.html +++ b/taccsite_cms/templates/cms_menu.html @@ -1,6 +1,6 @@ {% load menu_tags tacc_uri_shortcuts limit_visibility_in_menu %} -{# NOTE: This template content is copied from a third-party plugin that we do not use nor need #} +{# NOTE: This template content was copied (and changed) from 3rd-party plugin that we have long since not used #} {# SEE: https://github.com/jrief/djangocms-bootstrap/blob/aa74994/cms_bootstrap/templates/bootstrap4/menu/navbar.html #} {% spaceless %} diff --git a/taccsite_cms/templates/djangocms_picture/default/picture.html b/taccsite_cms/templates/djangocms_picture/default/picture.html index 15f50ab31..92ea2666f 100644 --- a/taccsite_cms/templates/djangocms_picture/default/picture.html +++ b/taccsite_cms/templates/djangocms_picture/default/picture.html @@ -1,45 +1,55 @@ {# https://github.com/django-cms/djangocms-picture/blob/3.0.0/djangocms_picture/templates/djangocms_picture/default/picture.html #} -{# TACC (mimic v3.0.0 to v4.0.0 changes): #} {# TACC (support children as caption content): #} +{# TACC (mimic v3.0.0 to v4.0.0 changes): #} +{# TACC (support image zoom): #} {# {% load thumbnail %} #} -{% load thumbnail l10n cms_tags %} +{% load thumbnail l10n cms_tags strip_class_attribute %} +{# /TACC #} {# /TACC #} {# /TACC #} -{# TACC (allow link to be conditional): #} -{% block picture_link_start %} +{# TACC (support custom condition): #} +{% if should_render_link %} {# /TACC #} -{% if picture_link %} - {# TACC (allow link to be conditional): #} - {% block picture_link %} - {# /TACC #} -{# TACC (allow link to be conditional): #} -{% endblock %} -{# /TACC #} + {# TACC (support image zoom): #} + class=" + editor-img-wrap + {{ instance.attributes.class|default:'' }} + {{ instance.link_attributes.class|default:'' }} + {{ className }} + {% if should_add_zoom_class_to_link %}u-image-zoom--on-hover{% endif %} + " + {# TACC (assign attributes to parent): #} + {{ instance.attributes_str|strip_class_attribute|safe }} + {{ instance.link_attributes_str|strip_class_attribute|safe }} + {# /TACC #} + {# /TACC #} + > {% endif %} -{# TACC (allow link to be conditional): #} -{% endblock %} -{# /TACC #} -{# start render figure/figcaption #} + {# TACC (support children as caption content): #} -{# {% if instance.caption_text %} #} -{% if instance.caption_text or instance.child_plugin_instances %} +{% if has_figure_content %} +{# /TACC #} {# TACC (assign attributes to parent): #} - {#
#} -
+
{# /TACC #} {% endif %} -{# /TACC #} -{# end render figure/figcaption #} +{# TACC (support image zoom): #} +{% if should_wrap_image_for_zoom %} + +{% endif %} +{# /TACC #} {# TACC (mimic v3.0.0 to v4.0.0 changes): #} {% localize off %} {# /TACC #} @@ -64,7 +74,7 @@ {# TACC (allow link to be conditional): #} {% block picture_attributes %} {# TACC (assign attributes to parent): #} - {% if not instance.caption_text and not picture_link and not instance.child_plugin_instances %} + {% if should_add_attributes_to_image %} {{ instance.attributes_str }} {% endif %} {# /TACC #} @@ -74,10 +84,15 @@ {# TACC (mimic v3.0.0 to v4.0.0 changes): #} {% endlocalize %} {# /TACC #} +{# TACC (support image zoom): #} + {% if should_wrap_image_for_zoom %} + + {% endif %} +{# /TACC #} -{# start render figure/figcaption #} -{# {% if instance.caption_text %} #} -{% if instance.caption_text or instance.child_plugin_instances %} +{# TACC (support custom condition): #} +{% if has_figure_content %} +{# /TACC #} {# TACC (support children as caption content): #} {#
{{ instance.caption_text }}
#}
@@ -89,17 +104,12 @@ {# /TACC #}
{% endif %} -{# end render figure/figcaption #} -{# TACC (allow link to be conditional): #} -{% block picture_link_end %} +{# TACC (support custom condition): #} +{% if should_render_link %} {# /TACC #} -{% if picture_link %}
{% endif %} -{# TACC (allow link to be conditional): #} -{% endblock %} -{# /TACC #} {% comment %} # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img diff --git a/taccsite_cms/templates/djangocms_picture/no_link_to_ext_image/picture.html b/taccsite_cms/templates/djangocms_picture/no_link_to_ext_image/picture.html index 479af2ce9..d9e697407 100644 --- a/taccsite_cms/templates/djangocms_picture/no_link_to_ext_image/picture.html +++ b/taccsite_cms/templates/djangocms_picture/no_link_to_ext_image/picture.html @@ -1,28 +1,6 @@ {% extends "djangocms_picture/default/picture.html" %} -{# Do not let instance.external_picture trigger picture_link templating #} -{% comment %} -App djangocms_picture assumes external image must be linked to, -but we want to allow external image to be displayed without link. -{% endcomment %} -{# FAQ: picture_link is instance link_url or link_page_id or external_picture #} -{# https://github.com/django-cms/djangocms-picture/blob/3.0.0/djangocms_picture/models.py#L269-L276 #} -{# So picture with external image is not wrapped in a link #} -{% block picture_link_start %} - {% if instance.link_url or instance.link_page_id %} - {% block picture_link %} - {{ block.super }} - {% endblock %} - {% endif %} -{% endblock %} - -{# So picture attributes can be added to picture with external image #} -{% block picture_attributes %} - {% if not instance.caption_text and not instance.link_url and not instance.link_page_id and not instance.child_plugin_instances %} - {{ instance.attributes_str }} - {% endif %} -{% endblock %} - -{# So picture with external image is not wrapped in a link #} -{% block picture_link_end %} -{% endblock %} +{# To allow "External image" to be rendered without a link #} +{# FAQ: Template exists to avoid adding a new model field #} +{# FAQ: Default template uses custom boolean context variables for logic #} +{# FAQ: App djangocms_picture assumes that an image, if not explicitely linked, must link to itself. But sometimes, we want an image to just be an image, unlinked. #} diff --git a/taccsite_cms/templates/djangocms_picture/no_link_to_image/picture.html b/taccsite_cms/templates/djangocms_picture/no_link_to_image/picture.html new file mode 100644 index 000000000..5ab79b9f9 --- /dev/null +++ b/taccsite_cms/templates/djangocms_picture/no_link_to_image/picture.html @@ -0,0 +1,2 @@ +{# backwards-compatibility for temporary name #} +{% extends "djangocms_picture/no_link_to_ext_image/picture.html" %} diff --git a/taccsite_cms/templates/djangocms_picture/zoom_effect/picture.html b/taccsite_cms/templates/djangocms_picture/zoom_effect/picture.html new file mode 100644 index 000000000..f1f398d5c --- /dev/null +++ b/taccsite_cms/templates/djangocms_picture/zoom_effect/picture.html @@ -0,0 +1,5 @@ +{% extends "djangocms_picture/default/picture.html" %} + +{# To zoom image on hover #} +{# FAQ: Template exists to avoid adding a new model field #} +{# FAQ: Default template uses custom boolean context variables for logic #} diff --git a/taccsite_cms/templates/djangocms_picture/zoom_effect_no_link_to_ext_image/picture.html b/taccsite_cms/templates/djangocms_picture/zoom_effect_no_link_to_ext_image/picture.html new file mode 100644 index 000000000..e94d37638 --- /dev/null +++ b/taccsite_cms/templates/djangocms_picture/zoom_effect_no_link_to_ext_image/picture.html @@ -0,0 +1,5 @@ +{% extends "djangocms_picture/default/picture.html" %} + +{# To combine `zoom_effect` and `no_link_to_image` %} +{# SEE: taccsite_cms/templates/djangocms_picture/zoom_effect #} +{# SEE: taccsite_cms/templates/djangocms_picture/no_link_to_image #} diff --git a/taccsite_cms/templates/fullwidth.html b/taccsite_cms/templates/fullwidth.html index 98dab9413..13167975b 100755 --- a/taccsite_cms/templates/fullwidth.html +++ b/taccsite_cms/templates/fullwidth.html @@ -1,8 +1,9 @@ {% extends "base.html" %} {% load cms_tags %} -{# To remove container and breadcrumbs #} +{# To remove container and not render breadcrumbs #} {% block content %} + {% block breadcrumbs %}{% endblock breadcrumbs %} {% block cms_content %} {% placeholder "content" %} {% endblock cms_content %} diff --git a/taccsite_cms/templates/guide.html b/taccsite_cms/templates/guide.html index 72ec294d7..f2f68123d 100644 --- a/taccsite_cms/templates/guide.html +++ b/taccsite_cms/templates/guide.html @@ -13,7 +13,9 @@ {% block content %}
- {% include "nav_cms_breadcrumbs.html" %} + {% block breadcrumbs %} + {% include "nav_cms_breadcrumbs.html" %} + {% endblock breadcrumbs %} {% block guide %} {% placeholder "content" %} {% endblock guide %} diff --git a/taccsite_cms/templates/guides/data_transfer.globus.html b/taccsite_cms/templates/guides/data_transfer.globus.html deleted file mode 100644 index f457aef93..000000000 --- a/taccsite_cms/templates/guides/data_transfer.globus.html +++ /dev/null @@ -1,328 +0,0 @@ -{% extends "guide.html" %} -{% load static %} - -{% block guide %} - {# HACK: New markup (`
`) or some classnames may be better, but new guides/docs are coming, so I'm solving this quick #} - -
-
-

- Globus Data Transfer Guide -

- -

- Globus supplies high speed, reliable, asynchronous transfers to the portal. Globus is fast, for large volumes of data, as it uses multiple network sockets simultaneously to transfer data. It is reliable for large numbers of directories and files, as it can automatically fail and restart itself, and will only notify you when the transfers are completed successfully. -

- -

- To get these benefits there are a few setup steps you have to do beyond the normal Data Depot transfer process. Most of the steps you are only required to do once when you set up Globus to use for the first time. Several steps will need to be repeated each time you set up a new computer to use Globus for the portal. Once you are set up, you can use Globus not only for transfers to and from the portal, but also to access other cyberinfrastructure resources at TACC and around the world. -

- -

- To start using Globus, you need to do two things: Generate a unique identifier for all Globus services, and enroll the machine you are transferring data to/from with Globus (this can be your personal laptop or desktop, or a server to which you have access). Follow this one-time process to set up the Globus file transfer capability. -

- -

- PLEASE NOTE: You must use your institution’s credentials and not your personal Google account when setting up Globus. If you use a personal account, you will encounter an issue with the transfer endpoint (Frontera, Stampede2, Corral, Ranch, etcetera). -

-
-
- -
-
-

- Step 1: Retrieve and Associate a Distinguished Name (DN) with Your TACC Account -

- -

- In order for Globus to know who you are when you move data in and out of the CEP portal from your computer, or between any other pair of systems, Globus needs a unique identifier for you, which is called a “Distinguished Name”, or DN. You can generate a DN instantly for free. To create a DN, you need to log in from some authoritative source that can verify your identity, typically your university or employer. If you already have a DN from another source, you can use that. If you do not, you can associate one with your account from many of the major universities in the world via the “CI Logon” service. -

- -

- To retrieve your DN, go to - https://cilogon.org - in your browser. Select an Identity Provider from the drop-down list, and click "Log On" which will take you to the login screen for the Identity Provider you selected. If your university or employer is not in the list, we recommend - registering for an XSEDE account - as XSEDE is a CILogon Identity Provider. -

- - - - - -

- After successfully authenticating at your chosen Identity Provider, you are redirected back to CILogon, where you can find your Certificate Subject that you will need to copy and paste in the next step: -

- -
/DC=org/DC=cilogon/C=US/O=University of Texas at Austin/CN=Sample Person A00000
- -

- Login to the - TACC User Portal - and select "Account Profile" from the main menu under the "Home" dropdown. -

- - - - - -

- On the left of the page is a list of account actions, select "Manage DNs". You will be presented with a list of the DNs currently associated with your TACC account and a text field to associate a new DN to your account. Enter the Certificate Subject obtained from - CILogon.org - in the text field. Click the button to "Associate DN". This will associate the new DN with your account. Please note, it may take up to 30 minutes for this change to propagate to all TACC systems. -

- - - - -
-
- -
-
-

- Step 2: Activate Your Desktop/Laptop as a Globus Endpoint and Transfer Files -

- -

- Now that you have associated the DN with your TACC account and given the DN time to propagate to the systems (up to thirty minutes), you can activate the Globus transfer endpoints and begin transferring files. -

- -

- Go to - https://globus.org - and log in. -

- - - - - -

- Upon successful login you, you will be directed to the "File Manager" landing page. -

- - - - - -

Click on Endpoints.

- - - - - -

- Click “+ Create new endpoint” and follow the instructions to set up your desktop/laptop as an endpoint. -

- - - - - -

- Enter a Display Name to identify your local endpoint like My Laptop, My Desktop at Home, etcetera and then click Generate Setup Key and click copy to copy the Personal Setup Key. -

- -

Download and Install the Globus Connect Personal client.

- -

- After install, open the Globus Connect Personal application. A pop menu pops up asking your setup key. Copy the setup key from the previous step to complete the setup. -

- -

- Click on “File Manager”, and next click on the Collection field. You can choose "Your collections" and click on "My Laptop" to select the created endpoint to your computer. -

- - - - - -

You can now access the files on your desktop/laptop via Globus.

- - - - - -

- You can also click on Panels to look at two endpoints at the same time. In the other transfer endpoint, search for "TACC" and select the appropriate allocation storage system (Frontera, Stampede2, Corral, Ranch, etcetera) for the desired data. -

-
Examples: -
-
UTRC Portal
-
-
-
Data
My Data
-
System
TACC Stampede2
-
-
-
Data
Shared Workspaces -
System
TACC Corral 3
-
-
-
Frontera Portal
-
-
-
Data
My Data
-
System
Frontera, Longhorn, Stockyard
-
-
-
Data
Shared Workspaces -
System
Corral
-
-
-
-
- - - - - -

- After successfully authenticating, you will be redirected back to Globus and you will now be able to access your data on the allocation storage system (Frontera, Stampede2, Corral, Ranch): -

- -
    -
  • -

    To access "My Data", use the appropriate endpoint and set Path to the path of your $WORK location on your system.

    -
      -
    • -

      To find that path, run the following commands in a terminal.

      -
      localhost$ ssh username@host
      -
      -[authenticate with your password and TACC Token]
      -
      -login2(#)$ cd $WORK
      -login2(#)$ pwd
      -
    • -
    • - The output of the pwd command is your path to your $WORK directory. -
    • -
    - -
    Examples: -
    -
    Stampede
    -
    -
    -
    Endpoint
    Stampede2
    -
    Host
    stampede2.tacc.utexas.edu
    -
    -
    -
    Frontera
    -
    -
    -
    Endpoint
    Frontera
    -
    Host
    frontera.tacc.utexas.edu
    -
    -
    -
    Longhorn
    -
    -
    -
    Endpoint
    Longhorn
    -
    Host
    longhorn.tacc.utexas.edu
    -
    -
    -
    -
    -
  • -
  • -

    To access a project in "My Projects" use the appropriate endpoint and set Path to: - /path/to/storage/PORTAL/projects/PORTAL-ProjectIDNumber

    - -
    Examples: - /corral-repl/tacc/aci/FRONTERA/projects/FRONTERA-26 -
    - -
      -
    • -

      You will find the Project ID on your “My Projects” list in the second column.

      - - - - -
      Examples: -
      -
      3DEM
      -
      - - - -
      -
      A2CPS
      -
      - - - -
      -
      ECCO
      -
      - - - -
      -
      PT2050
      -
      - - - -
      -
      UTRC
      -
      - - - -
      -
      -
    • -
    • -

      If you are viewing a project, the Project ID will be appended to the URL in your browser as: -

      https://portal.domain/workbench/data/tapis/projects/portal.project.PORTAL-ProjectIDNumber
      - -
      Examples: - https://frontera-portal.tacc.utexas.edu/workbench/data/tapis/projects/frontera.project.FRONTERA-23 -
      -
    • -
    -
  • -
  • - To access "Community Data", use the appropriate endpoint and set Path to: - /path/to/portal/data/PORTAL/community/ - -
    Examples: - /corral-repl/tacc/aci/UTRC/community/, - /corral-repl/tacc/aci/Frontera/community/ -
    -
  • -
- -

- You can transfer files between the selected endpoints. -

- -

- Once the transfer is initiated, you can see the task id for the transfer being initiated. -

- -

- Click activity to check status on all the transfers you have initiated. -

- -

- You will also receive an email to the registered email address once the transfer is completed. -

-
-
-{% endblock guide %} diff --git a/taccsite_cms/templates/guides/data_transfer.html b/taccsite_cms/templates/guides/data_transfer.html deleted file mode 100644 index c06691706..000000000 --- a/taccsite_cms/templates/guides/data_transfer.html +++ /dev/null @@ -1,542 +0,0 @@ -{% extends "guide.html" %} -{% load static %} - -{% block guide %} - -
-
-

Data Transfer and Management Guide

-

Outline

- - - -

Data Transfer and Management Guide

- -

- Transferring Portal data from your local machine to - one of TACC's remote storage systems can be accomplished using two methods: command line tools (scp, sftp, - rsync) and graphical user interface (Cyberduck). -

- -

Data Transfer Methods

- - - - - - - - - - - - - - - - - - - - - - - -
Usage ModeTransfer Method
Command Line Tool - scp -
Command Line Tool - sftp -
Command Line Tool - rsync -
Graphical Tool - Cyberduck -
-

What is TACC's Storage Server?

- -

- A TACC storage system is a logically defined resource designed to provide data storage and management capabilities to TACC portal users through the portal interface. Each portal is accessible over a URL path (e.g., - sub.domain.tacc.utexas.edu - ) which we will subsequently refer to as “host”. -

- Storage systems can be configured for both normal and protected data (e.g., HIPAA) in a secured location, depending on the project requirements established for the portal. This location is exposed as a path to a directory on the secure system (e.g., - /secure-server-root/projects/directory_name - ) which this document will subsequently refer to as - /transfer/directory/path - . -

- Storage systems are to be used exclusively for transferring and accessing data through the portal. -

-

Prerequisites for Portal User

- -

There are two prerequisites for accessing a portal and transferring data:

- -
    -
  • A TACC Account
  • -
  • - Multi-Factor Authentication (MFA) pairing with the - TACC Token app -
  • -
- -

- All portal users will need to create a TACC account in the TACC User Portal (which can be accessed at - TACC Portal. - If you have forgotten your TACC account credentials, please refer to your email for a message titled “TACC Account Request Confirmation” or use the TACC Portal's - password reset form - or - username recovery form. -

-

- Access to all TACC resources requires a completed Multi-Factor Authentication pairing with your TACC credentials. To set up MFA, please reference TACC Portal's - Multi-Factor Authentication tutorial. -

-

- Using Command Line Tools to Transfer and Organize Data -

- -

- A common method of transferring files between TACC resources and/or your local machine is through the command line. -

-

- scp, sftp, & rsync -

- -

- These three command line tools are secure and can be used to accomplish data transfer. You can run these commands directly from the terminal if your local system runs Linux or macOS. -

-
-

- Note: It is possible to use these command line tools if your local machine runs Windows, but you will need to use a ssh client (ex. - PuTTY - ). -

-

- To simplify the data transfer process, it is recommended that Windows users follow the - How to Transfer Data with Cyberduck - guide as detailed below. -

-
-

- For users that are new to the command line, using either scp or sftp to transfer data is advised. -

-

- Prerequisites for Data Transfer with Command Line Tools -

- -

Before we begin, you will need to know:

- -
    -
  • the path to your data file(s) on your local system
  • -
  • the path to your transfer directory on the remote storage server
  • -
- -

- Determining the Path to Your Data File(s) on Your Local System -

- -

- In order to transfer your project data, you will first need to know where the files are located on your local system. -

-

- To do so, navigate to the location of the files on your computer. This can be accomplished on a Mac by using the Finder application or on Windows with File Explorer application. Common locations for user data at the user's home directory, the Desktop and My Documents. -

-

- Once you have identified the location of the files, you can right-click on them and select either Get Info (on Mac) or Properties (on Windows) to view the path location on your local system. -

-
- - - -
- Figure 1. Use Get Info to determine “Where” the path of your data file(s) is -
-
- -

- For example, a file located in a folder named portal-data under Documents would have the following path: -

-
-
On Mac
-
/Users/username/Documents/portal-data/my_file.txt
-
On Windows
-
\Users\username\My Documents\portal-data\my_file.txt
-
-

- Determining the Path to Your Transfer Directory -

- -

- A transfer directory on the remote storage server associated with the portal you are accessing it through will be established when your account is given access to the portal and completes the on-boarding procedure. The transfer directory path will be unique for every institution and project. -

-
Examples: - /corral-secure/projects/A2CPS/submissions/utaustin/ -
-

- If you are unsure of your transfer directory path, please consult your project PI directly. - {# FP-752: Consider referencing Portal → Data Files after the Portal User Guide is added. #} -

-

How to Transfer Data with scp

- -

- scp copies files between hosts on a network. To transfer a file (ex. my_file.txt) to the remote secure system via scp, open a terminal on your local computer and navigate to the path where your data file is located. -

-
-
On Mac
-
localhost$ cd ~/Documents/portal-data/
-
On Windows
-
localhost$ cd %HOMEPATH%\Documents\portal-data\
-
- -

- Assuming your TACC username is jdoe and you are affiliated with UT Austin, a scp transfer that pushes my_file.txt from the current directory of your local computer to the remote secure system would look like this: -

-
localhost$ scp ./my_file.txt jdoe@host:/transfer/directory/path
-
-

- Note: This command will copy your data file directly to your individualized transfer directory on the remote storage system. -

-
-

- If you have not done so already, enter this command in your terminal, - replacing the file name, TACC username, and your individualized transfer directory path appropriately. -

-

- After entering the command, you will be prompted to login to the remote secure system by entering the password associated with your TACC account as well as the token value generated from your TACC token app. -

-

- A successful data transfer will generate terminal output similar to this: -

-
my_file.txt     100% ##  #.#          KB/s   ##:##
- -

- If you wish to learn more about scp and how to synchronize your file transfer, you can do so - the online man page for scp - or follow the file transfer section of the user guide for the appropriate TACC system: -

- - -

How to Transfer Data with sftp

- -

- sftp is a file transfer program that allows you to interactively navigate between your local file system and the remote secure system. To transfer a file (ex. my_file.txt) to the remote secure system via sftp, open a terminal on your local computer and navigate to the path where your data file is located.  -

-
-
On Mac
-
localhost$ cd ~/Documents/portal-data/
-
On Windows
-
localhost$ cd %HOMEPATH%\Documents\portal-data\
-
- -

- Assuming your TACC username is jdoe and you are affiliated with UT Austin, an sftp transfer that pushes - my_file.txt - from the current directory of your local computer to the remote secure system would look like this: -

-
localhost$ sftp jdoe@host:/transfer/directory/path
-Password:
-TACC Token Code:
-Connected to host.
-Changing to:
-  /transfer/directory/path
-sftp>
- -
-

If you have not done so already, enter this command in your terminal, - replacing the TACC username and your individualized transfer directory path appropriately.

-
- -

- You are now logged into the remote secure system and have been redirected to your transfer directory. To confirm your location on the server, enter the following command: -

- -
sftp> pwd
-Remote working directory:
-  /transfer/directory/path
- -

To list the files currently in your transfer directory:

- -
sftp> ls
-utaustin_dir.txt
- -

- To list the files currently in your local directory: -

- -
sftp> lls
-my_file.txt
- -
-

- Note: The leading l in the lls command denotes that you are listing the contents of your local working directory. -

-
- -

- To transfer my_file.txt from your local computer to your transfer directory: -

- -
sftp> put my_file.txt
-Uploading my_file.txt to /transfer/directory/path
-my_file.txt     100% ##  #.#          KB/s   ##:#
- -

- To check if my_file.txt is in the utaustin - subfolder: -

- -
sftp> ls
-my_file.txt
-utaustin_dir.txt
- -

- To exit out of sftp on the terminal: -

- -
sftp> bye
-localhost1$
- -

- If you wish to learn more about sftp, you can do so - at the online man page for scp. -

- -

How to Transfer Data with rsync

- -

- rsyncis a file copying tool that can reduce the amount of data transferred by sending only the differences between the source files on your local system and the existing files in your transfer directory. To transfer a file (ex. my_file.txt) to the remote secure system via rsync, open a terminal on your local computer and navigate to the path where your data file is located. -

-
-
On Mac
-
localhost$ cd ~/Documents/portal-data/
-
On Windows
-
localhost$ cd %HOMEPATH%\Documents\portal-data\
-
-

- Assuming your TACC username is jdoe and you are affiliated with UT Austin, an rsync transfer that pushes - my_file.txt - from the current directory of your local computer to the remote secure system would look like this: -

-
localhost$ rsync ./my_file.txt jdoe@host:/transfer/directory/path
-
-

If you have not done so already, enter this command in your terminal, - replacing the TACC username and your individualized transfer directory path appropriately.

-
-

- If the command returns 0 in your terminal, the data transfer was successful. -

-

- If you wish to learn more about rsync and how to synchronize your file transfer, you can do so - the online man page for rsync - or follow the file transfer section of the user guide for the appropriate TACC system: -

- - -

How to Transfer Data with Cyberduck

- -

- Cyberduck is a free graphical user interface for data transfer and is an alternative to using the command line. With a drag-and-drop interface, it is easy to transfer a file from your local system to the remote secure system. You can use - Cyberduck - for Windows or macOS. -

-

For Windows

- -

- Download and install Cyberduck for Windows - on your local machine. -

- -

- Once installed, click “Open Connection” in the top left corner of your Cyberduck window. -

- -
- - - -
- Figure 2. Windows Cyberduck and “Open Connection” setup screen -
-
-

- To setup a connection, type in the server name, - host. Add your TACC username and password in the spaces provided. If the “More Options” area is not shown, click the small triangle button to expand the window; this will allow you to enter the path to your transfer directory, /transfer/directory/path, so that when Cyberduck opens the connection you will immediately be in your individualized transfer directory on the system. Click the “Connect” button to open your connection. -

- -

- Consult Figure 3. below to ensure the information you have provided is correct. - If you have not done so already, replace the “Path” with the path to your individualized transfer directory. -

-
- - - -
- Figure 3. Windows “Open Connection” setup screen -
-
-
-

- Note: You will be prompted to “allow unknown fingerprint…” upon connection. Select “allow” and enter your TACC token value. -

-
-

- Once connected, you can navigate through your remote file hierarchy using the graphical user interface. You may also drag-and-drop files from your local computer into the Cyberduck window to transfer files to the system. -

-

For Mac

- -

- Download and install Cyberduck for macOS - on your local machine. -

- -

- Once installed, go to “Bookmark > New Bookmark” to setup a connection. -

-
-

- Note: You cannot select “Open Connection” in the top left corner of your Cyberduck window as macOS’ setup screen is missing the “More Options” button. -

-
-

- To setup a connection using “New Bookmark", type in the server name, - host. Add your TACC username and password in the spaces provided. If the “More Options” area is not shown, click the small triangle or button to expand the window; this will allow you to enter the path to your transfer directory, /transfer/directory/path, so that when Cyberduck opens the connection you will immediately be in your individualized transfer directory on the system. As you fill out the information, Cyberduck will create the bookmark for you. Exit out of the setup screen and click on your newly created bookmark to launch the connection. -

-
- - - -
Figure 4. macOS “New Bookmark” setup screen
-
- -

- Consult Figure 4. above to ensure the information you have provided is correct. - If you have not done so already, replace the “Path” with the path to your individualized transfer directory. -

-
-

- Note: You will be prompted to “allow unknown fingerprint…” upon connection. Select “allow” and enter your TACC token value. -

-
-

- Once connected, you can navigate through your remote file hierarchy using the graphical user interface. You may also drag-and-drop files from your local computer into the Cyberduck window to transfer files to the storage system. -

- -

References

- - -
-
-{% endblock guide %} diff --git a/taccsite_cms/templates/guides/getting_started.html b/taccsite_cms/templates/guides/getting_started.html deleted file mode 100644 index f37734e1b..000000000 --- a/taccsite_cms/templates/guides/getting_started.html +++ /dev/null @@ -1 +0,0 @@ -{% extends "./getting_started.v2.html" %} diff --git a/taccsite_cms/templates/guides/getting_started.tam.html b/taccsite_cms/templates/guides/getting_started.tam.html deleted file mode 100644 index 0b2bb4ab3..000000000 --- a/taccsite_cms/templates/guides/getting_started.tam.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "guide.html" %} -{% load cms_tags static tacc_uri_shortcuts %} - -{% block guide %} - {% site_uri as site_uri %} -
-
-

Getting Started

- -

Account Holders

- -

If you already have an account, you may log in by clicking the Log in link at the top right of the page.

- -

Creating an Account

- -

Before you can access the Portal, you must first have an active account with TACC.

- -

If you are a new TACC user, you may sign up for a new TACC account.

-
-
-{% endblock guide %} diff --git a/taccsite_cms/templates/guides/getting_started.v2.html b/taccsite_cms/templates/guides/getting_started.v2.html deleted file mode 100644 index 2f58639a7..000000000 --- a/taccsite_cms/templates/guides/getting_started.v2.html +++ /dev/null @@ -1,569 +0,0 @@ -{% extends "guide.html" %} -{% load cms_tags static tacc_uri_shortcuts %} - -{% block guide %} - {% site_uri as site_uri %} -
-
-

- Getting Started -

- -

- Thank you for using TACC. If you are a new TACC user, this page will - guide you through the process of setting up an account for use with this Portal. If you are an existing user that already has an active - allocation and multi-factor authentication with the TACC Token App on - your account, then you are ready to use this portal. -

-
-
- -
-
-

Creating an Account

- -

- Before you can access the Portal, you must first have an active - account with TACC. -

- -
-
-

- Choosing institution from a form. -

-
- -
-

If you have UT System Institution Credentials, you may create a TACC account from those by first selecting your institution at - portal.tacc.utexas.edu/utdr. -

-

Otherwise, you may sign up for a new TACC account at - portal.tacc.utexas.edu/account-request. -

-
-
- -
-
-

- A login form. -

-
- -
-

Log in with your institution credentials.

-
-
- -
-
-

- A button to create a TACC account. -

-
- -
-

- You should see a page that welcomes you with your name and - institution. Click the - I need to create a TACC Account button. Complete - form. If you are eligible, check the - I am PI Eligible box. You will receive an e-mail - with a verification link. Please click on the link to verify your - account. -

-
-
-
-
- -
-
-

Requesting Access

- -

- Some projects require an allocation or other access be provided before login is possible. -

- -
-
-

- -

-
- -
-

- If you are unable to login, please inquire whether your project requires allocation before login, and if so request that allocation from an appropriate member. -

-
-
-
-
- -
-
-

Logging In for the First Time

- -

- Your initial login to the Portal begins an onboarding process. -

- -
-
-

- The Portal homepage with active login link. -

-
- -
-

- You may now log in to the Portal by navigating to - {{ site_uri.absolute_uri }}login. -

-
-
- -
-
-

- The TACC login form. -

-
- -
-

- At the authentication page, please enter your TACC username and password. -

-
-
- -
-
-

- The TACC post-login authentication approval step. -

-
- -
-

- When asked, click the Always Approve button. -

-
-
- -
-
-

- A sample Portal account onboarding in progress. -

-
- -
-

- The Portal will display the Account Setup page. This page will - verify that your account has passed several checks. These checks differ per portal, and may include: -

-
    -
  • Multi-factor Authentication (MFA) with the TACC Token App
  • -
  • Requesting access to Portal from system administrator
  • -
  • Checking or requesting project membership
  • -
  • Retrieving allocations for your account
  • -
  • Creating storage systems for your account
  • -
-

- If you already meet these requirements, you will be forwarded to the - Dashboard and you may proceed with - Accessing Your Files. - Otherwise, continue reading about - Onboarding Your Account. -

-
-
-
-
- -

Onboarding Your Account

-

- Your account will have a certain number of Account Onboarding steps. Some of them require action from you while some are automated. -

- - -
-
-

Multi-Factor Authentication

-

- Your account may need to have Multi-Factor Authentication (MFA) setup - using the TACC Token App, available on the Google Play and iTunes - stores. -

- -
-
-

- A sample Portal account onboarding with 'Multi-Factor Authentication' step pending action. -

-
- -
-

- If you have already set up MFA pairing through the TACC Token App, then click Confirm MFA Pairing. -

-
-
- -
-
-

- A sample modal dialog UI explaining the next step of 'Multi-Factor Authentication'. -

-
- -
-

- If you have not set up MFA pairing through the TACC Token App, then set up multi-factor authentication in your - TACC Portal Account Profile. -

-
-
- -
-
-

- A illustration of a mobile phone, a temporary token on its screen, the TACC logo, and references to visit Apple's or Google's app marketplace. -

-
- -
-

- To set up multi-factor authentication, pair your - TACC Portal Account - with the TACC Token App. -

-
-
- -
-
-

- A sample Portal account onboarding with 'Multi-Factor Authentication' step in progress. -

-
- -
-

- Once you have completed MFA pairing with the TACC Token app, return to the - Account Onboarding. -

-
-
- -
-
-

- A sample Portal account onboarding with 'Multi-Factor Authentication' step complete. -

-
- -
-

- Your account is now authenticated. You may proceed to the next step of the Account Onboarding. -

-
-
- -
- -

Requesting Access

-

- To use the Portal, you may need to have an active allocation on - TACC resources. If you are PI eligible, you may request your own allocations. Alternatively (if you do not already have an active allocation), you may request access to an existing allocation during the - Account Onboarding - process. -

- -
-
-

- A sample Portal account onboarding with 'Requesting Access' step pending action. -

-
- -
-

- If you are a new TACC user that does not have an active project, you may request to be added to one. Please click Request Portal Access in the Account Onboarding. A request to be added to an allocation will be generated on your behalf. -

-
-
- -
-
-

- A sample Portal account onboarding with 'Requesting Access' step in progress. -

-
- -
-

Your request will be reviewed by TACC staff. When you have been approved, you will receive an e-mail notification.

-
-
- -
-
-

- A sample Portal account onboarding with 'Requesting Access' step complete. -

-
- -
-

- Your account now has an allocation on the necessary TACC resources. You may proceed to the next step of the Account Onboarding. -

-
-
- -
- -

Checking Project Membership

-

- To use the Portal, you may need to have memebrship on a project. If you are PI eligible, you may request your own project. Alternatively, you may request to be added to a project through the - Account Onboarding. -

- -
-
-

- A sample Portal account onboarding with 'Checking Project Membership' step pending action. -

-
- -
-

- If you are a new TACC user that does not have an active project, you may request to be added to one. Please click Request Project Access in the Account Onboarding. A request to be added to a project will be generated on your behalf. -

-
-
- -
-
-

- A sample Portal account onboarding with 'Checking Project Membership' step in progress. -

-
- -
-

Your request will be reviewed by TACC staff. When you have been approved, you will receive an e-mail notification.

-
-
- -
-
-

- A sample Portal account onboarding with 'Checking Project Membership' step complete. -

-
- -
-

- Your account now has access to a project on the Portal. You may proceed to the next step of the Account Onboarding. -

-
-
- -
- -

Other Steps

-

- Onboarding for the specific Portal you use may require additional Account Onboarding steps, like: -

-
    -
  • Retrieving Allocations
  • -
  • Creating Storage Systems
  • -
- -
-
-

- A sample Portal account onboarding with all steps complete. -

-
- -
-

- Please follow the Account Onboarding until all steps are complete. -

-

- Once your Account Onboarding is complete, you may click - Access Dashboard, or navigate to the Dashboard with the now-enabled sidebar. -

-
-
-
-
- -
-
-

Accessing Your Files

- -

- To access your personal files on the Portal, you will need to - Authenticate with TACC using the TACC Token App. -

- -
-
-

- The primary and secondary navigation within the Portal interface: 'Data Files' section is active, 'My Data (Frontera)' is active. -

-
- -
-

- In the Portal Dashboard, click the Data Files icon on the left navigation. You will be taken to My Data. -

-
-
- -
-
-

- A warning message about file access that suggests user to 'push their keys'. -

-
- -
-

- You will be asked to Authenticate with TACC Token before you are able to access your files. Click the Authenticate with TACC Token button. -

-
-
- -
-
-

- A form with all of its fields autopoulated except for 'Password' and 'TACC Token'. -

-
- -
-

- In the window that appears, enter your password and a token from the TACC Token App. Then click Authenticate. -

-
-
- -
-
-

- The full Portal interface when viewing 'Data Files' → 'My Data (Frontera)' with no files. -

-
- -
-

- Upon success, you can access your personal files on My Data. If you are a first time user, then you may not have any files yet. -

-
-
-
-
-{% endblock guide %} diff --git a/taccsite_cms/templates/guides/getting_started.v3.html b/taccsite_cms/templates/guides/getting_started.v3.html deleted file mode 100644 index 0e78e8ad9..000000000 --- a/taccsite_cms/templates/guides/getting_started.v3.html +++ /dev/null @@ -1,131 +0,0 @@ -{% extends "guide.html" %} - -{% load cms_tags static tacc_uri_shortcuts %} - -{% block guide %} -
-
-

Getting Started

- -

Account Holders

- -

If you already have an account, you may log in by clicking the Log in link at the top right of the page.

- -

Creating an Account

- -

Before you can access the Portal, you must first have an active account with TACC.

- -

If you are a new TACC user, you may create an account or request an alloction. Then you will need to return to this page.

-
-
-
-
-

Logging In for the First Time

-

Your initial login to the Portal begins an onboarding process.

-
-
-

The Portal homepage with active login link.

-
-
-

You may now log in to the Portal by clicking the Log in link at the top right of the page.

-
-
-
-
-

The TACC/TAPIs login form.

-
-
-

At the authentication page, please enter your TACC username and password.

-
-
-
-
-

The TACC/TAPIs approval step.

-
-
-

When asked, click the Connect button.

-
-
-
-
-
-
-

Requesting Access

-

To use the Portal, you may need to have an active allocation on TACC resources. If you are PI eligible, - you may request your own allocations.

-
-
-

A sample Portal account onboarding with 'Requesting Access' step pending action.

-
-
-

If you are a new TACC user that does not have an active project, you may request to be added to one. Please click Request Portal Access in the Account Onboarding. A request to be added to an allocation will be generated on your behalf.

-
-
-
-
-

A sample Portal account onboarding with 'Requesting Access' step in progress.

-
-
-

Your request will be reviewed by TACC staff. When you have been approved, you will receive an e-mail notification.

-
-
-
-
-

A sample Portal account onboarding with 'Requesting Access' step complete.

-
-
-

Your account now has an allocation on the necessary TACC resources. You may proceed to the next step.

-
-
-
-
-
-
-

Checking Project Membership

-

To use the Portal, you may need to have memebrship on a project. If you are PI eligible, you may - request your own project. Alternatively, you may request to be added to a project through the Account Onboarding.

-
-
-

A sample Portal account onboarding with 'Checking Project Membership' step pending action.

-
-
-

If you are a new TACC user that does not have an active project, you may request to be added to one. Please click Request Project Access in the Account Onboarding. A request to be added to a project will be generated on your behalf.

-
-
-
-
-

A sample Portal account onboarding with 'Checking Project Membership' step in progress.

-
-
-

Your request will be reviewed by TACC staff. When you have been approved, you will receive an e-mail notification.

-
-
-
-
-

A sample Portal account onboarding with 'Checking Project Membership' step complete.

-
-
-

Your account now has access to a project on the Portal. You may proceed to the next step of the Account Onboarding.

-
-
-
-
-
-
-

Other Steps

-

Onboarding for the specific Portal you use may require additional onboarding steps, like:

-
    -
  • Creating Storage Systems
  • -
-
-
-

A sample Portal account onboarding with all steps complete.

-
-
-

Please follow the Account Onboarding until all steps are complete.

-

Once your Account Onboarding is complete, you may click Access Dashboard, or navigate to the Dashboard with the now-enabled sidebar.

-
-
-
-
-{% endblock guide %} diff --git a/taccsite_cms/templates/guides/portal_technology.html b/taccsite_cms/templates/guides/portal_technology.html deleted file mode 100644 index f21ebebd2..000000000 --- a/taccsite_cms/templates/guides/portal_technology.html +++ /dev/null @@ -1,176 +0,0 @@ -{% extends "guide.html" %} - -{% block guide %} -

Portal Technology Stack

- -

Portal Overview

- -

The TACC CEP, short for Core Experience Portal, is the core engine for all TACC portal projects. The primary objective for the Core Experience Portal is to establish and grow a codebase that can be used as a common baseline for all future portal projects undertaken at TACC. By cultivating this common codebase for all of our portal projects, we maintain better alignment between the core capabilities and technologies supported across all of the TACC portals. While some projects do have unique requirements, CEP provides an "out-of-the-box" framework for rapidly deploying a ready-to-use project infrastructure that includes all the common TACC portal capabilities pre-configured and in compliance with TACC's current best practices.

- -

Common Portal Capabilities

- -
    -
  • Dedicated VM resources for each portal (varies by portal requirements).
  • -
  • An Isolated Tenant for seamless integration of the portal into the TACC ecosystem.
  • -
  • A CMS for adding and editing content within static portal pages.
  • -
  • Integrated Search capability using a variety of available technologies.
  • -
  • An Issue Tracking & Ticketing System integrated into the TACC RT ticketing system.
  • -
  • User Authentication and onboarding controls for portal access (requires a TACC account).
  • -
  • A user Dashboard to monitor project activity and resource utilization.
  • -
  • A shared Community Data storage system for collaborative data access.
  • -
  • A Private Data storage system for an individual user's data.
  • -
  • Execution Systems for running applications on TACC resources.
  • -
  • An Application Launcher for accessing public and private applications.
  • -
  • A shared My Projects storage system for non-public group projects.
  • -
  • A Public Data storage area for unauthenticated access to published work or data sets.
  • -
- -

CEP Major Components

- -
    -
  • CMS (Content Management System)
  • -
  • My Account
  • -
  • Dashboard
  • -
  • Data Files
  • -
  • Applications
  • -
  • Search
  • -
  • Notifications
  • -
  • Allocations
  • -
  • Jobs History
  • -
  • Systems Status
  • -
  • Portal Documentation & Guides
  • -
- -

Note: Any additional portal capabilities required by a project need to be identified and planned for independently.

- -

High-level Architecture

- -

The portal architecture operates in a tiered structure. Listed below in order from the outermost-tier and going inward, they are:

- -
-
Layer 4
-
The user-facing web portal that enables users to interact with TAPIS through a browser-based GUI.
- -
Layer 3
-
The TAPIS API that exposes access to Layer 2 and Layer 1 resources over a RESTful API as well as via a CLI for programmatic interaction with resources.
- -
Layer 2
-
The middleware service that enables data management, job creation, and job scheduling (e.g. Slurm, Kubernetes) across all Layer 1 resources.
- -
Layer 1
-
The physical infrastructure (storage, HPC and cloud systems) where data and applications are stored, manipulated, and executed (Corral, Frontera, Stampede2, Lonestar6, etc.).
-
- - {% comment %} Need an updated diagram for portal architecture still. {% endcomment %} - {% comment %}

- Portal high-level architecture diagram as a triangle pointing up and segmented into four layers, where the top is layer 4 and the bottom is layer 1 -

{% endcomment %} - -

Backend (Server-side)

- -
-
TAPIS
-
The TAPIS Project is an open source, science-as-a-service API platform that provides HPC and file management integration. TAPIS, short for TACC APIs, is developed and maintained by TACC.
- -
HPC Connectivity
-
From within the portal access to HPC systems is primarily through TAPIS. TAPIS calls in turn submit jobs through Slurm. Multiple platforms are used based on the particular application (or based on availability) -- Frontera, Lonestar6 and Stampede2 are the primary target platforms for application deployments.
- -
File Storage
-
Files are stored on Corral, a mirrored GPFS storage facility, and backed up to Ranch, TACC's long term tape-based storage system. From the web interface, all file I/O is done through TAPIS calls, to maintain consistent metadata. Users also have the option to upload through Globus online, or through public cloud storage facilities like Dropbox, Box, Google Drive. Cloud-based data imports are called through TAPIS in order to maintain consistent metadata within the TACC ecosystem.
- -
Applications
-
Portal applications are installed on the execution systems (the HPC platforms) or in containers that run on virtual infrastructure. Applications are then registered with the TAPIS API where they are defined as TAPIS application records, pointing to a zip file on Corral collocated with the application's associated metadata records. A JSON document for each application defines the UI exposed in the Portal. Runtime instruction inputs are supplied by the jobs created by portal users through TAPIS. TAPIS also supplies callbacks for updates on job statuses.
- -
API
-
The API manager (APIM) sits in front of TAPIS core and handles user authentication/authorization, proxying/routing, client management, analytics, rate limiting, and many other features. It provides a unified namespace for the entire API to be hosted under.
- -
Projects API
-
This API returns project listings and associated files utilizing the Django framework.
-
- -

Frontend (Client-side)

- -

A web-based portal using TAPIS to manage apps, data storage, reconfigurable workflows, and HPC resource interactions. The architecture for the web portal provides data management, analysis, and simulation capabilities to users through a unified web interface. The dashboard provides an overview of jobs, data storage, allocations, and system resource status. Users will primarily interact with the portal under the My Account view or the My Dashboard view, which includes dedicated interfaces for Data Files, Applications, Allocations, History, and System Status.

- -
-
My Account
-
This view provides information about the user's profile, password management, activated licenses for applications, and integrated third-party applications/resources.
- -
Dashboard
-
-

The dashboard presents users with a unified interface to enable their research.

-
-
Data Files
-
This view is where users can manage their data and shared data resources.
-
Applications
This view allows users to select and execute various applications (both remote execution and interactive jobs).
-
Allocations
This view allows users to view and request available allocation resources for their projects as well as monitor who has access to said resources.
-
History
This view logs all jobs the user has executed (or is currently executing) with options to view the job details and output location.
-
System Status
This view displays detailed operational status information about the available HPC systems, including queue states, jobs currently running/waiting in queue, and the number of idle nodes on the resource.
-
-
- -
Data Files
-
-

Data Files is a collection of storage spaces where user and project data are located, stored, and organized by users to curate publications and share information. These storage systems are integrated into the portal such that users can store research and experimental or collected data for ongoing projects, share their data with other portal users to foster collaboration on unpublished research, use their data as inputs for scheduled jobs or interactive analysis, and in some cases share the findings with the public. There are five categories of storage system in the portal:

-
-
My Data
These systems can exist on Work or Scratch. These systems host data that is only accessible to the authenticated portal user. This is the default storage system for all application output data. Within the MyData space, users can organize, manipulate, view, and copy the data to other storage resources.
-
Shared Workspaces
Displays any workspaces the user has created or that another user has shared with the user. Within this context, files associated with a specific project can be manipulated, tagged, organized, and published through the Data Curation workflow, where publications automatically receive a DOI.
-
Community Data
Displays non-curated user-contributed data shared with all users who have access to the portal.
-
Public Data
Exposes curated data for making research findings publicly available.
-
Cloud storage
These systems expose third-party storage resources that have been integrated into the portal user's account (i.e. - Google Drive, Box, UT Box).
-
-
- -
Applications
-
-

Applications are executable code available for invocation through the TAPIS Jobs service on a specific execution system. If a single code needs to be run on multiple systems, each combination and system needs to be defined as an app. Code that can be forked at the command line or submitted to a batch scheduler can be registered as a TAPIS app and run through the Jobs service. The user sends a request by populating the application inputs and job details in the portal. Applications are packed as three distinct components:

-
-
App.json
A JSON file with application definitions and input parameters (i.e. name, version, label).
-
Wrapper.sh
A shell script which executes the job on the targeted resource (i.e. an HPC system or virtualized container).
-
Test.sh
A test script that is run before the job is launched to validate job inputs and parameters.
-
-
- -
Notifications
-
The dashboard includes a notification icon (to the right of the History menu link) that indicates the number of unviewed notifications the use has. Selecting the history area enables the user to view the status and detailed information about all submitted jobs.
- -
Search
-
CEP has a multi-tenant capable full-text search engine based on ElasticSearch and Google. Users can search for data files or text that appears on static content pages in the CMS or within the names of files that are stored on the available storage systems for the given user.
-
- -

Environment

- -

The Core portal utilizes a wide variety of technologies developed by multiple technology vendors. Below is a list of the primary libraries, frameworks and APIs leveraged in the core portal tech stack.

- -
-
React
-
The JavaScript framework providing all client-side functionality. This is the broswer-based client the user interacts with when accessing the portal.
- -
NginX
-
The nginx webserver is as a proxy for all portal users, acting as intermediary for requests from clients seeking resources from the server. Nginx routes requests to the appropriate backend server.
- -
WSGI
-
Web Server Gateway Interface, a calling convention for a web hosting server to forward requests to web applications or frameworks written in the Python programming language. It forwards the CEP user request to DjangoCMS and Django as appropriate.
- -
DjangoCMS
-
The Content Management System used in the core portal architecture for all static web content and portal project branding.
- -
Django
-
A backend server application framework that manages the requests and response cycle. Django provides all of the functionality (exposed via the React client) for interacting with the TACC ecosystem, TAPIS APIs and any integrated portal resources.
- -
PostgreSQL
-
The object-relational database management system that supports all CEP portals.
- -
TAPIS Project
-
TAPIS is an open source, science-as-a-service API platform, to securely manage data/metadata, and expose high performance computing (HPC) resources under a single, web-friendly REST API. The TAPIS API simplifies building web portals that use back-end computing and run remote jobs against execution systems.
- -
RabbitMQ
-
The portal Message Broker, RabbitMQ provides enterprise messaging system modeled on the Advanced Message Queuing Protocol (AMQP) standard. It functions as a message broker that acts as an intermediary platform to processing communication between two applications (in this case between Django and Celery Workers, which execute all tasks asynchronously for the portal).
- -
Celery
-
A Distributed message passing queue for distributing asynchronous processes across execution resources to enable non-blocking code execution in Django and support SPA-like behavior in the React client.
- -
HPC
-
High Performance Computers are the primary resource available at TACC in the form of Frontera, Stampede2, and Longhorn6, to name only a few available HPC systems. Different projects target different HPC resources based on the kind of research and code execution workflows required by each individual project.
-
-{% endblock guide %} diff --git a/taccsite_cms/templatetags/strip_class_attribute.py b/taccsite_cms/templatetags/strip_class_attribute.py new file mode 100644 index 000000000..24a55b428 --- /dev/null +++ b/taccsite_cms/templatetags/strip_class_attribute.py @@ -0,0 +1,22 @@ +from django import template +import re + +register = template.Library() + +@register.filter +def strip_class_attribute(attributes_str): + """ + Remove class attribute from an HTML attributes string. + Usage: {{ instance.attributes_str|strip_class_attribute|safe }} + """ + if not attributes_str: + return "" + + # To remove `class="…"` or anything equivalent + pattern = r'(? [!NOTE] -> This directory is a vestige of archived [Core CMS Resources](https://github.com/TACC/Core-CMS-Resources/tree/151ef91f) and we may re-evaluate whether to continue to use it. +> This directory is a vestige of archived [Core CMS Resources](https://github.com/TACC/Core-CMS-Resources/tree/151ef91f).