Esempio n. 1
0
    BenefitCategoryChange, BenefitsChange, FrontPage, RequestionInfo, ProfileChange, \
    RequestionChange, PreferredSadiksChange, DocumentsChange, \
    Queue, RequestionStatusChange, SetIdentityDocument, FindProfileForRequestion, \
    EmbedRequestionToProfile, GenerateBlank
from sadiki.operator.views.sadik import SadikListWithGroups, SadikGroupChangePlaces, \
    RequestionListEnrollment, SadikInfoChange

if settings.FACILITY_STORE == settings.FACILITY_STORE_YES:
    change_benefits_view = BenefitsChange.as_view()
else:
    change_benefits_view = BenefitCategoryChange.as_view()

urlpatterns = patterns('',
    # Общие функции
    url(r'^$', FrontPage.as_view(), name='operator_frontpage'),
    url(r'^queue/$', Queue.as_view(), name='operator_queue'),
    url(r'^registration/$', Registration.as_view(),
        name=u'operator_registration'),
    url(r'^requestion_search/$', RequestionSearch.as_view(),
        name=u'operator_requestion_search'),

    # Работа с конкретной заявкой
    url(r'^request/(?P<requestion_id>\d{1,7})/$',
        RequestionInfo.as_view(), name=u'operator_requestion_info'),
    url(r'^request/(?P<requestion_id>\d{1,7})/change_profile/$',
        ProfileChange.as_view(), name=u'operator_profile_change'),
    url(r'^request/(?P<requestion_id>\d{1,7})/benefits/$',
        change_benefits_view, name=u'operator_benefits_change'),
    url(r'^request/(?P<requestion_id>\d{1,7})/edit/$',
        RequestionChange.as_view(), name=u'operator_requestion_change'),
    url(r'^request/(?P<requestion_id>\d{1,7})/sadiks/$',
Esempio n. 2
0
def queue(request, *args, **kwargs):
    if request.user.is_authenticated() and request.user.is_operator():
        return OperatorQueue.as_view()(request, *args, **kwargs)
    else:
        return AnonymQueue.as_view()(request, *args, **kwargs)