[Mpuls-commits] r6016 - in base/trunk/mpulsweb: controllers lib templates/meta
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Tue Aug 7 13:56:42 CEST 2012
Author: ludwig
Date: 2012-08-07 13:56:41 +0200 (Tue, 07 Aug 2012)
New Revision: 6016
Modified:
base/trunk/mpulsweb/controllers/meta.py
base/trunk/mpulsweb/lib/metaclient.py
base/trunk/mpulsweb/templates/meta/index.mako
Log:
Remove download and digist from the meta object.
Modified: base/trunk/mpulsweb/controllers/meta.py
===================================================================
--- base/trunk/mpulsweb/controllers/meta.py 2012-08-03 11:59:35 UTC (rev 6015)
+++ base/trunk/mpulsweb/controllers/meta.py 2012-08-07 11:56:41 UTC (rev 6016)
@@ -439,34 +439,6 @@
c.metacase = unicode(html[start:end], 'utf-8')
return render('/meta/case.mako')
- def digest(self, id):
- '''Will return the digest part of the meta case html'''
- # Do not call _loadCase with read_only=True here. Downloading
- # the meta case digest may end up modifying the meta settings if
- # he meta case has been deleted.
- meta = self._loadCase(id).getMeta()
- sneedle = "<!-- START CASE BODY -->"
- eneedle = "<!-- END CASE BODY -->"
- try:
- return self.strip_meta(meta.agencies(), sneedle, eneedle)
- except MetaException, exc:
- return self._handle_meta_exception(meta, exc, "digest",
- _('Error! Data not downloaded.'))
-
- def download(self, id):
- '''Will return the body the full meta case html'''
- # Do not call _loadCase with read_only=True here. Downloading
- # the meta case may end up modifying the meta settings if he
- # meta case has been deleted.
- meta = self._loadCase(id).getMeta()
- sneedle = "<!-- START CASE BODY -->"
- eneedle = "<!-- END CASE BODY -->"
- try:
- return self.strip_meta(meta.pull(), sneedle, eneedle)
- except MetaException, exc:
- return self._handle_meta_exception(meta, exc, "pull",
- _('Error! Data not downloaded.'))
-
def _handle_meta_exception(self, meta, exc, action_name, title):
log.exception("Exception during action %(action)r for"
" client case %(master_id)s",
Modified: base/trunk/mpulsweb/lib/metaclient.py
===================================================================
--- base/trunk/mpulsweb/lib/metaclient.py 2012-08-03 11:59:35 UTC (rev 6015)
+++ base/trunk/mpulsweb/lib/metaclient.py 2012-08-07 11:56:41 UTC (rev 6016)
@@ -291,14 +291,6 @@
"""
return self.perform_get_request("/meta/cases/%s" % uuid)
- def meta_agencies_as_html(self, uuid):
- """Return a list of participating agencies for the dataset with the
- given uuid.
- The return value is a string containing the dataset rendered as
- HTML.
- """
- return self.perform_get_request("/meta/cases/%s/agencies" % uuid)
-
def upload_new_case(self, hash, xml):
response = self.perform_request("POST", "/meta/cases/hash/%s" % hash,
body=xml,
Modified: base/trunk/mpulsweb/templates/meta/index.mako
===================================================================
--- base/trunk/mpulsweb/templates/meta/index.mako 2012-08-03 11:59:35 UTC (rev 6015)
+++ base/trunk/mpulsweb/templates/meta/index.mako 2012-08-07 11:56:41 UTC (rev 6016)
@@ -63,7 +63,7 @@
<br>
<div class="widget container">
<h2>${_('Transfer')}</h2>
-<p>${h.literal(_('Transfer of data can be done in two directions.<ol><li>You can download data from the meta case to display it. Downloading data will not effect any data stored in the local case.</li><li>To update the meta case with data from the local case you can upload.</li></ol>The updated data will be stored permanently in the meta case and will be available for other agencys who also have access to the meta case.'))}</p>
+<p>${h.literal(_('Transfer of data can be done in one direction.<ol><li>To update the meta case with data from the local case you can upload.</li></ol>The updated data will be stored permanently in the meta case and will be available for other agencys who also have access to the meta case.'))}</p>
% if c.agency.is_metauser_configured():
% if c.meta.is_sync_allowed():
% if c.meta.is_linked():
@@ -74,7 +74,6 @@
</p>
<br>
<p>
- <a href="${h.url(controller='meta', action='download', id=session.get('case').id)}" class="button">${_('Download meta')}</a>
<a href="${h.url(controller='meta', action='upload', id=session.get('case').id)}" class="button">${_('Upload case')}</a>
<a href="${h.url(controller='meta', action='unlink', id=session.get('case').id, confirmed=0)}" onclick="return checkModification();" class="button">${_('Unlink case')}</a>
</p>
More information about the Mpuls-commits
mailing list