Esempio n. 1
0
def close(request):
    thread = get_object_or_404(smodels.Thread, pk=request.POST.get('id'))
    if toggle_boolean_field(thread, 'closed'):
        return {'link':_('open'), 'msg':_('This topic is closed.')}
    else:
        return {'link':_('close'), 'msg':_('This topic is open.')}
Esempio n. 2
0
def close(request):
    thread = get_object_or_404(smodels.Thread, pk=request.POST.get('id'))
    if toggle_boolean_field(thread, 'closed'):
        return {'link': _('open'), 'msg': _('This topic is closed.')}
    else:
        return {'link': _('close'), 'msg': _('This topic is open.')}
Esempio n. 3
0
def sticky(request):
    thread = get_object_or_404(smodels.Thread, pk=request.POST.get('id'))
    if toggle_boolean_field(thread, 'sticky'):
        return {'link':_('unstick'), 'msg':_('This topic is sticky!')}
    else:
        return {'link':_('stick'), 'msg':_('This topic is not sticky.')}
Esempio n. 4
0
def sticky(request):
    thread = get_object_or_404(smodels.Thread, pk=request.POST.get('id'))
    if toggle_boolean_field(thread, 'sticky'):
        return {'link': _('unstick'), 'msg': _('This topic is sticky!')}
    else:
        return {'link': _('stick'), 'msg': _('This topic is not sticky.')}