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