fix add to front location on member page
This commit is contained in:
@@ -231,6 +231,8 @@ def add_to_front(mid,location):
|
||||
|
||||
if location == "home":
|
||||
return redirect(url_for('index'))
|
||||
elif location == "mid":
|
||||
return redirect(url_for('home.page', mid=mid))
|
||||
else:
|
||||
return redirect(url_for('home.full_list'))
|
||||
|
||||
@@ -248,6 +250,8 @@ def remove_front(mid, location):
|
||||
|
||||
if location == "home":
|
||||
return redirect(url_for('index'))
|
||||
elif location == "mid":
|
||||
return redirect(url_for('home.page', mid=mid))
|
||||
else:
|
||||
return redirect(url_for('home.full_list'))
|
||||
|
||||
@@ -270,6 +274,8 @@ def add_to_home(mid, location):
|
||||
|
||||
if location == "home":
|
||||
return redirect(url_for('index'))
|
||||
elif location == "mid":
|
||||
return redirect(url_for('home.page', mid=mid))
|
||||
else:
|
||||
return redirect(url_for('home.full_list'))
|
||||
|
||||
@@ -282,6 +288,8 @@ def remove_home(mid,location):
|
||||
|
||||
if location == "home":
|
||||
return redirect(url_for('index'))
|
||||
elif location == "mid":
|
||||
return redirect(url_for('home.page', mid=mid))
|
||||
else:
|
||||
return redirect(url_for('home.full_list'))
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{% else %}
|
||||
|
||||
{% if g.user %}
|
||||
<a href="{{url_for('manage.edit', mid=member[0])}}">Edit member</a> ☆ {% if member[8]==0 %}<a href="{{ url_for('manage.add_to_front', mid=member[0],location='home') }}">Add to Front</a>{% else %}<a href="{{ url_for('manage.remove_front', mid=member[0],location='home') }}">Remove from Front</a>{% endif %} ☆ {% if member[7]==0 %}<a href="{{ url_for('manage.add_to_home', mid=member[0],location='home') }}">Pin to Homepage</a>{% else %}<a href="{{ url_for('manage.remove_home', mid=member[0],location='home') }}">Unpin from Homepage</a>{% endif %}
|
||||
<a href="{{url_for('manage.edit', mid=member[0])}}">Edit member</a> ☆ {% if member[8]==0 %}<a href="{{ url_for('manage.add_to_front', mid=member[0],location='mid') }}">Add to Front</a>{% else %}<a href="{{ url_for('manage.remove_front', mid=member[0],location='mid') }}">Remove from Front</a>{% endif %} ☆ {% if member[7]==0 %}<a href="{{ url_for('manage.add_to_home', mid=member[0],location='mid') }}">Pin to Homepage</a>{% else %}<a href="{{ url_for('manage.remove_home', mid=member[0],location='mid') }}">Unpin from Homepage</a>{% endif %}
|
||||
<br class="clear" />
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user