fix: Deprecate profile page

- Route to My Account page
This commit is contained in:
Faris Ansari 2019-01-26 16:09:30 +05:30
parent 48cfc6b5ec
commit fd3bb6159e
6 changed files with 27 additions and 80 deletions

View file

@ -54,7 +54,8 @@ web_include_css = [
website_route_rules = [
{"from_route": "/blog/<category>", "to_route": "Blog Post"},
{"from_route": "/kb/<category>", "to_route": "Help Article"},
{"from_route": "/newsletters", "to_route": "Newsletter"}
{"from_route": "/newsletters", "to_route": "Newsletter"},
{"from_route": "/profile", "to_route": "me"},
]
write_file_keys = ["file_url", "file_name"]

View file

@ -37,8 +37,10 @@ id="page-{{ name or route }}" data-path="{{ pathname }}" {%- if page_or_generato
{% if show_sidebar %}
<div class="container">
<div class="row" {{ container_attributes() }}>
<div class="pt-4 col-sm-2 border-right sidebar-column">
<div class="pt-4 col-sm-2 border-right sidebar-column d-none d-sm-block">
{% block page_sidebar %}
{% include "templates/includes/web_sidebar.html" %}
{% endblock %}
</div>
<div class="col-sm-10 main-column">
{{ main_content() }}

View file

@ -2,7 +2,7 @@
{% block title %}About Us{% endblock %}
{% block page_sidebar %}
{% include "templates/pages/web_sidebar.html" %}
{% include "templates/includes/web_sidebar.html" %}
{% endblock %}
{% block page_content %}

View file

@ -3,48 +3,27 @@
{% block title %}{{ _("My Account") }}{% endblock %}
{% block header %}<h1>{{ _("My Account") }}</h1>{% endblock %}
{% block page_sidebar %}
{% include "templates/pages/web_sidebar.html" %}
{% endblock %}
{% block page_content %}
<!-- no-cache -->
<div class="row your-account-info hidden-xs" style="min-height: 400px; padding-bottom: 50px;">
<div class="row your-account-info d-none d-sm-block">
<div class="col-sm-4">
<span class="user-image-myaccount"></span>
<div>
<ul class="list-unstyled">
<li><a href="/update-password">
<h6 class="text-muted">{{ _("Reset Password") }}</h6>
</a></li>
<li><a href="/update-profile?name={{ user }}">
<h6 class="text-muted">{{ _("Edit Profile") }}</h6>
</a></li>
<li><a href="/third_party_apps">
<h6 class="text-muted">{{ _("Manage Third Party Apps") }}</h6>
</a></li>
</ul>
</div>
</div>
<div class="col-sm-8 pull-left">
<div class="row">
<div class="col-xs-4 text-right text-muted">{{ _("Name") }}</div>
<div class="col-xs-8">{{ fullname }}</div>
</div>
<ul class="list-unstyled">
<li><a href="/update-password">{{ _("Reset Password") }}</a></li>
<li><a href="/update-profile?name={{ user }}">{{ _("Edit Profile") }}</a></li>
<li><a href="/third_party_apps">{{ _("Manage Third Party Apps") }}</a></li>
</ul>
</div>
</div>
<div class="col-xs-12 hide" style="min-height: 400px; padding: 10px 0 0 0">
<ul class="list-group">
<a class="list-group-item" href="/profile">
{{ _("Profile") }}
</a>
{% for item in sidebar_items -%}
<a class="list-group-item" href="{{ item.route }}"
{% if item.target %}target="{{ item.target }}"{% endif %}>
{{ _(item.title or item.label) }}
</a>
{%- endfor %}
</ul>
<div class="row d-block d-sm-none">
<div class="col-12">
<ul class="list-group">
{% for item in sidebar_items -%}
<a class="list-group-item" href="{{ item.route }}"
{% if item.target %}target="{{ item.target }}"{% endif %}>
{{ _(item.title or item.label) }}
</a>
{%- endfor %}
</ul>
</div>
</div>
{% endblock %}

View file

@ -1,35 +0,0 @@
{% extends "templates/web.html" %}
{% block title %}{{ _("Profile") }}{% endblock %}
{% block header %}<h1>{{ _("Profile") }}</h1>{% endblock %}
{% block page_sidebar %}
{% include "templates/pages/web_sidebar.html" %}
{% endblock %}
{% block page_content %}
<div class="row your-account-info {% if pathname=="me" %} hidden-xs {% endif %} " style="min-height: 400px; padding-bottom: 50px;">
<div class="col-sm-4">
<span class="user-image-myaccount"></span>
<div>
<ul class="list-unstyled">
<li><a href="/update-password">
<h6 class="text-muted">{{ _("Reset Password") }}</h6>
</a></li>
<li><a href="/update-profile?name={{ user }}">
<h6 class="text-muted">{{ _("Edit Profile") }}</h6>
</a></li>
</ul>
</div>
</div>
<div class="col-sm-8 pull-left">
<div class="row">
<div class="col-xs-4 text-right text-muted">{{ _("Name") }}</div>
<div class="col-xs-8">{{ fullname }}</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -6,7 +6,7 @@
{% endblock %}
{% block page_sidebar %}
{% include "templates/pages/web_sidebar.html" %}
{% include "templates/includes/web_sidebar.html" %}
{% endblock %}
{% block style %}
@ -54,7 +54,7 @@
</div>
{% endfor %}
{% else %}
<div class="text-center text-muted">
<div class="text-muted">
{{ _("No Active Sessions")}}
</div>
{% endif %}