Use shorter confirmation messages.
This commit is contained in:
@@ -147,9 +147,9 @@ def checkin_document(request, document_pk):
|
|||||||
}
|
}
|
||||||
|
|
||||||
if document.checkout_info().user != request.user:
|
if document.checkout_info().user != request.user:
|
||||||
context['title'] = _('You didn\'t originally checked out this document. Are you sure you wish to forcefully check in document: %s?') % document
|
context['title'] = _('You didn\'t originally checked out this document. Forcefully check in the document: %s?') % document
|
||||||
else:
|
else:
|
||||||
context['title'] = _('Are you sure you wish to check in document: %s?') % document
|
context['title'] = _('Check in the document: %s?') % document
|
||||||
|
|
||||||
return render_to_response('appearance/generic_confirm.html', context,
|
return render_to_response('appearance/generic_confirm.html', context,
|
||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ def key_receive(request, key_id):
|
|||||||
|
|
||||||
return render_to_response('appearance/generic_confirm.html', {
|
return render_to_response('appearance/generic_confirm.html', {
|
||||||
'title': _('Import key'),
|
'title': _('Import key'),
|
||||||
'message': _('Are you sure you wish to import key id: %s?') % key_id,
|
'message': _('Import key ID: %s?') % key_id,
|
||||||
'previous': previous,
|
'previous': previous,
|
||||||
'submit_method': 'GET',
|
'submit_method': 'GET',
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ def key_delete(request, fingerprint, key_type):
|
|||||||
return render_to_response('appearance/generic_confirm.html', {
|
return render_to_response('appearance/generic_confirm.html', {
|
||||||
'title': _('Delete key'),
|
'title': _('Delete key'),
|
||||||
'delete_view': True,
|
'delete_view': True,
|
||||||
'message': _('Are you sure you wish to delete key: %s? If you try to delete a public key that is part of a public/private pair the private key will be deleted as well.') % key,
|
'message': _('Delete key %s? If you delete a public key that is part of a public/private pair the private key will be deleted as well.') % key,
|
||||||
'next': next,
|
'next': next,
|
||||||
'previous': previous,
|
'previous': previous,
|
||||||
}, context_instance=RequestContext(request))
|
}, context_instance=RequestContext(request))
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ def comment_delete(request, comment_id=None, comment_id_list=None):
|
|||||||
}
|
}
|
||||||
if len(comments) == 1:
|
if len(comments) == 1:
|
||||||
context['object'] = comments[0].content_object
|
context['object'] = comments[0].content_object
|
||||||
context['title'] = _('Are you sure you wish to delete the comment: %s?') % ', '.join([unicode(d) for d in comments])
|
context['title'] = _('Delete comment?')
|
||||||
elif len(comments) > 1:
|
elif len(comments) > 1:
|
||||||
context['title'] = _('Are you sure you wish to delete the comments: %s?') % ', '.join([unicode(d) for d in comments])
|
context['title'] = _('Delete comments?')
|
||||||
|
|
||||||
return render_to_response('appearance/generic_confirm.html', context,
|
return render_to_response('appearance/generic_confirm.html', context,
|
||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ def template_node_delete(request, node_pk):
|
|||||||
'navigation_object_list': ['index', 'node'],
|
'navigation_object_list': ['index', 'node'],
|
||||||
'next': next,
|
'next': next,
|
||||||
'node': node,
|
'node': node,
|
||||||
'title': _('Are you sure you with to delete the index template node: %s?') % node,
|
'title': _('Delete the index template node: %s?') % node,
|
||||||
'previous': previous,
|
'previous': previous,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ def document_signature_delete(request, document_pk):
|
|||||||
return HttpResponseRedirect(previous)
|
return HttpResponseRedirect(previous)
|
||||||
|
|
||||||
return render_to_response('appearance/generic_confirm.html', {
|
return render_to_response('appearance/generic_confirm.html', {
|
||||||
'title': _('Are you sure you wish to delete the detached signature from document: %s?') % document,
|
'title': _('Delete the detached signature from document: %s?') % document,
|
||||||
'next': next,
|
'next': next,
|
||||||
'previous': previous,
|
'previous': previous,
|
||||||
'object': document,
|
'object': document,
|
||||||
|
|||||||
@@ -605,8 +605,8 @@ def document_update_page_count(request, document_id=None, document_id_list=None)
|
|||||||
context = {
|
context = {
|
||||||
'previous': previous,
|
'previous': previous,
|
||||||
'title': ungettext(
|
'title': ungettext(
|
||||||
'Are you sure you wish to reset the page count of the selected document?',
|
'Reset the page count of the selected document?',
|
||||||
'Are you sure you wish to reset the page count of the selected documents?',
|
'Reset the page count of the selected documents?',
|
||||||
len(documents)
|
len(documents)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -659,8 +659,8 @@ def document_clear_transformations(request, document_id=None, document_id_list=N
|
|||||||
'next': next,
|
'next': next,
|
||||||
'previous': previous,
|
'previous': previous,
|
||||||
'title': ungettext(
|
'title': ungettext(
|
||||||
'Are you sure you wish to clear all the page transformations for the selected document?',
|
'Clear all the page transformations for the selected document?',
|
||||||
'Are you sure you wish to clear all the page transformations for the selected documents?',
|
'Clear all the page transformations for the selected documents?',
|
||||||
len(documents)
|
len(documents)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1013,7 +1013,7 @@ def document_type_filename_delete(request, document_type_filename_id):
|
|||||||
'previous': previous,
|
'previous': previous,
|
||||||
'navigation_object_list': ['document_type', 'filename'],
|
'navigation_object_list': ['document_type', 'filename'],
|
||||||
'next': next,
|
'next': next,
|
||||||
'title': _('Are you sure you wish to delete the filename: %(filename)s, from document type "%(document_type)s"?') % {
|
'title': _('Delete the filename: %(filename)s, from document type "%(document_type)s"?') % {
|
||||||
'document_type': document_type_filename.document_type, 'filename': document_type_filename
|
'document_type': document_type_filename.document_type, 'filename': document_type_filename
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -1132,6 +1132,6 @@ def document_version_revert(request, document_version_pk):
|
|||||||
return render_to_response('appearance/generic_confirm.html', {
|
return render_to_response('appearance/generic_confirm.html', {
|
||||||
'previous': previous,
|
'previous': previous,
|
||||||
'object': document_version.document,
|
'object': document_version.document,
|
||||||
'title': _('Are you sure you wish to revert to this version?'),
|
'title': _('Revert to this version?'),
|
||||||
'message': _('All later version after this one will be deleted too.'),
|
'message': _('All later version after this one will be deleted too.'),
|
||||||
}, context_instance=RequestContext(request))
|
}, context_instance=RequestContext(request))
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ def folder_delete(request, folder_id):
|
|||||||
'previous': previous,
|
'previous': previous,
|
||||||
'next': next,
|
'next': next,
|
||||||
'object': folder,
|
'object': folder,
|
||||||
'title': _('Are you sure you with to delete the folder: %s?') % folder,
|
'title': _('Delete the folder: %s?') % folder,
|
||||||
}
|
}
|
||||||
|
|
||||||
return render_to_response('appearance/generic_confirm.html', context,
|
return render_to_response('appearance/generic_confirm.html', context,
|
||||||
@@ -276,8 +276,8 @@ def folder_document_remove(request, folder_id, document_id=None, document_id_lis
|
|||||||
'object': folder,
|
'object': folder,
|
||||||
'previous': previous,
|
'previous': previous,
|
||||||
'title': ungettext(
|
'title': ungettext(
|
||||||
'Are you sure you wish to remove the selected document from the folder: %(folder)s?',
|
'Remove the selected document from the folder: %(folder)s?',
|
||||||
'Are you sure you wish to remove the selected documents from the folder: %(folder)s?',
|
'Remove the selected documents from the folder: %(folder)s?',
|
||||||
len(folder_documents)
|
len(folder_documents)
|
||||||
) % {'folder': folder}
|
) % {'folder': folder}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ def smart_link_delete(request, smart_link_pk):
|
|||||||
return render_to_response('appearance/generic_confirm.html', {
|
return render_to_response('appearance/generic_confirm.html', {
|
||||||
'delete_view': True,
|
'delete_view': True,
|
||||||
'object': smart_link,
|
'object': smart_link,
|
||||||
'title': _('Are you sure you wish to delete smart link: %s?') % smart_link,
|
'title': _('Delete smart link: %s?') % smart_link,
|
||||||
'next': next,
|
'next': next,
|
||||||
'previous': previous,
|
'previous': previous,
|
||||||
}, context_instance=RequestContext(request))
|
}, context_instance=RequestContext(request))
|
||||||
@@ -326,5 +326,5 @@ def smart_link_condition_delete(request, smart_link_condition_pk):
|
|||||||
'next': next,
|
'next': next,
|
||||||
'object': smart_link_condition.smart_link,
|
'object': smart_link_condition.smart_link,
|
||||||
'previous': previous,
|
'previous': previous,
|
||||||
'title': _('Are you sure you wish to delete smart link condition: "%s"?') % smart_link_condition,
|
'title': _('Delete smart link condition: "%s"?') % smart_link_condition,
|
||||||
}, context_instance=RequestContext(request))
|
}, context_instance=RequestContext(request))
|
||||||
|
|||||||
@@ -23,16 +23,7 @@ from .permissions import (
|
|||||||
|
|
||||||
|
|
||||||
class DocumentSubmitView(ConfirmView):
|
class DocumentSubmitView(ConfirmView):
|
||||||
def get_context_data(self, **kwargs):
|
extra_context = {'title': _('Submit the selected document for OCR?')}
|
||||||
context = super(DocumentSubmitView, self).get_context_data(**kwargs)
|
|
||||||
|
|
||||||
context.update(
|
|
||||||
{
|
|
||||||
'title': _('Are you sure you wish to submit the selected document for OCR?')
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
return context
|
|
||||||
|
|
||||||
def object_action(self, request, obj):
|
def object_action(self, request, obj):
|
||||||
document = obj
|
document = obj
|
||||||
@@ -55,9 +46,7 @@ class DocumentSubmitView(ConfirmView):
|
|||||||
|
|
||||||
|
|
||||||
class DocumentAllSubmitView(ConfirmView):
|
class DocumentAllSubmitView(ConfirmView):
|
||||||
extra_context = {
|
extra_context = {'title': _('Submit all documents for OCR?')}
|
||||||
'title': _('Submit all documents for OCR?')
|
|
||||||
}
|
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
count = 0
|
count = 0
|
||||||
@@ -71,16 +60,7 @@ class DocumentAllSubmitView(ConfirmView):
|
|||||||
|
|
||||||
|
|
||||||
class DocumentManySubmitView(DocumentSubmitView):
|
class DocumentManySubmitView(DocumentSubmitView):
|
||||||
def get_context_data(self, **kwargs):
|
extra_context = {'title': _('Submit the selected documents for OCR?')}
|
||||||
context = super(DocumentManySubmitView, self).get_context_data(**kwargs)
|
|
||||||
|
|
||||||
context.update(
|
|
||||||
{
|
|
||||||
'title': _('Are you sure you wish to submit the selected documents for OCR?')
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
return context
|
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
for pk in request.GET.get('id_list', '').split(','):
|
for pk in request.GET.get('id_list', '').split(','):
|
||||||
@@ -183,8 +163,8 @@ def entry_delete(request, pk=None, pk_list=None):
|
|||||||
context['object'] = entries[0]
|
context['object'] = entries[0]
|
||||||
|
|
||||||
context['title'] = ungettext(
|
context['title'] = ungettext(
|
||||||
'Are you sure you wish to delete the selected entry?',
|
'Delete the selected entry?',
|
||||||
'Are you sure you wish to delete the selected entries?',
|
'Delete the selected entries?',
|
||||||
len(entries)
|
len(entries)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -233,8 +213,8 @@ def entry_re_queue(request, pk=None, pk_list=None):
|
|||||||
context['object'] = entries[0]
|
context['object'] = entries[0]
|
||||||
|
|
||||||
context['title'] = ungettext(
|
context['title'] = ungettext(
|
||||||
'Are you sure you wish to re-queue the selected entry?',
|
'Re-queue the selected entry?',
|
||||||
'Are you sure you wish to re-queue the selected entries?',
|
'Re-queue the selected entries?',
|
||||||
len(entries)
|
len(entries)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -170,8 +170,8 @@ def tag_delete(request, tag_id=None, tag_id_list=None):
|
|||||||
'message': _('Will be removed from all documents.'),
|
'message': _('Will be removed from all documents.'),
|
||||||
'next': next,
|
'next': next,
|
||||||
'title': ungettext(
|
'title': ungettext(
|
||||||
'Are you sure you wish to delete the selected tag?',
|
'Delete the selected tag?',
|
||||||
'Are you sure you wish to delete the selected tags?',
|
'Delete the selected tags?',
|
||||||
len(tags)
|
len(tags)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -294,18 +294,18 @@ def tag_remove(request, document_id=None, document_id_list=None, tag_id=None, ta
|
|||||||
if len(tags) == 1:
|
if len(tags) == 1:
|
||||||
if len(documents) == 1:
|
if len(documents) == 1:
|
||||||
context['object'] = documents[0]
|
context['object'] = documents[0]
|
||||||
context['title'] = _('Are you sure you wish to remove the tag "%(tag)s" from the document: %(document)s?') % {
|
context['title'] = _('Remove the tag "%(tag)s" from the document: %(document)s?') % {
|
||||||
'tag': ', '.join([unicode(d) for d in tags]), 'document': ', '.join([unicode(d) for d in documents])}
|
'tag': ', '.join([unicode(d) for d in tags]), 'document': ', '.join([unicode(d) for d in documents])}
|
||||||
else:
|
else:
|
||||||
context['title'] = _('Are you sure you wish to remove the tag "%(tag)s" from the documents: %(documents)s?') % {
|
context['title'] = _('Remove the tag "%(tag)s" from the documents: %(documents)s?') % {
|
||||||
'tag': ', '.join([unicode(d) for d in tags]), 'documents': ', '.join([unicode(d) for d in documents])}
|
'tag': ', '.join([unicode(d) for d in tags]), 'documents': ', '.join([unicode(d) for d in documents])}
|
||||||
elif len(tags) > 1:
|
elif len(tags) > 1:
|
||||||
if len(documents) == 1:
|
if len(documents) == 1:
|
||||||
context['object'] = documents[0]
|
context['object'] = documents[0]
|
||||||
context['title'] = _('Are you sure you wish to remove the tags: %(tags)s from the document: %(document)s?') % {
|
context['title'] = _('Remove the tags: %(tags)s from the document: %(document)s?') % {
|
||||||
'tags': ', '.join([unicode(d) for d in tags]), 'document': ', '.join([unicode(d) for d in documents])}
|
'tags': ', '.join([unicode(d) for d in tags]), 'document': ', '.join([unicode(d) for d in documents])}
|
||||||
else:
|
else:
|
||||||
context['title'] = _('Are you sure you wish to remove the tags %(tags)s from the documents: %(documents)s?') % {
|
context['title'] = _('Remove the tags %(tags)s from the documents: %(documents)s?') % {
|
||||||
'tags': ', '.join([unicode(d) for d in tags]), 'documents': ', '.join([unicode(d) for d in documents])}
|
'tags': ', '.join([unicode(d) for d in tags]), 'documents': ', '.join([unicode(d) for d in documents])}
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
|||||||
@@ -144,9 +144,9 @@ def user_delete(request, user_id=None, user_id_list=None):
|
|||||||
}
|
}
|
||||||
if len(users) == 1:
|
if len(users) == 1:
|
||||||
context['object'] = users[0]
|
context['object'] = users[0]
|
||||||
context['title'] = _('Are you sure you wish to delete the user: %s?') % ', '.join([unicode(d) for d in users])
|
context['title'] = _('Delete the user: %s?') % ', '.join([unicode(d) for d in users])
|
||||||
elif len(users) > 1:
|
elif len(users) > 1:
|
||||||
context['title'] = _('Are you sure you wish to delete the users: %s?') % ', '.join([unicode(d) for d in users])
|
context['title'] = _('Delete the users: %s?') % ', '.join([unicode(d) for d in users])
|
||||||
|
|
||||||
return render_to_response('appearance/generic_confirm.html', context,
|
return render_to_response('appearance/generic_confirm.html', context,
|
||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
@@ -330,9 +330,9 @@ def group_delete(request, group_id=None, group_id_list=None):
|
|||||||
}
|
}
|
||||||
if len(groups) == 1:
|
if len(groups) == 1:
|
||||||
context['object'] = groups[0]
|
context['object'] = groups[0]
|
||||||
context['title'] = _('Are you sure you wish to delete the group: %s?') % ', '.join([unicode(d) for d in groups])
|
context['title'] = _('Delete the group: %s?') % ', '.join([unicode(d) for d in groups])
|
||||||
elif len(groups) > 1:
|
elif len(groups) > 1:
|
||||||
context['title'] = _('Are you sure you wish to delete the groups: %s?') % ', '.join([unicode(d) for d in groups])
|
context['title'] = _('Delete the groups: %s?') % ', '.join([unicode(d) for d in groups])
|
||||||
|
|
||||||
return render_to_response('appearance/generic_confirm.html', context,
|
return render_to_response('appearance/generic_confirm.html', context,
|
||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
|
|||||||
Reference in New Issue
Block a user