├── view └── datascribe │ └── admin │ ├── item │ ├── show.phtml │ ├── batch-edit-all.phtml │ ├── batch-edit.phtml │ ├── search.phtml │ └── show-details.phtml │ ├── record │ ├── add.phtml │ ├── edit.phtml │ ├── search.phtml │ ├── batch-edit-all.phtml │ ├── batch-edit.phtml │ ├── show.phtml │ ├── form-sidebars.phtml │ ├── previous-next-records.phtml │ ├── show-details.phtml │ └── media-viewer.phtml │ ├── dataset │ ├── form-builder-flags.phtml │ ├── add.phtml │ ├── form-builder-buttons.phtml │ ├── form-sidebars.phtml │ ├── browse.phtml │ └── edit.phtml │ ├── dataset-record │ ├── search.phtml │ ├── batch-edit-all.phtml │ └── batch-edit.phtml │ └── project │ ├── add.phtml │ ├── edit.phtml │ ├── show-details.phtml │ ├── users-form.phtml │ └── browse.phtml ├── language ├── es.mo ├── et.mo ├── eu.mo ├── fr.mo ├── hr.mo ├── it.mo ├── bg_BG.mo ├── ca_ES.mo └── zh_CN.mo ├── asset ├── vendor │ ├── panzoom-4.3.1 │ │ ├── dist │ │ │ ├── demo │ │ │ │ ├── index.d.ts │ │ │ │ ├── examples │ │ │ │ │ ├── SVG.d.ts │ │ │ │ │ ├── Exclude.d.ts │ │ │ │ │ ├── Focal.d.ts │ │ │ │ │ ├── Rotate.d.ts │ │ │ │ │ ├── Standard.d.ts │ │ │ │ │ ├── ContainInside.d.ts │ │ │ │ │ ├── ContainOutside.d.ts │ │ │ │ │ └── DisabledYAxis.d.ts │ │ │ │ ├── global-panzoom.d.ts │ │ │ │ ├── Code.d.ts │ │ │ │ └── Demo.d.ts │ │ │ └── src │ │ │ │ ├── shallowClone.d.ts │ │ │ │ ├── isSVGElement.d.ts │ │ │ │ ├── isExcluded.d.ts │ │ │ │ ├── isAttached.d.ts │ │ │ │ ├── events.d.ts │ │ │ │ ├── panzoom.d.ts │ │ │ │ ├── pointers.d.ts │ │ │ │ └── css.d.ts │ │ ├── src │ │ │ ├── shallowClone.ts │ │ │ ├── isSVGElement.ts │ │ │ ├── isAttached.ts │ │ │ ├── isExcluded.ts │ │ │ ├── polyfills.js │ │ │ ├── events.ts │ │ │ ├── pointers.ts │ │ │ └── css.ts │ │ └── MIT-License.txt │ └── featherlight │ │ └── featherlight.min.css └── js │ ├── datascribe.js │ ├── admin │ ├── record-browse.js │ ├── record-form.js │ └── project-form.js │ └── admin.js ├── config └── module.ini ├── src ├── Form │ ├── ViewHelper │ │ ├── DatascribeFormTextarea.php │ │ ├── DatascribeFormText.php │ │ └── DatascribeFormNumber.php │ ├── DatasetExportForm.php │ ├── DatasetValidateForm.php │ ├── Element │ │ ├── RequiredText.php │ │ ├── OptionalNumber.php │ │ ├── OptionalSelect.php │ │ ├── OptionalCheckbox.php │ │ ├── Select.php │ │ ├── Radio.php │ │ ├── Number.php │ │ ├── MonthSelect.php │ │ ├── YearSelect.php │ │ ├── HourSelect.php │ │ ├── Text.php │ │ ├── DaySelect.php │ │ ├── Textarea.php │ │ ├── MinuteSelect.php │ │ └── SecondSelect.php │ ├── DatasetSyncForm.php │ ├── DatasetMoveForm.php │ ├── ProjectForm.php │ ├── ItemBatchForm.php │ ├── ItemForm.php │ └── RecordBatchForm.php ├── Entity │ ├── TraitId.php │ ├── TraitVisibility.php │ ├── TraitSync.php │ ├── TraitIdentity.php │ ├── DatascribeProject.php │ ├── TraitNotes.php │ ├── DatascribeUser.php │ ├── DatascribeValue.php │ ├── TraitOwnership.php │ ├── DatascribeRecord.php │ └── DatascribeField.php ├── Service │ ├── ViewHelper │ │ └── DatascribeFactory.php │ ├── ControllerPlugin │ │ └── DatascribeFactory.php │ ├── Form │ │ ├── ItemFormFactory.php │ │ ├── RecordFormFactory.php │ │ ├── ItemBatchFormFactory.php │ │ ├── ItemSearchFormFactory.php │ │ ├── RecordSearchFormFactory.php │ │ └── DatasetFormFactory.php │ ├── Controller │ │ └── Admin │ │ │ └── DatasetControllerFactory.php │ ├── DataTypeManagerFactory.php │ └── Delegator │ │ └── FormElementDelegatorFactory.php ├── DatascribeDataType │ ├── Manager.php │ ├── Radio.php │ ├── Select.php │ ├── DataTypeInterface.php │ ├── Unknown.php │ ├── AbstractSelection.php │ ├── Time.php │ ├── Checkbox.php │ └── Date.php ├── PermissionsAssertion │ └── IsDatascribeUserAssertion.php ├── ViewHelper │ ├── breadcrumbs_route_map.php │ └── Datascribe.php ├── Api │ └── Representation │ │ ├── DatascribeUserRepresentation.php │ │ ├── DatascribeFieldRepresentation.php │ │ ├── DatascribeProjectRepresentation.php │ │ └── DatascribeValueRepresentation.php ├── Controller │ └── Admin │ │ ├── IndexController.php │ │ └── ProjectController.php ├── ControllerPlugin │ └── Datascribe.php └── Job │ └── SyncDataset.php ├── README.md └── CONTRIBUTING.md /view/datascribe/admin/item/show.phtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /view/datascribe/admin/record/add.phtml: -------------------------------------------------------------------------------- 1 | partial('form'); ?> 2 | -------------------------------------------------------------------------------- /view/datascribe/admin/record/edit.phtml: -------------------------------------------------------------------------------- 1 | partial('form'); ?> 2 | -------------------------------------------------------------------------------- /language/es.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omeka-s-modules/Datascribe/HEAD/language/es.mo -------------------------------------------------------------------------------- /language/et.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omeka-s-modules/Datascribe/HEAD/language/et.mo -------------------------------------------------------------------------------- /language/eu.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omeka-s-modules/Datascribe/HEAD/language/eu.mo -------------------------------------------------------------------------------- /language/fr.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omeka-s-modules/Datascribe/HEAD/language/fr.mo -------------------------------------------------------------------------------- /language/hr.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omeka-s-modules/Datascribe/HEAD/language/hr.mo -------------------------------------------------------------------------------- /language/it.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omeka-s-modules/Datascribe/HEAD/language/it.mo -------------------------------------------------------------------------------- /language/bg_BG.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omeka-s-modules/Datascribe/HEAD/language/bg_BG.mo -------------------------------------------------------------------------------- /language/ca_ES.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omeka-s-modules/Datascribe/HEAD/language/ca_ES.mo -------------------------------------------------------------------------------- /language/zh_CN.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/omeka-s-modules/Datascribe/HEAD/language/zh_CN.mo -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/index.d.ts: -------------------------------------------------------------------------------- 1 | import './demo.css'; 2 | import './global-panzoom'; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/src/shallowClone.d.ts: -------------------------------------------------------------------------------- 1 | export default function shallowClone(obj: any): any; 2 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/src/isSVGElement.d.ts: -------------------------------------------------------------------------------- 1 | export default function isSVGElement(elem: HTMLElement | SVGElement): boolean; 2 | -------------------------------------------------------------------------------- /asset/js/datascribe.js: -------------------------------------------------------------------------------- 1 | // DataScribe object for general use across all pages. Loaded in Module::appendToLayout(). 2 | var Datascribe = {}; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/examples/SVG.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export default function SVG(): JSX.Element; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/examples/Exclude.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export default function Exclude(): JSX.Element; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/examples/Focal.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export default function Focal(): JSX.Element; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/examples/Rotate.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export default function Rotate(): JSX.Element; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/examples/Standard.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export default function Standard(): JSX.Element; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/examples/ContainInside.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export default function ContainInside(): JSX.Element; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/examples/ContainOutside.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export default function ContainOutside(): JSX.Element; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/examples/DisabledYAxis.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export default function DisabledYAxis(): JSX.Element; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/src/isExcluded.d.ts: -------------------------------------------------------------------------------- 1 | import { PanzoomOptions } from './types'; 2 | export default function isExcluded(elem: Element, options: PanzoomOptions): boolean; 3 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/global-panzoom.d.ts: -------------------------------------------------------------------------------- 1 | import Panzoom from '../src/panzoom'; 2 | declare global { 3 | interface Window { 4 | Panzoom: typeof Panzoom; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/src/isAttached.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Determine if an element is attached to the DOM 3 | * Panzoom requires this so events work properly 4 | */ 5 | export default function isAttached(elem: HTMLElement | SVGElement | Document): boolean; 6 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/src/shallowClone.ts: -------------------------------------------------------------------------------- 1 | export default function shallowClone(obj: any) { 2 | const clone: any = {} 3 | for (const key in obj) { 4 | if (obj.hasOwnProperty(key)) { 5 | clone[key] = obj[key] 6 | } 7 | } 8 | return clone 9 | } 10 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/Code.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import 'prismjs/themes/prism-tomorrow.css'; 3 | interface Props { 4 | language?: string; 5 | children: string; 6 | } 7 | export default function Code({ children, language }: Props): JSX.Element; 8 | export {}; 9 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/demo/Demo.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | interface Props { 3 | title: string; 4 | subtitle?: string; 5 | code: React.ReactNode; 6 | children: React.ReactNode; 7 | } 8 | export default function Demo({ title, subtitle, code, children }: Props): JSX.Element; 9 | export {}; 10 | -------------------------------------------------------------------------------- /config/module.ini: -------------------------------------------------------------------------------- 1 | [info] 2 | version = "1.2.0" 3 | omeka_version_constraint = "^4.0.0" 4 | name = "DataScribe" 5 | description = "Transcribe structured data" 6 | author = "Roy Rosenzweig Center for History & New Media" 7 | author_link = "http://rrchnm.org/" 8 | configurable = false 9 | module_link = "https://datascribe.tech/" 10 | support_link = "https://datascribe.tech/" 11 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/src/isSVGElement.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Determine if an element is SVG by checking the namespace 3 | * Exception: the element itself should be treated like HTML 4 | */ 5 | const rsvg = /^http:[\w\.\/]+svg$/ 6 | export default function isSVGElement(elem: HTMLElement | SVGElement) { 7 | return rsvg.test(elem.namespaceURI) && elem.nodeName.toLowerCase() !== 'svg' 8 | } 9 | -------------------------------------------------------------------------------- /view/datascribe/admin/dataset/form-builder-flags.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/Form/ViewHelper/DatascribeFormTextarea.php: -------------------------------------------------------------------------------- 1 | addValidAttribute('minlength'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Entity/TraitId.php: -------------------------------------------------------------------------------- 1 | id; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Form/DatasetExportForm.php: -------------------------------------------------------------------------------- 1 | add([ 11 | 'type' => 'submit', 12 | 'name' => 'submit', 13 | 'attributes' => [ 14 | 'value' => 'Export dataset', // @translate 15 | ], 16 | ]); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Form/DatasetValidateForm.php: -------------------------------------------------------------------------------- 1 | add([ 11 | 'type' => 'submit', 12 | 'name' => 'submit', 13 | 'attributes' => [ 14 | 'value' => 'Validate dataset', // @translate 15 | ], 16 | ]); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Service/ViewHelper/DatascribeFactory.php: -------------------------------------------------------------------------------- 1 | void, eventOpts?: boolean | AddEventListenerOptions): void; 8 | export declare function destroyPointer(event: 'down' | 'move' | 'up', elem: HTMLElement | SVGElement | Document, handler: (event: PointerEvent) => void): void; 9 | -------------------------------------------------------------------------------- /src/Service/Form/ItemFormFactory.php: -------------------------------------------------------------------------------- 1 | setEntityManager($services->get('Omeka\EntityManager')); 14 | return $form; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Entity/TraitVisibility.php: -------------------------------------------------------------------------------- 1 | isPublic = $isPublic; 20 | } 21 | 22 | public function getIsPublic(): bool 23 | { 24 | return $this->isPublic; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Service/Form/RecordFormFactory.php: -------------------------------------------------------------------------------- 1 | setDataTypeManager($services->get('Datascribe\DataTypeManager')); 14 | return $form; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Service/Controller/Admin/DatasetControllerFactory.php: -------------------------------------------------------------------------------- 1 | get('Omeka\EntityManager') 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Service/Form/ItemBatchFormFactory.php: -------------------------------------------------------------------------------- 1 | setEntityManager($services->get('Omeka\EntityManager')); 14 | return $form; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Service/Form/ItemSearchFormFactory.php: -------------------------------------------------------------------------------- 1 | setEntityManager($services->get('Omeka\EntityManager')); 14 | return $form; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Service/Form/RecordSearchFormFactory.php: -------------------------------------------------------------------------------- 1 | setEntityManager($services->get('Omeka\EntityManager')); 14 | return $form; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Form/Element/RequiredText.php: -------------------------------------------------------------------------------- 1 | $this->getName(), 16 | 'required' => true, 17 | 'validators' => [], 18 | 'filters' => [], 19 | ]; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Form/Element/OptionalNumber.php: -------------------------------------------------------------------------------- 1 | $this->getName(), 16 | 'required' => false, 17 | 'validators' => [], 18 | 'filters' => [], 19 | ]; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Form/Element/OptionalSelect.php: -------------------------------------------------------------------------------- 1 | $this->getName(), 16 | 'required' => false, 17 | 'validators' => [], 18 | 'filters' => [], 19 | ]; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Form/Element/OptionalCheckbox.php: -------------------------------------------------------------------------------- 1 | $this->getName(), 16 | 'required' => false, 17 | 'validators' => [], 18 | 'filters' => [], 19 | ]; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/src/isExcluded.ts: -------------------------------------------------------------------------------- 1 | import { PanzoomOptions } from './types' 2 | 3 | function getClass(elem: Element) { 4 | return (elem.getAttribute('class') || '').trim() 5 | } 6 | 7 | function hasClass(elem: Element, className: string) { 8 | return elem.nodeType === 1 && ` ${getClass(elem)} `.indexOf(` ${className} `) > -1 9 | } 10 | 11 | export default function isExcluded(elem: Element, options: PanzoomOptions) { 12 | for (let cur = elem; cur != null; cur = cur.parentNode as Element) { 13 | if (hasClass(cur, options.excludeClass) || options.exclude.indexOf(cur) > -1) { 14 | return true 15 | } 16 | } 17 | return false 18 | } 19 | -------------------------------------------------------------------------------- /src/Service/Form/DatasetFormFactory.php: -------------------------------------------------------------------------------- 1 | setDataTypeManager($services->get('Datascribe\DataTypeManager')); 14 | $form->setViewHelperManager($services->get('ViewHelperManager')); 15 | return $form; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Form/DatasetSyncForm.php: -------------------------------------------------------------------------------- 1 | add([ 11 | 'type' => 'submit', 12 | 'name' => 'submit', 13 | 'attributes' => [ 14 | 'value' => 'Sync dataset', // @translate 15 | ], 16 | ]); 17 | 18 | // Disable the submit button if the dataset has no item set. 19 | $dataset = $this->getOption('dataset'); 20 | if ($dataset && !$dataset->itemSet()) { 21 | $this->get('submit')->setAttribute('disabled', true); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/dist/src/panzoom.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Panzoom for panning and zooming elements using CSS transforms 3 | * https://github.com/timmywil/panzoom 4 | * 5 | * Copyright Timmy Willison and other contributors 6 | * Released under the MIT license 7 | * https://github.com/timmywil/panzoom/blob/master/MIT-License.txt 8 | * 9 | */ 10 | import './polyfills'; 11 | import { PanzoomObject, PanzoomOptions } from './types'; 12 | declare function Panzoom(elem: HTMLElement | SVGElement, options?: Omit): PanzoomObject; 13 | declare namespace Panzoom { 14 | var defaultOptions: PanzoomOptions; 15 | } 16 | export { PanzoomObject, PanzoomOptions }; 17 | export default Panzoom; 18 | -------------------------------------------------------------------------------- /asset/vendor/panzoom-4.3.1/src/polyfills.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-var */ 2 | if (typeof window !== 'undefined') { 3 | // Support: IE11 only 4 | if (window.NodeList && !NodeList.prototype.forEach) { 5 | NodeList.prototype.forEach = Array.prototype.forEach 6 | } 7 | // Support: IE11 only 8 | // CustomEvent is an object instead of a constructor 9 | if (typeof window.CustomEvent !== 'function') { 10 | window.CustomEvent = function CustomEvent(event, params) { 11 | params = params || { bubbles: false, cancelable: false, detail: null } 12 | var evt = document.createEvent('CustomEvent') 13 | evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail) 14 | return evt 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/DatascribeDataType/Manager.php: -------------------------------------------------------------------------------- 1 | ; 12 | /** 13 | * Calculates the distance between two points 14 | * for pinch zooming. 15 | * Limits to the first 2 16 | */ 17 | export declare function getDistance(pointers: PointerEvent[]): number; 18 | -------------------------------------------------------------------------------- /src/Service/DataTypeManagerFactory.php: -------------------------------------------------------------------------------- 1 | get('Config'); 14 | if (!isset($config['datascribe_data_types'])) { 15 | throw new Exception\ConfigException('Missing datascribe_data_types configuration'); 16 | } 17 | return new Manager($services, $config['datascribe_data_types']); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Service/Delegator/FormElementDelegatorFactory.php: -------------------------------------------------------------------------------- 1 | addClass(DatascribeElement\Text::class, 'datascribeFormText'); 15 | $formElement->addClass(DatascribeElement\Textarea::class, 'datascribeFormTextarea'); 16 | $formElement->addClass(DatascribeElement\Number::class, 'datascribeFormNumber'); 17 | return $formElement; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DataScribe 2 | 3 | **Compatible with Omeka 3.x** 4 | 5 | An [Omeka S](https://omeka.org/s/) module for the transcription of structured data. 6 | 7 | When cloning this repository remember to rename the directory from "Datascribe-module" to "Datascribe". 8 | 9 | A user manual is available [in the wiki for this GitHub repository](https://github.com/chnm/Datascribe-module/wiki). Additional documentation including case studies, video tutorials, and a quick start guide are available on the project website [https://datascribe.tech](https://datascribe.tech). 10 | 11 | Note: in order to be able to export datasets, the directory `/files/asset` in your Omeka S installation must be writable by the system. 12 | 13 | ## DataScribe for Omeka 4 14 | 15 | A [beta version of DataScribe](https://github.com/chnm/Datascribe-module/releases/tag/v.1.1.1-beta) is available for use with Omeka S 4.x. Note, however, that it has not been thoroughly tested. If you run into issues or bugs, please reach out to us or submit an Issue. 16 | -------------------------------------------------------------------------------- /src/Entity/TraitSync.php: -------------------------------------------------------------------------------- 1 | syncedBy = $syncedBy; 31 | } 32 | 33 | public function getSyncedBy(): ?User 34 | { 35 | return $this->syncedBy; 36 | } 37 | 38 | public function setSynced(?DateTime $synced): void 39 | { 40 | $this->synced = $synced; 41 | } 42 | 43 | public function getSynced(): ?DateTime 44 | { 45 | return $this->synced; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Entity/TraitIdentity.php: -------------------------------------------------------------------------------- 1 | name = $name; 26 | } 27 | 28 | public function getName(): string 29 | { 30 | return $this->name; 31 | } 32 | 33 | public function setDescription(?string $description): void 34 | { 35 | if (is_string($description) && '' === trim($description)) { 36 | $description = null; 37 | } 38 | $this->description = $description; 39 | } 40 | 41 | public function getDescription(): ?string 42 | { 43 | return $this->description; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /view/datascribe/admin/dataset-record/search.phtml: -------------------------------------------------------------------------------- 1 | headLink()->prependStylesheet($this->assetUrl('css/advanced-search.css', 'Omeka')); 3 | $this->headScript()->appendFile($this->assetUrl('js/advanced-search.js', 'Omeka')); 4 | $this->htmlElement('body')->appendAttribute('class', 'datascribe record search'); 5 | ?> 6 | 7 | pageTitle($dataset->name(), 1, $this->translate('DataScribe: Dataset'), $this->translate('Record search')); ?> 8 | 9 | form()->openTag($form); ?> 10 |
11 | hyperlink($this->translate('Reset'), $this->url(null, [], true), ['class' => 'button']); ?> 12 | hyperlink($this->translate('Cancel'), $this->url(null, ['action' => 'browse'], true), ['class' => 'button']); ?> 13 | 14 |
15 | formCollection($form, false); ?> 16 | form()->closeTag(); ?> 17 | -------------------------------------------------------------------------------- /view/datascribe/admin/dataset/add.phtml: -------------------------------------------------------------------------------- 1 | headScript()->appendFile($this->assetUrl('js/admin/dataset-form.js', 'Datascribe')); 3 | $this->ckEditor(); 4 | $this->htmlElement('body')->appendAttribute('class', 'datascribe dataset add'); 5 | $form->prepare(); 6 | ?> 7 | 8 | pageTitle($project->name(), 1, $this->translate('DataScribe: Project'), $this->translate('New dataset')); ?> 9 | 10 | form()->openTag($form); ?> 11 | 12 |
13 | hyperlink('', '#', [ 14 | 'class' => 'o-icon-private button', 15 | 'title' => $this->translate('Make public'), 16 | ]); ?> 17 | 18 | hyperlink($this->translate('Cancel'), $this->url(null, ['action' => 'browse'], true), ['class' => 'button']); ?> 19 | 20 |
21 | 22 | formCollection($form, false); ?> 23 | 24 | form()->closeTag(); ?> 25 | -------------------------------------------------------------------------------- /view/datascribe/admin/record/search.phtml: -------------------------------------------------------------------------------- 1 | headLink()->prependStylesheet($this->assetUrl('css/advanced-search.css', 'Omeka')); 3 | $this->headScript()->appendFile($this->assetUrl('js/advanced-search.js', 'Omeka')); 4 | $this->htmlElement('body')->appendAttribute('class', 'datascribe record search'); 5 | ?> 6 | 7 | pageTitle($item->item()->title(), 1, $this->translate('DataScribe: Item'), $this->translate('Search')); ?> 8 | 9 | form()->openTag($form); ?> 10 |
11 | hyperlink($this->translate('Reset'), $this->url(null, [], true), ['class' => 'button']); ?> 12 | hyperlink($this->translate('Cancel'), $this->url('admin/datascribe-record', ['action' => 'browse'], true), ['class' => 'button']); ?> 13 | 14 |
15 | formCollection($form, false); ?> 16 | form()->closeTag(); ?> 17 | -------------------------------------------------------------------------------- /src/Entity/DatascribeProject.php: -------------------------------------------------------------------------------- 1 | users = new ArrayCollection; 39 | } 40 | 41 | public function getUsers() 42 | { 43 | return $this->users; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/PermissionsAssertion/IsDatascribeUserAssertion.php: -------------------------------------------------------------------------------- 1 | getDataset()->getProject(); 18 | } elseif ($resource instanceof DatascribeRecord) { 19 | $project = $resource->getItem()->getDataset()->getProject(); 20 | } else { 21 | return false; 22 | } 23 | $projectUser = $project->getUsers()->get($role->getId()); 24 | return (bool) $projectUser; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Form/ViewHelper/DatascribeFormText.php: -------------------------------------------------------------------------------- 1 | getOption('datascribe_field_data'); 12 | if (!isset($fieldData['datalist'])) { 13 | return parent::render($element); 14 | } 15 | 16 | $view = $this->getView(); 17 | 18 | $datalistId = substr(md5(rand()), 0, 7); 19 | $element->setAttribute('list', $datalistId); 20 | 21 | $datalistOptions = []; 22 | foreach ($fieldData['datalist'] as $option) { 23 | $datalistOptions[] = sprintf('