Skip to content

Commit

Permalink
Merge branch 'dev' into additional_fields_advanced_search
Browse files Browse the repository at this point in the history
  • Loading branch information
prakhyatox committed Jul 17, 2024
2 parents 774471c + 1f5ccef commit 0579eaf
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a>

on Tue Jul 16th 2024
on Wed Jul 17th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a>

on Tue Jul 16th 2024
on Wed Jul 17th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a>

on Tue Jul 16th 2024
on Wed Jul 17th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a>

on Tue Jul 16th 2024
on Wed Jul 17th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a>

on Tue Jul 16th 2024
on Wed Jul 17th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a>

on Tue Jul 16th 2024
on Wed Jul 17th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h4 class="modal-title">Search results</h4>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a>

on Tue Jul 16th 2024
on Wed Jul 17th 2024

using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
Expand Down
52 changes: 49 additions & 3 deletions src/components/Records/Search/Header/SummaryDownload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class="info mr-10"
v-on="on"
>
<a @click="commenceDownload()">
<a @click="chooseDownload()">
<span class="white--text">Download</span>
</a>
</v-btn>
Expand All @@ -25,9 +25,50 @@
</v-tooltip>
<!-- eslint-enable-next-line vue/no-template-shadow -->
</p>
<v-dialog
v-model="chooseDownloadActive"
max-width="500"
>
<v-card>
<v-card-title>
Do you need information on organisations?
</v-card-title>
<v-card-text>
Selecting "yes" here will add a FAIRsharing record's organisations to your download file. This will increase
the file size as each organisation will require a separate line. Select "no" to download without organisations.
</v-card-text>

<v-card-actions>
<v-spacer />

<v-btn
color="blue darken-1"
text
@click="commenceDownload(true)"
>
Yes
</v-btn>
<v-btn
color="blue darken-1"
text
@click="commenceDownload(false)"
>
No
</v-btn>
<v-btn
color="red darken-1"
text
@click="chooseDownloadActive = false"
>
Cancel
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</template>


<script>
import { mapGetters, mapState } from "vuex";
Expand All @@ -47,6 +88,7 @@ export default {
listControllerData: listControllerData,
recordTypes: recordsLabels["recordTypes"],
buttonDisabled: false,
chooseDownloadActive: false
};
},
computed: {
Expand All @@ -73,16 +115,20 @@ export default {
},
},
methods: {
chooseDownload() {
this.chooseDownloadActive = true;
},
// Please refer to SummaryDownload.spec.js for comments on why this is ignored.
/* istanbul ignore next */
async commenceDownload() {
async commenceDownload(includeOrgs) {
this.chooseDownloadActive = false;
this.buttonDisabled = true;
let params = this.$store.getters["introspection/buildQueryParameters"](
this.currentPath
);
params["includeOrgs"] = includeOrgs;
params["searchUrl"] =
this.getHostname().slice(0, -1) + this.$route.fullPath;
// TODO: ids must be added to the params. It's in recordSearch.js/fetchCollectionRecords
if (this.getCollectionIdsParams && this.getCollectionIdsParams.length) {
params["ids"] = this.getCollectionIdsParams;
}
Expand Down

0 comments on commit 0579eaf

Please sign in to comment.