-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New grima suggested by Aaron Krebeck: AddInternalNote
Updates to item template. Some fixed field functionality. Update github pages dependencies.
- Loading branch information
Showing
7 changed files
with
140 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# AddInternalNote - add an internal note to an item record | ||
*Thanks to Aaron Krebeck for suggesting this grima!* | ||
|
||
This grima sets Internal Note 1 to the specified note. If no | ||
note is entered into the form, any existing Internal Note 1 | ||
field will be cleared. | ||
|
||
## Input | ||
* Text of note to add to item record | ||
* Barcode of item record to have internal note added | ||
|
||
## Output | ||
This grima outputs a message indicating either: | ||
* success - including the MMS ID of the new copy of the bib record | ||
* error - including the error message from Alma | ||
|
||
## API requirements | ||
* Bibs - read/write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
require_once("../grima-lib.php"); | ||
|
||
class AddInternalNote extends GrimaTask { | ||
|
||
function do_task() { | ||
$item = new Item(); | ||
$item->loadFromAlmaBarcode($this['barcode']); | ||
$item['internal_note_1'] = $this['note']; | ||
$item->updateAlma(); | ||
if ($this['note'] == "") { | ||
$this->addMessage('success',"Internal note 1 cleared on {$this['barcode']}"); | ||
} else { | ||
$this->addMessage('success',"Internal note 1 added to {$this['barcode']}"); | ||
} | ||
} | ||
|
||
} | ||
|
||
AddInternalNote::RunIt(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<GrimaForm> | ||
<Title>Grima: Add Internal Note 1</Title> | ||
<Field | ||
name="note" | ||
label="Internal Note 1" | ||
shortname="n" | ||
autocomplete="on" | ||
required="no" | ||
placeholder="Note to add to item..." | ||
/> | ||
<Field | ||
name="barcode" | ||
label="Barcode" | ||
shortname="b" | ||
autocomplete="off" | ||
required="yes" | ||
placeholder="Barcode of item to modify..." | ||
/> | ||
</GrimaForm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters