mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 14:50:29 +00:00
Merge branch 'feature/payment'
This commit is contained in:
@@ -138,6 +138,7 @@ table {
|
|||||||
table-layout:fixed;
|
table-layout:fixed;
|
||||||
margin:8px 0 40px;
|
margin:8px 0 40px;
|
||||||
}
|
}
|
||||||
|
caption {font-size:1.1em; font-weight:bold; margin-bottom:.6em;}
|
||||||
th {
|
th {
|
||||||
text-align:left;
|
text-align:left;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
@@ -2235,3 +2236,6 @@ textarea:-moz-placeholder {/* for FF */
|
|||||||
.search-results-item .time {
|
.search-results-item .time {
|
||||||
color:#666;
|
color:#666;
|
||||||
}
|
}
|
||||||
|
#plan-form {
|
||||||
|
width:260px;
|
||||||
|
}
|
@@ -23,12 +23,12 @@
|
|||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<h3 class="info-item-top">{% trans "Account" %}</h3>
|
<h3 class="info-item-top">{% trans "Account" %}</h3>
|
||||||
<div class="info-item-bottom home-profile ovhd">
|
<div class="info-item-bottom home-profile ovhd">
|
||||||
<a href="{{ SITE_ROOT }}profile/" class="pic no-deco fleft" title="{% trans "Edit" %}">{% avatar request.user 48 %}</a>
|
<a href="{{ SITE_ROOT }}profile/" class="pic no-deco fleft" title="{% trans "Profile" %}">{% avatar request.user 48 %}</a>
|
||||||
<div class="txt fright">
|
<div class="txt fright">
|
||||||
<p>{% if nickname %}{{ nickname }}{% else %}{% trans "No Nickname" %}{% endif %}</p>
|
<p>{% if nickname %}{{ nickname }}{% else %}{% trans "No Nickname" %}{% endif %}</p>
|
||||||
<a href="{{ SITE_ROOT }}profile/" class="edit">{% trans "Edit" %}</a>
|
<a href="{{ SITE_ROOT }}profile/" class="edit">{% trans "Profile" %}</a>
|
||||||
{% if plan %}
|
{% if ENABLE_PAYMENT %}
|
||||||
<p>Type: {{ plan }}</p><a href="http://seafile.com/">Upgrade account</a>
|
<a href="{% url 'plan' %}" class="edit">{% trans "Payment" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -126,14 +126,10 @@ if settings.SERVE_STATIC:
|
|||||||
(r'^%s/(?P<path>.*)$' % (media_url), 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
|
(r'^%s/(?P<path>.*)$' % (media_url), 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
if getattr(settings, 'CLOUD_MODE', False):
|
||||||
from settings import CLOUD_MODE
|
|
||||||
except ImportError:
|
|
||||||
CLOUD_MODE = False
|
|
||||||
if CLOUD_MODE:
|
|
||||||
urlpatterns += patterns('',
|
urlpatterns += patterns('',
|
||||||
# (r'^organizations/', include('seahub.organizations.urls')),
|
|
||||||
(r'^demo/', demo),
|
(r'^demo/', demo),
|
||||||
|
(r'^pay/', include('seahub_extra.pay.urls')),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
urlpatterns += patterns('',
|
urlpatterns += patterns('',
|
||||||
@@ -147,3 +143,4 @@ if getattr(settings, 'ENABLE_FILE_SEARCH', False):
|
|||||||
urlpatterns += patterns('',
|
urlpatterns += patterns('',
|
||||||
url(r'^search/$', search, name='search'),
|
url(r'^search/$', search, name='search'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -849,7 +849,6 @@ else:
|
|||||||
def get_user_traffic_stat(username):
|
def get_user_traffic_stat(username):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def redirect_to_login(request):
|
def redirect_to_login(request):
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
login_url = settings.LOGIN_URL
|
login_url = settings.LOGIN_URL
|
||||||
|
@@ -820,8 +820,6 @@ def myhome(request):
|
|||||||
if stat:
|
if stat:
|
||||||
traffic_stat = stat['file_view'] + stat['file_download'] + stat['dir_download']
|
traffic_stat = stat['file_view'] + stat['file_download'] + stat['dir_download']
|
||||||
|
|
||||||
plan = getattr(request.user, 'plan', None)
|
|
||||||
|
|
||||||
return render_to_response('myhome.html', {
|
return render_to_response('myhome.html', {
|
||||||
"nickname": nickname,
|
"nickname": nickname,
|
||||||
"owned_repos": owned_repos,
|
"owned_repos": owned_repos,
|
||||||
@@ -844,7 +842,7 @@ def myhome(request):
|
|||||||
"starred_files": starred_files,
|
"starred_files": starred_files,
|
||||||
"TRAFFIC_STATS_ENABLED": TRAFFIC_STATS_ENABLED,
|
"TRAFFIC_STATS_ENABLED": TRAFFIC_STATS_ENABLED,
|
||||||
"traffic_stat": traffic_stat,
|
"traffic_stat": traffic_stat,
|
||||||
"plan": plan,
|
"ENABLE_PAYMENT": getattr(settings, 'ENABLE_PAYMENT', False),
|
||||||
}, context_instance=RequestContext(request))
|
}, context_instance=RequestContext(request))
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
Reference in New Issue
Block a user