Exemple #1
0
def save_and_return(request):
    global PageIndex 
    update_values(request)
    civet_form.save_case(ActiveCollection, Deletelist)
    PageIndex = 0
    civet_form.FormFields = deepcopy(InitalFormVals)
    return render(request,'djciv_data/civet_coder.html',get_coder_context())
Exemple #2
0
def setup_workspace_download(request, iscoding = False):
    """ Get file name for workspace download."""
    if iscoding:
        update_values(request)
        civet_form.save_case(ActiveCollection, Deletelist)
    else:
        save_edits(request)
    context = {}
    if WorkspaceName == 'Demonstration file':
        context['filename'] = 'CIVET.workspace.default.zip' # prevent overwriting the demonstration file
    else:
        context['filename'] = WorkspaceName
    return render(request,'djciv_data/setup_workspace_download.html',context)
Exemple #3
0
def save_and_next(request):
    global ActiveCollection, CoderText
    update_values(request)
    civet_form.save_case(ActiveCollection, Deletelist)
#    print('SaNext-Mk1:',CollectionList)
    idx = CollectionList.index(ActiveCollection) + 1
    if idx < len(CollectionList):
        ActiveCollection = CollectionList[idx] 
        civet_form.FormFields = deepcopy(InitalFormVals)
        if civet_settings.SKIP_EDITING or civet_settings.NEVER_ANNOTATE:
            CoderText = ''
            return HttpResponseRedirect('code_collection')
        else:   
            return render(request,'djciv_data/civet_ckeditor.html', get_CKEditor_context())
    else:
        return HttpResponse(civet_utilities.unimplemented_feature("you've reached the end of the list"))
Exemple #4
0
def save_and_new(request):
    update_values(request)
    civet_form.save_case(ActiveCollection, Deletelist)
    return render(request,'djciv_data/select_collection.html',{'files' : CollectionList, 'workspace': WorkspaceName})