def get_download_copy_tag(self): dc_helper = DownloadConfirmationHelper() return dc_helper.get_html_tag( self.context.absolute_url(), additional_classes=['function-download-copy'], include_token=True )
def get_download_copy_tag(self): """Returns the DownloadConfirmationHelper tag containing the donwload link. For mails, containing an original_message, the tag links to the orginal message download view. """ dc_helper = DownloadConfirmationHelper(self.context) kwargs = { 'additional_classes': ['function-download-copy'], 'viewname': self.context.get_download_view_name(), 'include_token': True, } requested_version_id = self.request.get('version_id') if requested_version_id: requested_version_id = int(requested_version_id) current_version_id = self.context.get_current_version_id() if requested_version_id != current_version_id: kwargs['url_extension'] = ( '?version_id={}' .format(requested_version_id) ) return dc_helper.get_html_tag(**kwargs)
def download_link(self): """Returns a formatted link that allows to download a copy of this version (opens in an overlay). """ dc_helper = DownloadConfirmationHelper(self.obj) link = dc_helper.get_html_tag( additional_classes=['standalone', 'function-download-copy'], viewname='download', include_token=True) return link
def get_download_copy_link(self): # Because of cyclic dependencies, we can not import # DownloadConfirmationHelper in the top of the file. from opengever.document.browser.download import DownloadConfirmationHelper if not self.has_file(): return None dc_helper = DownloadConfirmationHelper() return dc_helper.get_html_tag(self.context.absolute_url(), additional_classes=[""], include_token=True)
def download_link(self): """Returns a formatted link that allows to download a copy of this version (opens in an overlay). """ dc_helper = DownloadConfirmationHelper(self._context) link = dc_helper.get_html_tag( url_extension="?version_id=%s" % self.version, additional_classes=['standalone', 'function-download-copy'], viewname='download_file_version', include_token=True) return link
def get_download_copy_link(self): # Because of cyclic dependencies, we can not import # DownloadConfirmationHelper in the top of the file. from opengever.document.browser.download import DownloadConfirmationHelper # noqa if not self.has_file(): return None dc_helper = DownloadConfirmationHelper(self.context) return dc_helper.get_html_tag( additional_classes=['function-download-copy'], include_token=True)
def get_download_copy_tag(self): """Returns the DownloadConfirmationHelper tag containing the donwload link. For mails, containing an original_message, the tag links to the orginal message download view. """ dc_helper = DownloadConfirmationHelper(self.context) return dc_helper.get_html_tag( additional_classes=['function-download-copy'], viewname=self.context.get_download_view_name(), include_token=True, )
def render_download_copy_link(self): """Returns the DownloadConfirmationHelper tag containing the donwload link. For mails, containing an original_message, the tag links to the orginal message download view. """ dc_helper = DownloadConfirmationHelper(self.context) kwargs = { 'additional_classes': ['function-download-copy'], 'viewname': self.context.get_download_view_name(), 'include_token': True, } requested_version_id = self.request.get('version_id') if requested_version_id: requested_version_id = int(requested_version_id) current_version_id = self.context.get_current_version_id() if requested_version_id != current_version_id: kwargs['url_extension'] = ( '?version_id={}'.format(requested_version_id)) return dc_helper.get_html_tag(**kwargs)
def get_download_copy_tag(self): dc_helper = DownloadConfirmationHelper(self.context) return dc_helper.get_html_tag( additional_classes=['function-download-copy'], include_token=True, )
def download_link(self): dc_helper = DownloadConfirmationHelper() return dc_helper.get_html_tag(self.get_url())