Skip to content
Snippets Groups Projects
Select Git revision
  • 274f9efe4b8438ab5238967e39adc200c624b56e
  • master default protected
  • djmdev
  • dev
  • cloud_water_contents
  • 1-download-era5
  • sysinstall
  • origin/task/language-editing
  • task/language-editing
  • feature/makefiles
  • v7.1.2
  • v7.1.1
  • v7.1
  • v7.0.4.1
  • 7.0.4
15 results

ticket_system.doctree

Blame
  • Banner.vue 1000 B
    <template>
      <div>
        {{ prefix }}: <a :href="pidUrl">{{ displayName }}</a>
      </div>
    </template>
    <script>
    export default {
      props: {
        identifier: {
          type: Object,
          default () {
            return null
          }
        }
      },
      computed: {
        baseUrl () {
          return `${location.protocol}//${location.host}`
        },
        baseDoi () {
          return this.$config.doiUrl
        },
        isDoi () {
          if (!this.identifier) {
            return null
          }
          return this.identifier.doi !== null
        },
        prefix () {
          if (!this.identifier) {
            return null
          }
          return this.isDoi ? 'DOI' : 'URI'
        },
        pidUrl () {
          if (!this.identifier) {
            return null
          }
          return this.isDoi ? `${this.baseDoi}/${this.identifier.doi}` : `${this.baseUrl}/pid/${this.identifier.id}`
        },
        displayName () {
          if (!this.identifier) {
            return null
          }
          return this.isDoi ? `${this.identifier.doi}` : `/pid/${this.identifier.id}`
        }
      }
    }
    </script>