Remove /about endpoint
This commit is contained in:
parent
7a6e1d3386
commit
11197e669c
@ -432,32 +432,6 @@ def search(project_url):
|
|||||||
og_picture=project.picture_header)
|
og_picture=project.picture_header)
|
||||||
|
|
||||||
|
|
||||||
@blueprint.route('/<project_url>/about')
|
|
||||||
def about(project_url):
|
|
||||||
"""About page of a project"""
|
|
||||||
|
|
||||||
# TODO: Duplicated code from view function, we could re-use view instead
|
|
||||||
|
|
||||||
api = system_util.pillar_api()
|
|
||||||
project = find_project_or_404(project_url,
|
|
||||||
embedded={'header_node': 1},
|
|
||||||
api=api)
|
|
||||||
|
|
||||||
# Load the header video file, if there is any.
|
|
||||||
header_video_file = None
|
|
||||||
header_video_node = None
|
|
||||||
if project.header_node and project.header_node.node_type == 'asset' and \
|
|
||||||
project.header_node.properties.content_type == 'video':
|
|
||||||
header_video_node = project.header_node
|
|
||||||
header_video_file = utils.get_file(project.header_node.properties.file)
|
|
||||||
header_video_node.picture = utils.get_file(header_video_node.picture)
|
|
||||||
|
|
||||||
return render_project(project, api,
|
|
||||||
extra_context={'title': 'about',
|
|
||||||
'header_video_file': header_video_file,
|
|
||||||
'header_video_node': header_video_node})
|
|
||||||
|
|
||||||
|
|
||||||
@blueprint.route('/<project_url>/edit', methods=['GET', 'POST'])
|
@blueprint.route('/<project_url>/edit', methods=['GET', 'POST'])
|
||||||
@login_required
|
@login_required
|
||||||
def edit(project_url):
|
def edit(project_url):
|
||||||
|
@ -35,7 +35,7 @@ meta(name="twitter:description", content="{{project.summary}}")
|
|||||||
data-toggle="tooltip",
|
data-toggle="tooltip",
|
||||||
data-placement="left",
|
data-placement="left",
|
||||||
class="{% if title == 'about' %}active {% endif %}{% if project.picture_square %}image{% endif %}")
|
class="{% if title == 'about' %}active {% endif %}{% if project.picture_square %}image{% endif %}")
|
||||||
a(href="{{url_for('projects.about', project_url=project.url, _external=True)}}")
|
a(href="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
||||||
#project-loading
|
#project-loading
|
||||||
i.pi-spin
|
i.pi-spin
|
||||||
| {% if project.picture_square %}
|
| {% if project.picture_square %}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
data-toggle="tooltip",
|
data-toggle="tooltip",
|
||||||
data-placement="left",
|
data-placement="left",
|
||||||
class="{% if title == 'about' %}active {% endif %}{% if project.picture_square %}image{% endif %}")
|
class="{% if title == 'about' %}active {% endif %}{% if project.picture_square %}image{% endif %}")
|
||||||
a(href="{{url_for('projects.about', project_url=project.url, _external=True)}}")
|
a(href="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
||||||
#project-loading
|
#project-loading
|
||||||
i.pi-spin
|
i.pi-spin
|
||||||
| {% if project.picture_square %}
|
| {% if project.picture_square %}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
data-toggle="tooltip",
|
data-toggle="tooltip",
|
||||||
data-placement="left",
|
data-placement="left",
|
||||||
class="{% if title == 'about' %}active {% endif %}{% if project.picture_square %}image{% endif %}")
|
class="{% if title == 'about' %}active {% endif %}{% if project.picture_square %}image{% endif %}")
|
||||||
a(href="{{url_for('projects.about', project_url=project.url, _external=True)}}")
|
a(href="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
||||||
#project-loading
|
#project-loading
|
||||||
i.pi-spin
|
i.pi-spin
|
||||||
| {% if project.picture_square %}
|
| {% if project.picture_square %}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
data-toggle="tooltip",
|
data-toggle="tooltip",
|
||||||
data-placement="left",
|
data-placement="left",
|
||||||
class="{% if title == 'about' %}active {% endif %}{% if project.picture_square %}image{% endif %}")
|
class="{% if title == 'about' %}active {% endif %}{% if project.picture_square %}image{% endif %}")
|
||||||
a(href="{{url_for('projects.about', project_url=project.url, _external=True)}}")
|
a(href="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
||||||
#project-loading
|
#project-loading
|
||||||
i.pi-spin
|
i.pi-spin
|
||||||
| {% if project.picture_square %}
|
| {% if project.picture_square %}
|
||||||
|
@ -34,7 +34,7 @@ script.
|
|||||||
.fp-waiting
|
.fp-waiting
|
||||||
i.pi-spin.spin
|
i.pi-spin.spin
|
||||||
| {% elif project.picture_header %}
|
| {% elif project.picture_header %}
|
||||||
a(href="{{ url_for( 'projects.about', project_url=project.url) }}")
|
a(href="{{ url_for( 'projects.view', project_url=project.url) }}")
|
||||||
img.header(src="{{ project.picture_header.thumbnail('l', api=api) }}")
|
img.header(src="{{ project.picture_header.thumbnail('l', api=api) }}")
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
@ -52,13 +52,13 @@ script.
|
|||||||
|
|
||||||
.node-details-title
|
.node-details-title
|
||||||
h1
|
h1
|
||||||
a(href="{{ url_for( 'projects.about', project_url=project.url) }}") {{ project.name }}
|
a(href="{{ url_for( 'projects.view', project_url=project.url) }}") {{ project.name }}
|
||||||
|
|
||||||
.node-details-description
|
.node-details-description
|
||||||
| {{ project.summary }}
|
| {{ project.summary }}
|
||||||
|
|
||||||
| {# Until we implement urls for pages
|
| {# Until we implement urls for pages
|
||||||
a.learn-more(href="{{ url_for( 'projects.about', project_url=project.url) }}") LEARN MORE
|
a.learn-more(href="{{ url_for( 'projects.view', project_url=project.url) }}") LEARN MORE
|
||||||
| #}
|
| #}
|
||||||
|
|
||||||
.node-extra
|
.node-extra
|
||||||
|
Loading…
x
Reference in New Issue
Block a user