Skip to content

Commit

Permalink
task/tup551 Hide published text unless editing (#763)
Browse files Browse the repository at this point in the history
* Adds in setting to hide published keyword before date

* Adds in setting to hide published keyword before date when not editing

---------

Co-authored-by: Wesley B <[email protected]>
  • Loading branch information
R-Tomas-Gonzalez and wesleyboar authored Dec 13, 2023
1 parent 5cbc532 commit 4baae4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions taccsite_cms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ def gettext(s): return s

TACC_BLOG_SHOW_CATEGORIES = True
TACC_BLOG_SHOW_TAGS = True
TACC_BLOG_SHOW_PUB_TEXT = True
# To flag posts of certain category or tag, so template can take special action
TACC_BLOG_CUSTOM_MEDIA_POST_CATEGORY = 'sample_value_e_g__mutlimedia__'
TACC_BLOG_SHOW_ABSTRACT_TAG = 'sample_value_e_g__redirect__'
Expand Down Expand Up @@ -698,6 +699,7 @@ def get_subdirs_as_module_names(path):
'GOOGLE_ANALYTICS_PRELOAD',
'TACC_BLOG_SHOW_CATEGORIES',
'TACC_BLOG_SHOW_TAGS',
'TACC_BLOG_SHOW_PUB_TEXT',
'TACC_CORE_STYLES_VERSION',
'TACC_BLOG_CUSTOM_MEDIA_POST_CATEGORY',
'TACC_BLOG_SHOW_ABSTRACT_TAG',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
{# /TACC #}
{# TACC (add <span> and &nbsp; so whitespace can be stripped): #}
{# TACC ("Published" vs "To be published"): #}
<span>{% if post.publish %}{% trans "Published" %}{% else %}{% trans "To be published" %}{% endif %}</span>&nbsp;
{% if settings.TACC_BLOG_SHOW_PUB_TEXT %}
<span>{% if post.publish %}{% trans "Published" %}{% else %}{% trans "To be published" %}{% endif %}</span>&nbsp;
{% endif %}
{# /TACC #}
{# /TACC #}
{# TACC (wrap with <time> tag because it should be so): #}
Expand Down

0 comments on commit 4baae4d

Please sign in to comment.