Commit c5e4f624 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

download metas button in collection menu

parent 696964fe
Loading
Loading
Loading
Loading
+22 −1
Original line number Diff line number Diff line
@@ -77,6 +77,14 @@
                </v-list-item-title>
              </v-list-item>
            </template>
            <v-list-item v-if="canDownloadMetas">
              <v-list-item-title class="caption">
                <v-icon>
                  mdi-transfer-down
                </v-icon>
                <a class="dl-link" :href="downloadMetasLink" download>{{ $t('collection.download-metas') }}</a>
              </v-list-item-title>
            </v-list-item>
            <v-list-item class="li-oaipmh">
              <v-checkbox
                v-model="is_oai_record"
@@ -207,6 +215,14 @@ export default {
      return (this.currentStats.children_count + this.currentStats.resources_count) === 0
    },

    canDownloadMetas(){
      return this.currentStats.children_count === 0
    },

    downloadMetasLink(){
      return `${this.$jamaClient.endPoint}metas/download/collection_${this.collection.id}.xlsx`
    },

    ...mapGetters(["isPickerMode","currentStats"])

  },
@@ -314,13 +330,17 @@ export default {
</script>

<style lang="scss" scoped>

  .dl-link{
    text-decoration: none;
    color: black;
  }
</style>
<i18n>
{
  "en": {
    "action_menu": "Open actions menu",
    "collection": {
      "download-metas": "Download metadatas as CSV file",
      "label" : "Collection",
      "move_to" : "Move to collection",
      "remove": "Delete collection",
@@ -334,6 +354,7 @@ export default {
  "fr": {
    "action_menu": "Ouvrir le menu des actions",
    "collection": {
      "download-metas": "Télécharger les  métadonnées au format CSV",
      "label" : "Dossier",
      "move_to" : "Déplacer vers le dossier",
      "remove": "Supprimer le dossier",
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
            question : {type : String, default : ""},
            visible: {type :Boolean, default : false},
            defaultValue: {type :String, default : ""},
            multiline: {type: Boolean, default: false}
            multiline: {type: Boolean, default: false},
        },

        data() {