Skip to content

Commit

Permalink
#800 Add new categories to attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
schoicsiro committed Oct 31, 2023
1 parent cbca83d commit 292531b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions grails-app/controllers/au/org/ala/profile/OpusController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,16 @@ class OpusController extends BaseController {
}
}

def getCategories() {
String GNR = "General"
String MGM = "Management"
String NBPM = "National Best Practice Manual"
String NWMG = "National Weed Management Guide"
String NSP = "National Strategic Plan"
String OMR = "Other Management Resources"
render ([[key: GNR, title: GNR],[key: MGM, title: MGM],[key: NBPM, title: NBPM],[key: NWMG, title: NWMG],[key: NSP, title: NSP],[key: OMR, title: OMR]] as JSON)
}

def getTags() {
render([tags: Tag.list()] as JSON)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class UrlMappings {
"/opus/$opusId/attachment/$attachmentId/download" controller: "opus", action: [GET: "downloadAttachment"]
"/opus/$opusId/attachment/$attachmentId" controller: "opus", action: [GET: "getAttachmentMetadata", DELETE: "deleteAttachment"]
"/opus/$opusId/attachment/" controller: "opus", action: [GET: "getAttachmentMetadata", POST: "saveAttachment"]
"/attachment/categories" controller: "opus", action: [GET: "getCategories"]

"/opus/$opusId" controller: "opus", action: [GET: "show", POST: "updateOpus", DELETE: "deleteOpus"]

Expand Down

0 comments on commit 292531b

Please sign in to comment.