1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-30 12:56:46 +00:00

Temporarily comment out user message

This commit is contained in:
zhengxie 2013-05-20 13:27:44 +08:00
parent 5281beb011
commit bcc3fd5bbe
6 changed files with 18 additions and 21 deletions

View File

@ -164,7 +164,7 @@ INSTALLED_APPS = (
'seahub.contacts',
'seahub.wiki',
'seahub.group',
'seahub.message',
# 'seahub.message',
'seahub.notifications',
'seahub.profile',
'seahub.share',

View File

@ -28,7 +28,7 @@ from tokens import anon_share_token_generator
from seahub.auth.decorators import login_required
from seahub.contacts.signals import mail_sended
from seahub.share.models import FileShare
from seahub.message.models import UserMessage
# from seahub.message.models import UserMessage
from seahub.views import validate_owner, is_registered_user
from seahub.utils import render_permission_error, string2list, render_error, \
gen_token, gen_shared_link, IS_EMAIL_CONFIGURED
@ -134,15 +134,15 @@ def share_repo(request):
{'repo': repo.name, 'group': group.group_name}
messages.error(request, msg)
else:
members = get_group_members(group.id)
# members = get_group_members(group.id)
for email in members:
message = UserMessage()
message.to_email = email
message.from_email = request.user.username
message.message = "(by system) %s have shared repo <a href='%s%s'>%s</a> to you." %(sender, head_of_repo_url +'repo/',repo.id,repo.name)
message.ifread = 0
message.save()
# for email in members:
# message = UserMessage()
# message.to_email = email
# message.from_email = request.user.username
# message.message = "(by system) %s have shared repo <a href='%s%s'>%s</a> to you." %(sender, head_of_repo_url +'repo/',repo.id,repo.name)
# message.ifread = 0
# message.save()
msg = _(u'Shared to %(group)s successfullygo check it at <a href="%(share)s">Share</a>.') % \
{'group':group.group_name, 'share':reverse('share_admin')}
messages.success(request, msg)
@ -172,13 +172,13 @@ def share_repo(request):
msg = _(u'Failed to share to %s .') % email
messages.add_message(request, messages.ERROR, msg)
continue
#send message when share repo
message = UserMessage()
message.to_email = email
message.from_email = request.user.username
message.message = "(by system) %s have shared repo <a href='%s%s'>%s</a> to you." %(sender, head_of_repo_url +'repo/',repo.id,repo.name)
message.ifread = 0
message.save()
# #send message when share repo
# message = UserMessage()
# message.to_email = email
# message.from_email = request.user.username
# message.message = "(by system) %s have shared repo <a href='%s%s'>%s</a> to you." %(sender, head_of_repo_url +'repo/',repo.id,repo.name)
# message.ifread = 0
# message.save()
msg = _(u'Shared to %(email)s successfullygo check it at <a href="%(share)s">Share</a>.') % \
{'email':email, 'share':reverse('share_admin')}
messages.add_message(request, messages.INFO, msg)

View File

@ -42,7 +42,7 @@
<div class="account fright">
{% if request.user.is_authenticated %}
<a href="{% url 'edit_profile' %}" class="avatar-link" title="{% trans 'Profile Setting' %}">{% avatar request.user 16 %}</a> <span>{{ request.user }}</span>
<a href="{% url 'message_list' %}" id="msg_count"><img src="{{ MEDIA_URL }}/img/mail.png" width="25" height="20" /></b></a>
<!-- <a href="{% url 'message_list' %}" id="msg_count"><img src="{{ MEDIA_URL }}/img/mail.png" width="25" height="20" /></b></a> -->
<a href="{{ SITE_ROOT }}accounts/logout/">{% trans "Log out" %}</a>
{% else %}
<a href="{{ SITE_ROOT }}accounts/login/">{% trans "Log In" %}</a>

View File

@ -13,7 +13,6 @@
<li class="tabnav-tab tabnav-tab-cur">{% trans "Libraries" %}</li>
<li class="tabnav-tab"><a href="{% url 'personal_wiki' %}">{% trans "Personal Wiki" %}</a></li>
<li class="tabnav-tab"><a href="{% url 'client_mgmt' %}">{% trans "Clients" %}</a></li>
<li class="tabnav-tab "><a href="{% url 'message_list' %}">{% trans "Messages" %}</a></li>
</ul>
</div>

View File

@ -13,7 +13,6 @@
<li class="tabnav-tab"><a href="{% url 'myhome' %}">{% trans "Libraries" %}</a></li>
<li class="tabnav-tab tabnav-tab-cur">{% trans "Personal Wiki" %}</li>
<li class="tabnav-tab"><a href="{% url 'client_mgmt' %}">{% trans "Clients" %}</a></li>
<li class="tabnav-tab"><a href="{% url 'message_list' %}">{% trans "Messages" %}</a></li>
</ul>
</div>

View File

@ -12,7 +12,6 @@
<ul class="tabnav-tabs">
<li class="tabnav-tab"><a href="{% url 'myhome' %}">{% trans "Libraries" %}</a></li>
<li class="tabnav-tab tabnav-tab-cur">{% trans "Personal Wiki" %}</li>
<li class="tabnav-tab"><a href="{% url 'message_list' %}">{% trans "Messages" %}</a></li>
</ul>
</div>