├── .gitignore ├── .gitmodules ├── BatchTestSuite.php ├── Doxyfile ├── Guardfile ├── LICENSE ├── README.md ├── UnitTestBootstrap.php ├── assets.yml ├── composer.json ├── composer.lock ├── composer.phar ├── config ├── application.config.php └── autoload │ ├── .gitignore │ ├── README.md │ ├── global.php │ ├── local.php.dist │ ├── slm_queue_doctrine.global.php │ └── zenddevelopertools.local.php.dist ├── docs ├── fonts │ ├── README.md │ └── icomoon │ │ ├── Read Me.txt │ │ ├── fonts │ │ ├── icomoon.dev.svg │ │ ├── icomoon.eot │ │ ├── icomoon.svg │ │ ├── icomoon.ttf │ │ └── icomoon.woff │ │ ├── index.html │ │ ├── license.txt │ │ ├── lte-ie7.js │ │ └── style.css ├── init.d │ ├── README.md │ └── xmlps-queues └── xmlps.conf ├── init_autoloader.php ├── javascript ├── footable.js ├── jquery-2.0.3.js ├── jquery.autocomplete.js └── script.js ├── module ├── Admin │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── Admin │ │ │ ├── Controller │ │ │ ├── SystemLogController.php │ │ │ └── UserManagementController.php │ │ │ └── Form │ │ │ ├── UserEditForm.php │ │ │ └── UserRemovalForm.php │ ├── test │ │ └── AdminTest │ │ │ └── Controller │ │ │ ├── SystemLogControllerTest.php │ │ │ └── UserManagementControllerTest.php │ └── view │ │ └── admin │ │ ├── system-log │ │ └── list.phtml │ │ └── user-management │ │ ├── edit.phtml │ │ ├── list.phtml │ │ └── remove.phtml ├── Api │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── Api │ │ │ └── Controller │ │ │ ├── JobController.php │ │ │ └── SiteController.php │ └── test │ │ └── ApiTest │ │ └── Controller │ │ ├── JobControllerTest.php │ │ └── SiteControllerTest.php ├── Application │ ├── Module.php │ ├── config │ │ └── module.config.php │ ├── language │ │ ├── en_US.mo │ │ └── en_US.po │ ├── src │ │ └── Application │ │ │ ├── Controller │ │ │ └── IndexController.php │ │ │ ├── Entity │ │ │ └── Log.php │ │ │ └── Model │ │ │ └── DAO │ │ │ └── LogDAO.php │ ├── test │ │ ├── ApplicationTest │ │ │ └── Controller │ │ │ │ └── IndexControllerTest.php │ │ └── Entity │ │ │ └── LogTest.php │ └── view │ │ ├── application │ │ └── index │ │ │ └── index.phtml │ │ ├── error │ │ ├── 404.phtml │ │ └── index.phtml │ │ ├── layout │ │ ├── editor.phtml │ │ └── layout.phtml │ │ └── partial │ │ └── paginator.phtml ├── BibtexConversion │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── BibtexConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Bibtex.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── BibtexJob.php │ └── test │ │ ├── BibtexConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── BibtexTest.php │ │ │ └── Queue │ │ │ └── BibtexJobTest.php │ │ └── assets │ │ └── document.bib.xml ├── BibtexreferencesConversion │ ├── Module.php │ ├── assets │ │ ├── biblatex2xml.xsl │ │ ├── document.bib.xml │ │ └── document.xml │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── BibtexreferencesConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Bibtexreferences.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── BibtexreferencesJob.php │ └── test │ │ ├── BibtexreferencesConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── BibtexreferencesTest.php │ │ │ └── Queue │ │ │ └── BibtexreferencesJobTest.php │ │ └── assets │ │ ├── document.bib.xml │ │ └── document.xml ├── Cermine │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── Cermine │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Cermine.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── CermineJob.php │ └── test │ │ ├── CermineTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── CermineTest.php │ │ │ └── Queue │ │ │ └── CermineJobTest.php │ │ └── assets │ │ ├── example1.pdf │ │ ├── example2.pdf │ │ └── example3.pdf ├── CitationstyleConversion │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── CitationstyleConversion │ │ │ └── Model │ │ │ ├── Citationstyles.php │ │ │ ├── Converter │ │ │ └── Pandoc.php │ │ │ ├── Queue │ │ │ └── Job │ │ │ │ └── CitationstyleJob.php │ │ │ └── Validator │ │ │ └── Title.php │ └── test │ │ ├── CitationstyleConversion │ │ └── Model │ │ │ ├── CitationstylesTest.php │ │ │ ├── Converter │ │ │ └── PandocTest.php │ │ │ └── Queue │ │ │ └── CitationstyleJobTest.php │ │ └── assets │ │ ├── document.bib │ │ ├── document.xml │ │ └── html.zip ├── DocxConversion │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── DocxConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Unoconv.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── DocxJob.php │ └── test │ │ ├── DocxConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── UnoconvTest.php │ │ │ └── Queue │ │ │ └── DocxJobTest.php │ │ └── assets │ │ └── document.odt ├── EpubConversion │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── EpubConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Epub.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── EpubJob.php │ └── test │ │ ├── EpubConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ ├── EpubGraphicsTest.php │ │ │ └── EpubTest.php │ │ │ └── Queue │ │ │ └── EpubJobTest.php │ │ └── assets │ │ ├── document.xml │ │ ├── eeg_comicsans.xml │ │ └── eeg_media │ │ └── media │ │ ├── image1.png │ │ ├── image1.wmf │ │ ├── image2.png │ │ ├── image2.wmf │ │ ├── image3.png │ │ ├── image3.wmf │ │ ├── image4.png │ │ └── image4.wmf ├── GrobidConversion │ ├── Module.php │ ├── assets │ │ └── grobid-jats.xsl │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── GrobidConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Grobid.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── GrobidJob.php │ └── test │ │ ├── GrobidConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── GrobidTest.php │ │ │ └── Queue │ │ │ └── GrobidJobTest.php │ │ └── assets │ │ └── document.pdf ├── HtmlConversion │ ├── Module.php │ ├── assets │ │ ├── html.xsl │ │ └── html │ │ │ ├── css │ │ │ └── article.css │ │ │ └── js │ │ │ └── article.js │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── HtmlConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Html.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── HtmlJob.php │ └── test │ │ ├── HtmlConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── HtmlTest.php │ │ │ └── Queue │ │ │ └── HtmlJobTest.php │ │ └── assets │ │ └── document.xml ├── Manager │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── Manager │ │ │ ├── Controller │ │ │ └── ManagerController.php │ │ │ ├── Entity │ │ │ ├── Document.php │ │ │ ├── Job.php │ │ │ └── Queue.php │ │ │ ├── Form │ │ │ ├── UploadForm.php │ │ │ └── UploadFormInputFilter.php │ │ │ └── Model │ │ │ ├── Converter │ │ │ ├── AbstractConverter.php │ │ │ └── ConverterInterface.php │ │ │ ├── DAO │ │ │ ├── DocumentDAO.php │ │ │ └── JobDAO.php │ │ │ └── Queue │ │ │ ├── Job │ │ │ ├── AbstractQueueJob.php │ │ │ └── JobInterface.php │ │ │ └── Manager.php │ ├── test │ │ ├── ManagerTest │ │ │ ├── Controller │ │ │ │ └── ManagerControllerTest.php │ │ │ └── Entity │ │ │ │ ├── DocumentEntityTest.php │ │ │ │ └── JobEntityTest.php │ │ └── assets │ │ │ ├── document.odt │ │ │ └── document.xml │ └── view │ │ └── manager │ │ └── manager │ │ ├── details.phtml │ │ ├── list.phtml │ │ └── upload.phtml ├── MergeXMLOutputs │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── MergeXMLOutputs │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Merge.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── MergeJob.php │ └── test │ │ ├── MergeXMLOutputsTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── MergeTest.php │ │ │ └── Queue │ │ │ └── MergeJobTest.php │ │ └── assets │ │ ├── document_cermine_out.xml │ │ ├── document_grobid_out.xml │ │ ├── document_nlm_out.xml │ │ ├── eeg_cermine_out.xml │ │ ├── eeg_nlm_out.xml │ │ └── metadata.json ├── NERExtraction │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── NERExtraction │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── NERExtractor.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── NERExtractionJob.php │ └── test │ │ ├── NERExtractionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── NERExtractorTest.php │ │ │ └── Queue │ │ │ └── NERExtractionJobTest.php │ │ └── assets │ │ └── document.xml ├── NlmxmlConversion │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── NlmxmlConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Metypeset.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── NlmxmlJob.php │ └── test │ │ ├── NlmxmlConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── MetypesetTest.php │ │ │ └── Queue │ │ │ └── NlmxmlJobTest.php │ │ └── assets │ │ └── document.docx ├── ParsCitConversion │ ├── Module.php │ ├── assets │ │ └── parsCit.xsl │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── ParsCitConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── ParsCit.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── ParsCitJob.php │ └── test │ │ ├── ParsCitConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── ParsCitTest.php │ │ │ └── Queue │ │ │ └── ParsCitJobTest.php │ │ └── assets │ │ └── references.txt ├── PathFinder │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── PathFinder │ │ │ └── Model │ │ │ └── Queue │ │ │ └── Job │ │ │ └── PathFinderJob.php │ └── test │ │ ├── PathFinder │ │ └── Model │ │ │ └── Queue │ │ │ ├── PathFinderPdfJobTest.php │ │ │ └── PathFinderWpJobTest.php │ │ └── assets │ │ ├── document.odt │ │ └── document.pdf ├── PdfConversion │ ├── Module.php │ ├── assets │ │ ├── wkhtmltopdf-0.11.0_rc1-amd64 │ │ └── wkhtmltopdf-0.11.0_rc1-i386 │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── PdfConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Pdf.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── PdfJob.php │ └── test │ │ ├── PdfConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── PdfTest.php │ │ │ └── Queue │ │ │ └── PdfJobTest.php │ │ └── assets │ │ └── html.zip ├── ReferencesConversion │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── ReferencesConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── References.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── ReferencesJob.php │ └── test │ │ ├── ReferencesConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── ReferencesTest.php │ │ │ └── Queue │ │ │ └── ReferencesJobTest.php │ │ └── assets │ │ ├── document.xml │ │ └── document_from_pdf.xml ├── User │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── User │ │ │ ├── Controller │ │ │ └── UserController.php │ │ │ ├── Entity │ │ │ └── User.php │ │ │ ├── Event │ │ │ └── Handler │ │ │ │ └── UserRegisterHandler.php │ │ │ ├── Form │ │ │ ├── ApiAuthTokenForm.php │ │ │ ├── LoginForm.php │ │ │ ├── LoginFormInputFilter.php │ │ │ ├── PasswordResetForm.php │ │ │ ├── PasswordResetFormInputFilter.php │ │ │ ├── RegistrationForm.php │ │ │ └── RegistrationFormInputFilter.php │ │ │ └── Model │ │ │ └── DAO │ │ │ └── UserDAO.php │ ├── test │ │ └── UserTest │ │ │ ├── Controller │ │ │ └── UserControllerTest.php │ │ │ ├── Entity │ │ │ └── UserEntityTest.php │ │ │ └── Form │ │ │ ├── LoginFormInputFilterTest.php │ │ │ ├── PasswordResetFormInputFilterTest.php │ │ │ └── RegistrationFormInputFilterTest.php │ └── view │ │ ├── _sideBar.phtml │ │ └── user │ │ └── user │ │ ├── index.phtml │ │ └── settings.phtml ├── WpPdfConversion │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── WpPdfConversion │ │ │ └── Model │ │ │ └── Queue │ │ │ └── Job │ │ │ └── WpPdfJob.php │ └── test │ │ ├── WpPdfConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── UnoconvTest.php │ │ │ └── Queue │ │ │ └── WpPdfJobTest.php │ │ └── assets │ │ └── document.odt ├── XmlFinal │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── XmlFinal │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── XmlFinal.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── XmlFinalJob.php │ └── test │ │ ├── XmlFinalTest │ │ └── Model │ │ │ └── Converter │ │ │ └── XmlFinalTest.php │ │ └── assets │ │ ├── document-stage-14.xml │ │ └── document-stage-5.xml ├── XmpConversion │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ │ └── module.config.php │ ├── src │ │ └── XmpConversion │ │ │ └── Model │ │ │ ├── Converter │ │ │ └── Xmp.php │ │ │ └── Queue │ │ │ └── Job │ │ │ └── XmpJob.php │ └── test │ │ ├── XmpConversionTest │ │ └── Model │ │ │ ├── Converter │ │ │ └── XmpTest.php │ │ │ └── Queue │ │ │ └── XmpJobTest.php │ │ └── assets │ │ ├── document.pdf │ │ ├── document.xml │ │ └── html.zip └── ZipConversion │ ├── Module.php │ ├── autoload_classmap.php │ ├── config │ └── module.config.php │ ├── src │ └── ZipConversion │ │ └── Model │ │ └── Queue │ │ └── Job │ │ └── ZipJob.php │ └── test │ └── ZipConversionTest │ └── Model │ └── Queue │ └── ZipJobTest.php ├── phpunit.xml ├── public ├── .htaccess ├── css │ └── style.min.css ├── favicon.ico ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── fontawesome-webfont.woff2 │ ├── icons │ │ ├── icomoon.dev.svg │ │ ├── icomoon.eot │ │ ├── icomoon.svg │ │ ├── icomoon.ttf │ │ └── icomoon.woff │ ├── inika-bold-webfont.eot │ ├── inika-bold-webfont.svg │ ├── inika-bold-webfont.ttf │ ├── inika-bold-webfont.woff │ ├── inika-regular-webfont.eot │ ├── inika-regular-webfont.svg │ ├── inika-regular-webfont.ttf │ ├── inika-regular-webfont.woff │ ├── oswald-bold-webfont.eot │ ├── oswald-bold-webfont.svg │ ├── oswald-bold-webfont.ttf │ ├── oswald-bold-webfont.woff │ ├── oswald-light-webfont.eot │ ├── oswald-light-webfont.svg │ ├── oswald-light-webfont.ttf │ ├── oswald-light-webfont.woff │ ├── oswald-regular-webfont.eot │ ├── oswald-regular-webfont.svg │ ├── oswald-regular-webfont.ttf │ └── oswald-regular-webfont.woff ├── img │ ├── logo-mobile.png │ ├── logo-tablet.png │ └── logo.png ├── index.php ├── js │ └── script.min.js └── texture │ ├── css │ ├── font-awesome.min.css │ ├── substance.css │ ├── texture-pagestyle.css │ ├── texture-reset.css │ └── texture.css │ ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 │ └── js │ ├── app.js │ ├── editor.js │ ├── fetch.min.js │ ├── jquery.min.js │ ├── promise.min.js │ ├── store.js │ ├── substance.js │ └── texture.js ├── start_queues.sh ├── style ├── css │ ├── jquery.autocomplete.css │ ├── scss │ │ └── style.css │ └── style.css └── scss │ ├── _colors.scss │ ├── _fonts.scss │ ├── _footable.scss │ ├── _forms.scss │ ├── _grid-settings.scss │ ├── _icons.scss │ ├── _mixins.scss │ ├── _variables.scss │ ├── bourbon │ ├── _bourbon-deprecated-upcoming.scss │ ├── _bourbon.scss │ ├── addons │ │ ├── _button.scss │ │ ├── _clearfix.scss │ │ ├── _font-family.scss │ │ ├── _hide-text.scss │ │ ├── _html5-input-types.scss │ │ ├── _position.scss │ │ ├── _prefixer.scss │ │ ├── _retina-image.scss │ │ ├── _size.scss │ │ ├── _timing-functions.scss │ │ └── _triangle.scss │ ├── css3 │ │ ├── _animation.scss │ │ ├── _appearance.scss │ │ ├── _backface-visibility.scss │ │ ├── _background-image.scss │ │ ├── _background.scss │ │ ├── _border-image.scss │ │ ├── _border-radius.scss │ │ ├── _box-sizing.scss │ │ ├── _columns.scss │ │ ├── _flex-box.scss │ │ ├── _font-face.scss │ │ ├── _hidpi-media-query.scss │ │ ├── _image-rendering.scss │ │ ├── _inline-block.scss │ │ ├── _keyframes.scss │ │ ├── _linear-gradient.scss │ │ ├── _perspective.scss │ │ ├── _placeholder.scss │ │ ├── _radial-gradient.scss │ │ ├── _transform.scss │ │ ├── _transition.scss │ │ └── _user-select.scss │ ├── functions │ │ ├── _compact.scss │ │ ├── _flex-grid.scss │ │ ├── _grid-width.scss │ │ ├── _linear-gradient.scss │ │ ├── _modular-scale.scss │ │ ├── _px-to-em.scss │ │ ├── _radial-gradient.scss │ │ ├── _tint-shade.scss │ │ └── _transition-property-name.scss │ └── helpers │ │ ├── _deprecated-webkit-gradient.scss │ │ ├── _gradient-positions-parser.scss │ │ ├── _linear-positions-parser.scss │ │ ├── _radial-arg-parser.scss │ │ ├── _radial-positions-parser.scss │ │ ├── _render-gradients.scss │ │ └── _shape-size-stripper.scss │ ├── neat │ ├── _neat-helpers.scss │ ├── _neat.scss │ ├── functions │ │ ├── _new-breakpoint.scss │ │ ├── _private.scss │ │ └── _px-to-em.scss │ ├── grid │ │ ├── _fill-parent.scss │ │ ├── _grid.scss │ │ ├── _media.scss │ │ ├── _omega.scss │ │ ├── _outer-container.scss │ │ ├── _pad.scss │ │ ├── _private.scss │ │ ├── _reset.scss │ │ ├── _row.scss │ │ ├── _shift.scss │ │ ├── _span-columns.scss │ │ ├── _to-deprecate.scss │ │ └── _visual-grid.scss │ └── settings │ │ ├── _grid.scss │ │ └── _visual-grid.scss │ └── style.scss ├── unittest.sh ├── var ├── cache │ └── .gitignore ├── doctrine │ └── .gitignore ├── documents │ └── .gitignore └── uploads │ └── .gitignore └── vendor ├── .gitignore ├── README.md └── xmlps ├── autoload_classmap.php └── library ├── Command └── Command.php ├── Controller └── Plugin │ └── ControllerAcl.php ├── DAO ├── DAO.php └── DAOInterface.php ├── DataObject └── DataObject.php ├── Doctrine └── Listener │ └── ServiceManagerListener.php ├── Event └── Handler │ ├── AclDispatchHandler.php │ └── FlashMessengerRenderHandler.php ├── Libxml └── Libxml.php ├── Log ├── Logger.php └── Writer │ └── Doctrine.php └── UnitTest ├── ControllerTest.php ├── ModelTest.php └── TestHelper.php /.gitignore: -------------------------------------------------------------------------------- 1 | html 2 | vendor/bin 3 | .sass-cache 4 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vendor/ZF2"] 2 | path = vendor/ZF2 3 | url = https://github.com/zendframework/zf2.git 4 | -------------------------------------------------------------------------------- /Guardfile: -------------------------------------------------------------------------------- 1 | # More info at https://github.com/guard/guard#readme 2 | 3 | # SASS 4 | guard :sass, :input => "style/scss", :output => "style/css" 5 | 6 | # JAMMIT 7 | guard :jammit, :config_path => "assets.yml", :output_folder => "." do 8 | watch(%r{(?:style|javascript)(/.+)\.(?:css|js)}) { |m| m[0] unless m[1] =~ /\/\./ } 9 | end 10 | -------------------------------------------------------------------------------- /assets.yml: -------------------------------------------------------------------------------- 1 | gzip_assets: off 2 | javascript_compressor: uglifier 3 | 4 | stylesheets: 5 | public/css/style.min: 6 | - style/css/jquery.autocomplete.css 7 | - style/css/style.css 8 | 9 | 10 | javascripts: 11 | public/js/script.min: 12 | - javascript/jquery-2.0.3.js 13 | - javascript/footable.js 14 | - javascript/jquery.autocomplete.js 15 | - javascript/script.js 16 | -------------------------------------------------------------------------------- /composer.phar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/composer.phar -------------------------------------------------------------------------------- /config/autoload/.gitignore: -------------------------------------------------------------------------------- 1 | local.php 2 | *.local.php 3 | -------------------------------------------------------------------------------- /config/autoload/README.md: -------------------------------------------------------------------------------- 1 | About this directory: 2 | ===================== 3 | 4 | By default, this application is configured to load all configs in 5 | `./config/autoload/{,*.}{global,local}.php`. Doing this provides a 6 | location for a developer to drop in configuration override files provided by 7 | modules, as well as cleanly provide individual, application-wide config files 8 | for things like database connections, etc. 9 | -------------------------------------------------------------------------------- /config/autoload/local.php.dist: -------------------------------------------------------------------------------- 1 | array( 5 | 'ZendDeveloperTools', 6 | ), 7 | 'conversion' => array( 8 | 'docx' => array( 9 | 'unoconv' => array( 10 | 'command' => 'unoconv', 11 | ), 12 | ), 13 | ), 14 | 'doctrine' => array( 15 | 'connection' => array( 16 | 'orm_default' => array( 17 | 'params' => array( 18 | 'user' => '', 19 | 'password' => '', 20 | ), 21 | ), 22 | ), 23 | ), 24 | 'log' => array( 25 | 'level' => 4, 26 | ), 27 | ); 28 | -------------------------------------------------------------------------------- /config/autoload/slm_queue_doctrine.global.php: -------------------------------------------------------------------------------- 1 | array( 4 | 'resources' => array( 5 | 'controller:SlmQueueDoctrine\Controller\DoctrineWorkerController:process', 6 | ), 7 | 'rules' => array( 8 | array('allow', 'guest', 'controller:SlmQueueDoctrine\Controller\DoctrineWorkerController:process'), 9 | ), 10 | ), 11 | 'slm_queue' => array( 12 | 'doctrine' => array( 13 | 'connection' => 'doctrine.connection.orm_default', 14 | 'table_name' => 'queue', 15 | ), 16 | 'queue_manager' => array( 17 | 'factories' => array( 18 | 'pathfinder' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 19 | 'docx' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 20 | 'wppdf' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 21 | 'nlmxml' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 22 | 'references' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 23 | 'bibtex' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 24 | 'bibtexreferences' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 25 | 'html' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 26 | 'epub' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 27 | 'citationstyle' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 28 | 'pdf' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 29 | 'xmp' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 30 | 'zip' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 31 | 'cermine' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 32 | 'merge' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 33 | 'ner' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 34 | 'parscit' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 35 | 'grobid' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 36 | 'xmlfinal' => 'SlmQueueDoctrine\Factory\DoctrineQueueFactory', 37 | ) 38 | ) 39 | ) 40 | ); 41 | -------------------------------------------------------------------------------- /docs/fonts/README.md: -------------------------------------------------------------------------------- 1 | The icon font used is called Icomoon (http://icomoon.io). icomoon/index.html lists all the icons available. 2 | -------------------------------------------------------------------------------- /docs/fonts/icomoon/Read Me.txt: -------------------------------------------------------------------------------- 1 | To modify your generated font, use the *dev.svg* file, located in the *fonts* folder in this package. You can import this dev.svg file to the IcoMoon app. All the tags (class names) and the Unicode points of your glyphs are saved in this file. 2 | 3 | See the documentation for more info on how to use this package: http://icomoon.io/#docs/font-face -------------------------------------------------------------------------------- /docs/fonts/icomoon/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/docs/fonts/icomoon/fonts/icomoon.eot -------------------------------------------------------------------------------- /docs/fonts/icomoon/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/docs/fonts/icomoon/fonts/icomoon.ttf -------------------------------------------------------------------------------- /docs/fonts/icomoon/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/docs/fonts/icomoon/fonts/icomoon.woff -------------------------------------------------------------------------------- /docs/fonts/icomoon/license.txt: -------------------------------------------------------------------------------- 1 | Icon Set: IcoMoon - Free -- http://keyamoon.com/icomoon/ 2 | License: CC BY 3.0 -- http://creativecommons.org/licenses/by/3.0/ -------------------------------------------------------------------------------- /docs/init.d/README.md: -------------------------------------------------------------------------------- 1 | init.d start script for the queues. 2 | -------------------------------------------------------------------------------- /docs/xmlps.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerAdmin webmaster@localhost 3 | 4 | DocumentRoot /var/www/html/public 5 | 6 | Options FollowSymLinks 7 | AllowOverride All 8 | 9 | 10 | Options -Indexes +FollowSymLinks +MultiViews 11 | AllowOverride All 12 | Order allow,deny 13 | allow from all 14 | 15 | 16 | 17 | 18 | ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 19 | 20 | AllowOverride None 21 | Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 22 | Order allow,deny 23 | Allow from all 24 | 25 | 26 | ErrorLog ${APACHE_LOG_DIR}/error.log 27 | 28 | # Possible values include: debug, info, notice, warn, error, crit, 29 | # alert, emerg. 30 | LogLevel warn 31 | 32 | CustomLog ${APACHE_LOG_DIR}/access.log combined 33 | 34 | Alias /doc/ "/usr/share/doc/" 35 | 36 | Options Indexes MultiViews FollowSymLinks 37 | AllowOverride None 38 | Order deny,allow 39 | Deny from all 40 | Allow from 127.0.0.0/255.0.0.0 ::1/128 41 | 42 | 43 | -------------------------------------------------------------------------------- /init_autoloader.php: -------------------------------------------------------------------------------- 1 | add('Zend', $zf2Path); 37 | } else { 38 | include $zf2Path . '/Zend/Loader/AutoloaderFactory.php'; 39 | Zend\Loader\AutoloaderFactory::factory(array( 40 | 'Zend\Loader\StandardAutoloader' => array( 41 | 'autoregister_zf' => true 42 | ) 43 | )); 44 | } 45 | } 46 | 47 | if (!class_exists('Zend\Loader\AutoloaderFactory')) { 48 | throw new RuntimeException('Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.'); 49 | } 50 | -------------------------------------------------------------------------------- /javascript/jquery.autocomplete.js: -------------------------------------------------------------------------------- 1 | /var/www/html/vendor/dyve/jquery-autocomplete/src/jquery.autocomplete.js -------------------------------------------------------------------------------- /javascript/script.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | // Initialize Footable plugin 3 | $('.footable').footable( 4 | { 5 | addRowToggle: true 6 | } 7 | ); 8 | 9 | // Initialize the citationstyle autocomplete plugin 10 | $('input[name="citationStyle"]').autocomplete( 11 | '/api/site/citationStyleAutocomplete', 12 | { 13 | maxItemsToShow: 20, 14 | minchars: 2, 15 | queryParamName: 'fragment', 16 | remoteDataType: 'json', 17 | processData: function(data) { 18 | if (data.status == 'success') { 19 | return data.autocomplete; 20 | } 21 | else { 22 | return []; 23 | } 24 | } 25 | } 26 | ); 27 | }); 28 | -------------------------------------------------------------------------------- /module/Admin/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | logger = $logger; 28 | $this->translator = $translator; 29 | $this->logDAO = $logDAO; 30 | } 31 | 32 | /** 33 | * List log entries 34 | * 35 | * @return mixed Array containing view variables 36 | */ 37 | public function listAction() 38 | { 39 | // Get the paginator 40 | $paginator = $this->logDAO->getLogPaginator(); 41 | $page = $this->params()->fromRoute('page'); 42 | $paginator ->setCurrentPageNumber($page); 43 | $paginator->setItemCountPerPage(50); 44 | 45 | // Display error if we got no messages 46 | if ($paginator->count() == 0) { 47 | $this->layout()->messages = array( 48 | 'info' => array( $this->translator->translate( 49 | 'admin.log.noEntriesFound' 50 | )), 51 | ); 52 | return; 53 | } 54 | 55 | return array( 56 | 'logEntries' => $paginator, 57 | 'priorities' => $this->logger->getPriorities() 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /module/Admin/src/Admin/Form/UserRemovalForm.php: -------------------------------------------------------------------------------- 1 | translator = $translator; 20 | 21 | parent::__construct('userRemovalForm'); 22 | $this->setAttribute('method', 'post'); 23 | 24 | // Add the user id field 25 | $this->add( 26 | array( 27 | 'name' => 'id', 28 | 'type' => '\Zend\Form\Element\Hidden', 29 | ) 30 | ); 31 | 32 | // Add the submit button 33 | $this->add( 34 | array( 35 | 'name' => 'submit', 36 | 'type' => '\Zend\Form\Element\Submit', 37 | 'attributes' => array( 38 | 'value' => $this->translator->translate('application.generic.remove'), 39 | ) 40 | ) 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /module/Admin/view/admin/system-log/list.phtml: -------------------------------------------------------------------------------- 1 | headTitle($this->translate('application.layout.systemLog.list')); ?> 2 | 3 |
4 | logEntries) { 6 | echo ''; 7 | echo ''; 8 | echo ''; 9 | echo ''; 10 | echo ''; 11 | echo ''; 12 | 13 | foreach ($this->logEntries as $logEntry) { 14 | echo ''; 15 | echo ''; 16 | echo ''; 17 | echo ''; 18 | echo ''; 19 | echo ''; 20 | } 21 | 22 | echo '
' . $this->translate('admin.log.time') . '' . $this->translate('admin.log.ipAddress') . '' . $this->translate('admin.log.priority') . '' . $this->translate('admin.log.message') . '
' . date('Y/m/d H:i:s', $logEntry->timestamp) . '' . $this->escapeHtml($logEntry->ip) . '' . $this->escapeHtml($this->priorities[$logEntry->priority]) . '' . str_replace("\n", '
', $this->escapeHtml($logEntry->message)) . '
'; 23 | 24 | echo $this->paginationControl( 25 | $this->logEntries, 26 | 'sliding', 27 | array('partial/paginator.phtml', 'Application'), 28 | array('route' => 'admin/system_log') 29 | ); 30 | } 31 | 32 | ?> 33 |
34 | -------------------------------------------------------------------------------- /module/Admin/view/admin/user-management/edit.phtml: -------------------------------------------------------------------------------- 1 | headTitle($this->translate('admin.userManagement.edit')); 2 | 3 | if (isset($this->userEditForm)) { 4 | $userEditForm->setAttribute('action', $this->url('admin/user_management', array('action' => 'edit'))); 5 | $userEditForm = $this->userEditForm; 6 | $userEditForm->prepare(); 7 | $userEditForm = $this->form()->render($userEditForm); 8 | } 9 | 10 | ?> 11 |
12 |
13 | 14 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /module/Admin/view/admin/user-management/remove.phtml: -------------------------------------------------------------------------------- 1 | headTitle($this->translate('admin.userManagement.removeUser')); 3 | 4 | if (isset($this->userRemovalForm)) { 5 | $userRemovalForm->setAttribute('action', $this->url('admin/user_management', array('action' => 'remove'))); 6 | $userRemovalForm = $this->userRemovalForm; 7 | $userRemovalForm->prepare(); 8 | $userRemovalForm = $this->form()->render($userRemovalForm); 9 | } 10 | 11 | ?> 12 |
13 |
14 | 15 |

escapeHtml(sprintf($this->translate('admin.userManagement.userRemovalConfirm'), $user->email)) ?>

16 | 17 |
18 |
19 | -------------------------------------------------------------------------------- /module/Api/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | logger = $logger; 33 | $this->translator = $translator; 34 | $this->citationStyles = $citationStyles; 35 | } 36 | 37 | 38 | /** 39 | * Implements autocomplete functionality for the citationstyle text field 40 | * in the upload form 41 | * 42 | * @return array Array containing a list of titles that match the provided fragment 43 | */ 44 | public function citationStyleAutocompleteAction() 45 | { 46 | // Make sure the file content parameter is provided 47 | if (!($fragment = $this->params()->fromQuery('fragment'))) { 48 | return new JsonModel(array( 49 | 'status' => 'error', 50 | 'error' => $this->translator->translate('job.api.error.fragmentParameterMissing') 51 | )); 52 | } 53 | 54 | $citationStyles = $this->citationStyles->getTitleList($fragment); 55 | 56 | return new JsonModel(array( 57 | 'autocomplete' => $citationStyles, 58 | 'status' => 'success' 59 | )); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /module/Api/test/ApiTest/Controller/SiteControllerTest.php: -------------------------------------------------------------------------------- 1 | citationStyles = $this->sm->get('CitationstyleConversion\Model\Citationstyles'); 24 | 25 | $this->resetTestData(); 26 | } 27 | 28 | /** 29 | * Tests if the citationstyle autocomplete action works correctly 30 | * 31 | * @return void 32 | */ 33 | public function testCitationStyleAutocompleteAction() 34 | { 35 | $this->mockLogin($this->user); 36 | $styleMap = $this->citationStyles->getStyleMap(); 37 | $citationStyle = array_pop($styleMap); 38 | $fragment = substr($citationStyle['title'], 0, 3); 39 | 40 | $this->dispatch('/api/site/citationStyleAutocomplete?fragment=' . urlencode($fragment)); 41 | $this->assertResponseStatusCode(200); 42 | $response = json_decode($this->getResponse()->getContent()); 43 | $this->assertTrue(is_object($response)); 44 | $this->assertSame($response->status, 'success'); 45 | $this->assertTrue(isset($response->autocomplete)); 46 | $this->assertTrue( 47 | (strpos(strtolower($response->autocomplete[0]), strtolower($fragment)) !== false) 48 | ); 49 | } 50 | 51 | /** 52 | * Creates test data for this test 53 | * 54 | * @return void 55 | */ 56 | protected function createTestData() 57 | { 58 | // Create test user 59 | $this->user = $this->createTestUser(); 60 | } 61 | 62 | /** 63 | * Cleans test data after test 64 | * 65 | * @return void 66 | */ 67 | protected function cleanTestData() 68 | { 69 | $this->deleteTestUser(); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /module/Application/language/en_US.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/Application/language/en_US.mo -------------------------------------------------------------------------------- /module/Application/src/Application/Controller/IndexController.php: -------------------------------------------------------------------------------- 1 | getPaginator( 25 | 'SELECT l from Application\Entity\Log l ORDER BY l.id DESC' 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /module/Application/test/ApplicationTest/Controller/IndexControllerTest.php: -------------------------------------------------------------------------------- 1 | dispatch('/'); 11 | $this->assertResponseStatusCode(200); 12 | 13 | $this->assertModuleName('User'); 14 | $this->assertControllerName('User\Controller\User'); 15 | $this->assertControllerClass('UserController'); 16 | $this->assertMatchedRouteName('home'); 17 | } 18 | 19 | /** 20 | * Tests if the service manager provides access to the Logger 21 | * 22 | * @return void 23 | */ 24 | public function testLoggerCanBeAccessed() 25 | { 26 | $sm = $this->getApplicationServiceLocator(); 27 | $this->assertTrue($sm->get('Logger') instanceof \Xmlps\Logger\Logger); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /module/Application/test/Entity/LogTest.php: -------------------------------------------------------------------------------- 1 | log = new Log; 19 | } 20 | 21 | /** 22 | * Test if all the required properties exist 23 | * 24 | * @return void 25 | */ 26 | public function testUserRegistrationDate() 27 | { 28 | $this->assertTrue(property_exists($this->log, 'timestamp')); 29 | $this->assertTrue(property_exists($this->log, 'priority')); 30 | $this->assertTrue(property_exists($this->log, 'message')); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /module/Application/view/application/index/index.phtml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/Application/view/application/index/index.phtml -------------------------------------------------------------------------------- /module/Application/view/layout/editor.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
47 |
48 | 49 |
50 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /module/Application/view/partial/paginator.phtml: -------------------------------------------------------------------------------- 1 | pageCount): ?> 2 | 36 | 37 | -------------------------------------------------------------------------------- /module/BibtexConversion/Module.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | /** 39 | * Get service config 40 | * 41 | * @return array 42 | */ 43 | public function getServiceConfig() 44 | { 45 | return array( 46 | 'factories' => array( 47 | 'BibtexConversion\Model\Converter\Bibtex' => function($sm) 48 | { 49 | $config = $sm->get('Config'); 50 | $logger = $sm->get('Logger'); 51 | if (!isset($config['conversion']['bibtex']['xml2bib'])) { 52 | throw new \Exception('xml2bib configuration is missing'); 53 | } 54 | $config = $config['conversion']['bibtex']['xml2bib']; 55 | 56 | return new Bibtex($config, $logger); 57 | }, 58 | ), 59 | ); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /module/BibtexConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | bibtex = $this->sm->get('BibtexConversion\Model\Converter\Bibtex'); 26 | 27 | $this->resetTestData(); 28 | } 29 | 30 | /** 31 | * Test if the input file validation works properly 32 | * 33 | * @return void 34 | */ 35 | public function testInputFileDoesntExist() 36 | { 37 | $this->setExpectedException('Exception'); 38 | $this->bibtex->setInputFile($this->testInputFile . rand()); 39 | } 40 | 41 | /** 42 | * Test if the bibtex conversion works correctly 43 | * 44 | * @return void 45 | */ 46 | public function testConversion() 47 | { 48 | $this->bibtex->setInputFile($this->testInputFile); 49 | $this->bibtex->setOutputFile($this->testOutputFile); 50 | $this->bibtex->convert(); 51 | 52 | $this->assertTrue(is_file($this->testOutputFile)); 53 | $this->assertTrue($this->bibtex->getStatus()); 54 | 55 | $this->assertNotSame( 56 | file_get_contents($this->testInputFile), 57 | file_get_contents($this->testOutputFile) 58 | ); 59 | 60 | $finfo = finfo_open(FILEINFO_MIME_TYPE); 61 | $mimeType = finfo_file($finfo, $this->testOutputFile); 62 | 63 | $this->assertSame($mimeType, 'text/plain'); 64 | } 65 | 66 | /** 67 | * Remove test data 68 | * 69 | * @return void 70 | */ 71 | protected function cleanTestData() 72 | { 73 | @unlink($this->testOutputFile); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /module/BibtexreferencesConversion/Module.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | /** 39 | * Get service config 40 | * 41 | * @return array 42 | */ 43 | public function getServiceConfig() 44 | { 45 | return array( 46 | 'factories' => array( 47 | 'BibtexreferencesConversion\Model\Converter\Bibtexreferences' => function($sm) 48 | { 49 | $config = $sm->get('Config'); 50 | $logger = $sm->get('Logger'); 51 | if (!isset($config['conversion']['bibtexreferences']['biblatex2xml'])) { 52 | throw new \Exception('biblatex2xml configuration is missing'); 53 | } 54 | $config = $config['conversion']['bibtexreferences']['biblatex2xml']; 55 | 56 | return new Bibtexreferences($config, $logger); 57 | }, 58 | ), 59 | ); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /module/BibtexreferencesConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | /** 39 | * Get service config 40 | * 41 | * @return array 42 | */ 43 | public function getServiceConfig() 44 | { 45 | return array( 46 | 'factories' => array( 47 | 'Cermine\Model\Converter\Cermine' => function($sm) 48 | { 49 | $config = $sm->get('Config'); 50 | $logger = $sm->get('Logger'); 51 | if (!isset($config['conversion']['cermine'])) { 52 | throw new \Exception('CERMINE configuration is missing'); 53 | } 54 | $config = $config['conversion']['cermine']; 55 | 56 | return new Cermine($config, $logger); 57 | } 58 | ) 59 | ); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /module/Cermine/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | citationStyles = $options['citationStyles']; 24 | } 25 | else { 26 | throw new Exception('An instance of CitationstyleConversion\Model\Citationstyles needs to be provided'); 27 | } 28 | } 29 | 30 | protected $messageTemplates = array( 31 | self::MSG_TITLE => 'Invalid citation style', 32 | ); 33 | 34 | public function isValid($title) 35 | { 36 | if (!$this->citationStyles->validTitle($title)) { 37 | $this->setValue($title); 38 | $this->error(self::MSG_TITLE); 39 | return false; 40 | } 41 | 42 | return true; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /module/CitationstyleConversion/test/assets/html.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/CitationstyleConversion/test/assets/html.zip -------------------------------------------------------------------------------- /module/DocxConversion/Module.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | /** 39 | * Get service config 40 | * 41 | * @return array 42 | */ 43 | public function getServiceConfig() 44 | { 45 | return array( 46 | 'factories' => array( 47 | 'DocxConversion\Model\Converter\Unoconv' => function($sm) 48 | { 49 | $config = $sm->get('Config'); 50 | $logger = $sm->get('Logger'); 51 | if (!isset($config['conversion']['docx']['unoconv'])) { 52 | throw new \Exception('Unoconv configuration is missing'); 53 | } 54 | $config = $config['conversion']['docx']['unoconv']; 55 | 56 | return new Unoconv($config, $logger); 57 | } 58 | ) 59 | ); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /module/DocxConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | sm->get('DocxConversion\Model\Converter\Unoconv'); 22 | 23 | // Fetch the document to convert 24 | $unconvertedDocument = 25 | $job->getStageDocument(JOB_CONVERSION_STAGE_WP_IN); 26 | if (!$unconvertedDocument) { 27 | throw new \Exception('Couldn\'t find the stage document'); 28 | } 29 | 30 | // Convert the document 31 | $unoconv->setFilter('docx7'); 32 | $unoconv->setInputFile($unconvertedDocument->path); 33 | $outputPath = $job->getDocumentPath() . '/document.docx'; 34 | $unoconv->setOutputFile($outputPath); 35 | $unoconv->convert(); 36 | 37 | if (!$unoconv->getStatus()) { 38 | $job->status = JOB_STATUS_FAILED; 39 | return $job; 40 | } 41 | 42 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO'); 43 | $docxDocument = $documentDAO->getInstance(); 44 | $docxDocument->path = $outputPath; 45 | $docxDocument->mimeType = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; 46 | $docxDocument->job = $job; 47 | $docxDocument->conversionStage = JOB_CONVERSION_STAGE_DOCX; 48 | 49 | $job->documents[] = $docxDocument; 50 | $job->conversionStage = JOB_CONVERSION_STAGE_DOCX; 51 | 52 | return $job; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /module/DocxConversion/test/assets/document.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/DocxConversion/test/assets/document.odt -------------------------------------------------------------------------------- /module/EpubConversion/Module.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | 39 | /** 40 | * Get service config 41 | * 42 | * @return array 43 | */ 44 | public function getServiceConfig() 45 | { 46 | return array( 47 | 'factories' => array( 48 | 'EpubConversion\Model\Converter\Epub' => function($sm) 49 | { 50 | $config = $sm->get('Config'); 51 | $logger = $sm->get('Logger'); 52 | if (!isset($config['conversion']['epub'])) { 53 | throw new \Exception('Epub converter configuration is missing'); 54 | } 55 | $config = $config['conversion']['epub']; 56 | 57 | return new Epub($config, $logger); 58 | }, 59 | ), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /module/EpubConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | sm->get('EpubConversion\Model\Converter\Epub'); 25 | 26 | // Fetch the NLMXML document resulting from merge, or from 27 | // reference correction, or as extracted from PDF, in order of 28 | // preference. 29 | $document = $job->getStageDocument(JOB_CONVERSION_STAGE_XML_MERGE); 30 | if (!$document) { 31 | $document = 32 | $job->getStageDocument(JOB_CONVERSION_STAGE_BIBTEXREFERENCES); 33 | } 34 | if (!$document) { 35 | $document = 36 | $job->getStageDocument(JOB_CONVERSION_STAGE_PDF_EXTRACT); 37 | } 38 | if (!$document) { 39 | throw new \Exception('Couldn\'t find the stage document'); 40 | } 41 | 42 | $outputFile = $job->getDocumentPath() . '/document.epub'; 43 | $epub->setInputFile($document->path); 44 | $epub->setOutputFile($outputFile); 45 | $epub->convert(); 46 | 47 | $job->conversionStage = JOB_CONVERSION_STAGE_EPUB; 48 | 49 | if (!$epub->getStatus()) { 50 | $job->status = JOB_STATUS_FAILED; 51 | return $job; 52 | } 53 | 54 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO'); 55 | $epubDocument = $documentDAO->getInstance(); 56 | $epubDocument->path = $outputFile; 57 | $epubDocument->job = $job; 58 | $epubDocument->conversionStage = JOB_CONVERSION_STAGE_EPUB; 59 | 60 | $job->documents[] = $epubDocument; 61 | 62 | return $job; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /module/EpubConversion/test/assets/eeg_media/media/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image1.png -------------------------------------------------------------------------------- /module/EpubConversion/test/assets/eeg_media/media/image1.wmf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image1.wmf -------------------------------------------------------------------------------- /module/EpubConversion/test/assets/eeg_media/media/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image2.png -------------------------------------------------------------------------------- /module/EpubConversion/test/assets/eeg_media/media/image2.wmf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image2.wmf -------------------------------------------------------------------------------- /module/EpubConversion/test/assets/eeg_media/media/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image3.png -------------------------------------------------------------------------------- /module/EpubConversion/test/assets/eeg_media/media/image3.wmf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image3.wmf -------------------------------------------------------------------------------- /module/EpubConversion/test/assets/eeg_media/media/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image4.png -------------------------------------------------------------------------------- /module/EpubConversion/test/assets/eeg_media/media/image4.wmf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/EpubConversion/test/assets/eeg_media/media/image4.wmf -------------------------------------------------------------------------------- /module/GrobidConversion/Module.php: -------------------------------------------------------------------------------- 1 | array ( 26 | __DIR__ . '/autoload_classmap.php' 27 | ), 28 | 'Zend\Loader\StandardAutoloader' => array ( 29 | 'namespaces' => array ( 30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__ 31 | ) 32 | ) 33 | ); 34 | } 35 | 36 | /** 37 | * Get service config 38 | * 39 | * @return array 40 | */ 41 | public function getServiceConfig() { 42 | return array ( 43 | 'factories' => array ( 44 | 'GrobidConversion\Model\Converter\Grobid' => function ($sm) { 45 | $config = $sm->get ( 'Config' ); 46 | $logger = $sm->get ( 'Logger' ); 47 | 48 | if (!isset($config['conversion']['grobid'])) { 49 | throw new \Exception('Grobid configuration is missing'); 50 | } 51 | $config = $config['conversion']['grobid']; 52 | 53 | return new Grobid ( $config, $logger ); 54 | } 55 | ) 56 | ); 57 | } 58 | } -------------------------------------------------------------------------------- /module/GrobidConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | sm->get('GrobidConversion\Model\Converter\GrobId'); 22 | 23 | // Fetch the document to convert 24 | if (!$pdfDocument = $job->getStageDocument(JOB_CONVERSION_STAGE_PDF_IN)) { 25 | $pdfDocument = $job->getStageDocument(JOB_CONVERSION_STAGE_WP_PDF); 26 | } 27 | 28 | if (!$pdfDocument) { 29 | throw new \Exception('Couldn\'t find the stage document'); 30 | } 31 | 32 | $outputPath = $job->getDocumentPath() . '/grobid.xml'; 33 | 34 | $job->conversionStage = JOB_CONVERSION_STAGE_GROBID; 35 | 36 | // Convert the document 37 | $grobid->setInputFile($pdfDocument->path); 38 | $grobid->setOutputFile($outputPath); 39 | $grobid->convert(); 40 | 41 | 42 | if (!$grobid->getStatus()) { 43 | $job->status = JOB_STATUS_FAILED; 44 | return $job; 45 | } 46 | 47 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO'); 48 | $teiDocument = $documentDAO->getInstance(); 49 | $teiDocument->path = $outputPath; 50 | $teiDocument->job = $job; 51 | $teiDocument->conversionStage = JOB_CONVERSION_STAGE_GROBID; 52 | 53 | $job->documents[] = $teiDocument; 54 | $job->conversionStage = JOB_CONVERSION_STAGE_GROBID; 55 | 56 | return $job; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /module/GrobidConversion/test/assets/document.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/GrobidConversion/test/assets/document.pdf -------------------------------------------------------------------------------- /module/HtmlConversion/Module.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | /** 39 | * Get service config 40 | * 41 | * @return array 42 | */ 43 | public function getServiceConfig() 44 | { 45 | return array( 46 | 'factories' => array( 47 | 'HtmlConversion\Model\Converter\Html' => function($sm) 48 | { 49 | $config = $sm->get('Config'); 50 | $logger = $sm->get('Logger'); 51 | if (!isset($config['conversion']['html'])) { 52 | throw new \Exception('Html converter configuration is missing'); 53 | } 54 | $config = $config['conversion']['html']; 55 | 56 | return new Html($config, $logger); 57 | }, 58 | ), 59 | ); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /module/HtmlConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | sm->get('HtmlConversion\Model\Converter\Html'); 25 | 26 | // Fetch the NLMXML document resulting from merge, or from 27 | // reference correction, or as extracted from PDF, in order of 28 | // preference. 29 | $document = $job->getStageDocument(JOB_CONVERSION_STAGE_XML_MERGE); 30 | if (!$document) { 31 | $document = 32 | $job->getStageDocument(JOB_CONVERSION_STAGE_BIBTEXREFERENCES); 33 | } 34 | if (!$document) { 35 | $document = 36 | $job->getStageDocument(JOB_CONVERSION_STAGE_PDF_EXTRACT); 37 | } 38 | if (!$document) { 39 | throw new \Exception('Couldn\'t find the stage document'); 40 | } 41 | 42 | $outputFile = $job->getDocumentPath() . '/html.zip'; 43 | $html->setInputFile($document->path); 44 | $html->setOutputFile($outputFile); 45 | $html->convert(); 46 | 47 | $job->conversionStage = JOB_CONVERSION_STAGE_HTML; 48 | 49 | if (!$html->getStatus()) { 50 | $job->status = JOB_STATUS_FAILED; 51 | return $job; 52 | } 53 | 54 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO'); 55 | $htmlDocument = $documentDAO->getInstance(); 56 | $htmlDocument->path = $outputFile; 57 | $htmlDocument->job = $job; 58 | $htmlDocument->conversionStage = JOB_CONVERSION_STAGE_HTML; 59 | 60 | $job->documents[] = $htmlDocument; 61 | 62 | return $job; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /module/Manager/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | translator = $translator; 22 | 23 | parent::__construct('upload'); 24 | $this->setAttribute('method', 'post'); 25 | $this->setAttribute('class', 'upload-form'); 26 | 27 | // Add the upload field 28 | $this->add( 29 | array( 30 | 'name' => 'upload', 31 | 'type' => '\Zend\Form\Element\File', 32 | 'options' => array( 33 | 'label' => $this->translator->translate('manager.uploadForm.file'), 34 | ), 35 | ) 36 | ); 37 | 38 | $this->add( 39 | array( 40 | 'name' => 'citationStyle', 41 | 'type' => '\Zend\Form\Element\Text', 42 | 'options' => array( 43 | 'label' => $this->translator->translate('manager.uploadForm.citationStyles'), 44 | ), 45 | 'attributes' => array( 46 | 'placeholder' => $this->translator->translate('manager.uploadForm.citationStyleAutocomplete') 47 | ), 48 | ) 49 | ); 50 | 51 | // Add the submit button 52 | $this->add( 53 | array( 54 | 'name' => 'submit', 55 | 'type' => '\Zend\Form\Element\Submit', 56 | 'attributes' => array( 57 | 'value' => $this->translator->translate('manager.uploadForm.uploadDocument'), 58 | ) 59 | ) 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /module/Manager/src/Manager/Model/Converter/AbstractConverter.php: -------------------------------------------------------------------------------- 1 | output; 22 | } 23 | 24 | /** 25 | * Returns the status 26 | * 27 | * @return void 28 | */ 29 | public function getStatus() 30 | { 31 | return $this->status; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /module/Manager/src/Manager/Model/Converter/ConverterInterface.php: -------------------------------------------------------------------------------- 1 | getPaginator( 29 | 'SELECT d FROM Manager\Entity\Document AS d WHERE d.job = :jobId ORDER BY d.id DESC', 30 | array('jobId' => $job->id) 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /module/Manager/src/Manager/Model/DAO/JobDAO.php: -------------------------------------------------------------------------------- 1 | getPaginator( 29 | 'SELECT j FROM Manager\Entity\Job AS j WHERE j.user = :userId ORDER BY j.id DESC', 30 | array('userId' => $user->id) 31 | ); 32 | } 33 | 34 | /** 35 | * Returns a admin job paginator with all users jobs ordered by creation 36 | * 37 | * @return Zend\Paginator\Paginator 38 | */ 39 | public function getAdminJobPaginator() 40 | { 41 | return $this->getPaginator( 42 | 'SELECT j FROM Manager\Entity\Job AS j ORDER BY j.id DESC' 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /module/Manager/src/Manager/Model/Queue/Job/JobInterface.php: -------------------------------------------------------------------------------- 1 | headTitle($this->translate('application.manager.index')); 3 | 4 | if (isset($this->uploadForm)) { 5 | $uploadForm->setAttribute('action', $this->url('manager', array('action' => 'upload'))); 6 | $uploadForm = $this->uploadForm; 7 | $uploadForm->prepare(); 8 | $uploadForm = $this->form()->render($uploadForm); 9 | } 10 | ?> 11 |
12 | 13 |
14 |
15 | 16 | 17 |
18 |
19 | 20 |
21 | -------------------------------------------------------------------------------- /module/MergeXMLOutputs/Module.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | /** 39 | * Get service config 40 | * 41 | * @return array 42 | */ 43 | public function getServiceConfig() 44 | { 45 | return array( 46 | 'factories' => array( 47 | 'MergeXMLOutputs\Model\Converter\Merge' => function($sm) 48 | { 49 | $config = $sm->get('Config'); 50 | $logger = $sm->get('Logger'); 51 | 52 | return new Merge($config, $logger); 53 | }, 54 | ), 55 | ); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /module/MergeXMLOutputs/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | array ( 26 | __DIR__ . '/autoload_classmap.php' 27 | ), 28 | 'Zend\Loader\StandardAutoloader' => array ( 29 | 'namespaces' => array ( 30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__ 31 | ) 32 | ) 33 | ); 34 | } 35 | 36 | /** 37 | * Get service config 38 | * 39 | * @return array 40 | */ 41 | public function getServiceConfig() { 42 | return array ( 43 | 'factories' => array ( 44 | 'NERExtraction\Model\Converter\NERExtractor' => function ($sm) { 45 | $config = $sm->get ( 'Config' ); 46 | $logger = $sm->get ( 'Logger' ); 47 | 48 | if (!isset($config['conversion']['ner'])) { 49 | throw new \Exception('NER configuration is missing'); 50 | } 51 | $config = $config['conversion']['ner']; 52 | 53 | return new NERExtractor ( $config, $logger ); 54 | } 55 | ) 56 | ); 57 | } 58 | } -------------------------------------------------------------------------------- /module/NERExtraction/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | sm->get('NERExtraction\Model\Converter\NERExtractor'); 22 | 23 | // fetch xml document 24 | $doc = $job->getStageDocument(JOB_CONVERSION_STAGE_XML_MERGE); 25 | 26 | if (!$doc) { 27 | throw new \Exception("Couldn't find the stage document"); 28 | } 29 | 30 | $job->conversionStage = JOB_CONVERSION_STAGE_NER_EXTRACT; 31 | 32 | // generate named entities document 33 | $extractor->setInputFile($doc->path); 34 | $outputPath = $job->getDocumentPath() . '/named-entities.json'; 35 | $extractor->setOutputFile($outputPath); 36 | $extractor->convert(); 37 | 38 | if (!$extractor->getStatus()) { 39 | $job->status = JOB_STATUS_FAILED; 40 | return $job; 41 | } 42 | 43 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO'); 44 | $jsonDocument = $documentDAO->getInstance(); 45 | $jsonDocument->path = $outputPath; 46 | $jsonDocument->mimeType = 'application/json'; 47 | $jsonDocument->job = $job; 48 | $jsonDocument->conversionStage = JOB_CONVERSION_STAGE_NER_EXTRACT; 49 | 50 | $job->documents[] = $jsonDocument; 51 | 52 | return $job; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /module/NlmxmlConversion/Module.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | /** 39 | * Get service config 40 | * 41 | * @return array 42 | */ 43 | public function getServiceConfig() 44 | { 45 | return array( 46 | 'factories' => array( 47 | 'NlmxmlConversion\Model\Converter\Metypeset' => function($sm) 48 | { 49 | $config = $sm->get('Config'); 50 | $logger = $sm->get('Logger'); 51 | if (!isset($config['conversion']['nlmxml']['metypeset'])) { 52 | throw new \Exception('meTypeset configuration is missing'); 53 | } 54 | $config = $config['conversion']['nlmxml']['metypeset']; 55 | 56 | return new Metypeset($config, $logger); 57 | }, 58 | ), 59 | ); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /module/NlmxmlConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | sm->get('NlmxmlConversion\Model\Converter\Metypeset'); 22 | 23 | // Fetch the document to convert 24 | $docxDocument = $job->getStageDocument(JOB_CONVERSION_STAGE_DOCX); 25 | if (!$docxDocument) { 26 | throw new \Exception('Couldn\'t find the stage document'); 27 | } 28 | 29 | // Convert the document 30 | $metypeset->setInputFile($docxDocument->path); 31 | $outputDirectory = $job->getDocumentPath() . '/metypeset'; 32 | $metypeset->setOutputDirectory($outputDirectory); 33 | $metypeset->convert(); 34 | 35 | $xmlFile = $docxDocument->getFileName(true) . '.xml'; 36 | $meTypesetOutputPath = $outputDirectory . '/nlm/' . $xmlFile; 37 | 38 | if (!$metypeset->getStatus() or !file_exists($meTypesetOutputPath)) { 39 | $job->status = JOB_STATUS_FAILED; 40 | return $job; 41 | } 42 | 43 | $outputPath = $job->getDocumentPath() . '/document_metypeset.xml'; 44 | @copy($meTypesetOutputPath, $outputPath); 45 | 46 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO'); 47 | $docxDocument = $documentDAO->getInstance(); 48 | $docxDocument->path = $outputPath; 49 | $docxDocument->job = $job; 50 | $docxDocument->conversionStage = JOB_CONVERSION_STAGE_NLMXML; 51 | 52 | $job->documents[] = $docxDocument; 53 | $job->conversionStage = JOB_CONVERSION_STAGE_NLMXML; 54 | 55 | return $job; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /module/NlmxmlConversion/test/assets/document.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/NlmxmlConversion/test/assets/document.docx -------------------------------------------------------------------------------- /module/ParsCitConversion/Module.php: -------------------------------------------------------------------------------- 1 | array ( 26 | __DIR__ . '/autoload_classmap.php' 27 | ), 28 | 'Zend\Loader\StandardAutoloader' => array ( 29 | 'namespaces' => array ( 30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__ 31 | ) 32 | ) 33 | ); 34 | } 35 | 36 | /** 37 | * Get service config 38 | * 39 | * @return array 40 | */ 41 | public function getServiceConfig() { 42 | return array ( 43 | 'factories' => array ( 44 | 'ParsCitConversion\Model\Converter\ParsCit' => function ($sm) { 45 | $config = $sm->get ( 'Config' ); 46 | $logger = $sm->get ( 'Logger' ); 47 | 48 | if (!isset($config['conversion']['parsCit'])) { 49 | throw new \Exception('ParsCit configuration is missing'); 50 | } 51 | $config = $config['conversion']['parsCit']; 52 | 53 | return new ParsCit ( $config, $logger ); 54 | } 55 | ) 56 | ); 57 | } 58 | } -------------------------------------------------------------------------------- /module/ParsCitConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | array( 26 | __DIR__ . '/autoload_classmap.php' 27 | ), 28 | 'Zend\Loader\StandardAutoloader' => array( 29 | 'namespaces' => array( 30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 31 | ), 32 | ), 33 | ); 34 | } 35 | 36 | /** 37 | * Get service config 38 | * 39 | * @return array 40 | */ 41 | public function getServiceConfig() 42 | { 43 | return array(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /module/PathFinder/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | /** 39 | * Get service config 40 | * 41 | * @return array 42 | */ 43 | public function getServiceConfig() 44 | { 45 | return array( 46 | 'factories' => array( 47 | 'PdfConversion\Model\Converter\Pdf' => function($sm) 48 | { 49 | $config = $sm->get('Config'); 50 | $logger = $sm->get('Logger'); 51 | if (!isset($config['conversion']['pdf'])) { 52 | throw new \Exception('Pdf converter configuration is missing'); 53 | } 54 | $config = $config['conversion']['pdf']; 55 | 56 | return new Pdf($config, $logger); 57 | }, 58 | ), 59 | ); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /module/PdfConversion/assets/wkhtmltopdf-0.11.0_rc1-amd64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/PdfConversion/assets/wkhtmltopdf-0.11.0_rc1-amd64 -------------------------------------------------------------------------------- /module/PdfConversion/assets/wkhtmltopdf-0.11.0_rc1-i386: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/PdfConversion/assets/wkhtmltopdf-0.11.0_rc1-i386 -------------------------------------------------------------------------------- /module/PdfConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | sm->get('PdfConversion\Model\Converter\Pdf'); 22 | 23 | // Fetch the zip file containing the html; check if we got one that has 24 | // the citations converted first and fall back to unconverted HTML 25 | if ( 26 | !($document = $job->getStageDocument(JOB_CONVERSION_STAGE_CITATIONSTYLE)) and 27 | !($document = $job->getStageDocument(JOB_CONVERSION_STAGE_HTML)) 28 | ) { 29 | throw new \Exception('Couldn\'t find the stage document'); 30 | } 31 | 32 | $outputFile = $job->getDocumentPath() . '/document.pdf'; 33 | $pdf->setInputFile($document->path); 34 | $pdf->setOutputFile($outputFile); 35 | $pdf->convert(); 36 | 37 | $job->conversionStage = JOB_CONVERSION_STAGE_PDF; 38 | 39 | if (!$pdf->getStatus()) { 40 | $job->status = JOB_STATUS_FAILED; 41 | return $job; 42 | } 43 | 44 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO'); 45 | $pdfDocument = $documentDAO->getInstance(); 46 | $pdfDocument->path = $outputFile; 47 | $pdfDocument->job = $job; 48 | $pdfDocument->conversionStage = JOB_CONVERSION_STAGE_PDF; 49 | 50 | $job->documents[] = $pdfDocument; 51 | 52 | return $job; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /module/PdfConversion/test/assets/html.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/PdfConversion/test/assets/html.zip -------------------------------------------------------------------------------- /module/ReferencesConversion/Module.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | /** 39 | * Get service config 40 | * 41 | * @return array 42 | */ 43 | public function getServiceConfig() 44 | { 45 | return array( 46 | 'factories' => array( 47 | 'ReferencesConversion\Model\Converter\References' => function($sm) 48 | { 49 | $config = $sm->get('Config'); 50 | $logger = $sm->get('Logger'); 51 | if (!isset($config['conversion']['references'])) { 52 | throw new \Exception("CrossRef's configuration is missing"); 53 | } 54 | $config = $config['conversion']['references']; 55 | 56 | return new References($config, $logger); 57 | }, 58 | ), 59 | ); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /module/ReferencesConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | International Journal of Pharmaceutical and Life Sciences 6 | 7 | 8 | 9 | 10 | Mohammed Raihan Chowdhury 15 August 2012 11 | 12 | 13 |

Two research paper, one review article and one conceptual paper are included in this issue. Due to delayed feedback concerning post-review revision from authors, some articles are not included in this issue. We expect fast response from authors if their article is sent back to them to edit. Thanks to all who were involved in review process, technical/functional support and authors who sent their papers to this journal.

14 |
15 | 1 16 | 1 17 | 18 | 2012 19 | 20 |
21 |
22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /module/User/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | translator = $translator; 20 | 21 | parent::__construct('apiauthtoken'); 22 | 23 | $this->setAttribute('method', 'post'); 24 | $this->setAttribute('class', 'apiauthtoken-form'); 25 | 26 | // Add the submit button 27 | $this->add( 28 | array( 29 | 'name' => 'submit', 30 | 'type' => '\Zend\Form\Element\Submit', 31 | 'attributes' => array( 32 | 'value' => $this->translator->translate('user.ApiAuthTokenForm.submit'), 33 | ) 34 | ) 35 | ); 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /module/User/src/User/Form/LoginForm.php: -------------------------------------------------------------------------------- 1 | translator = $translator; 20 | 21 | parent::__construct('login'); 22 | $this->setAttribute('method', 'post'); 23 | $this->setAttribute('class', 'login-form'); 24 | 25 | // Add the email field 26 | $this->add( 27 | array( 28 | 'name' => 'email', 29 | 'type' => '\Zend\Form\Element\Email', 30 | 'attributes' => array( 31 | 'placeholder' => $this->translator->translate('user.form.emailAddress') 32 | ), 33 | ) 34 | ); 35 | 36 | // Add the password field 37 | $this->add( 38 | array( 39 | 'name' => 'password', 40 | 'type' => '\Zend\Form\Element\Password', 41 | 'attributes' => array( 42 | 'placeholder' => $this->translator->translate('user.form.password') 43 | ), 44 | ) 45 | ); 46 | 47 | // Add the submit button 48 | $this->add( 49 | array( 50 | 'name' => 'submit', 51 | 'type' => '\Zend\Form\Element\Submit', 52 | 'attributes' => array( 53 | 'value' => $this->translator->translate('user.loginForm.login'), 54 | ) 55 | ) 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /module/User/src/User/Form/PasswordResetForm.php: -------------------------------------------------------------------------------- 1 | translator = $translator; 20 | 21 | parent::__construct('passwordReset'); 22 | $this->setAttribute('method', 'post'); 23 | $this->setAttribute('class', 'password-reset-form'); 24 | 25 | // Add the new password field 26 | $this->add( 27 | array( 28 | 'name' => 'passwordNew', 29 | 'type' => '\Zend\Form\Element\Password', 30 | 'attributes' => array( 31 | 'placeholder' => $this->translator->translate('user.form.newPassword') 32 | ), 33 | ) 34 | ); 35 | 36 | // Add the password confirm field 37 | $this->add( 38 | array( 39 | 'name' => 'passwordConfirm', 40 | 'type' => '\Zend\Form\Element\Password', 41 | 'attributes' => array( 42 | 'placeholder' => $this->translator->translate('user.form.passwordConfirm') 43 | ), 44 | ) 45 | ); 46 | 47 | // Add the submit button 48 | $this->add( 49 | array( 50 | 'name' => 'submit', 51 | 'type' => '\Zend\Form\Element\Submit', 52 | 'attributes' => array( 53 | 'value' => $this->translator->translate('user.form.save'), 54 | ) 55 | ) 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /module/User/src/User/Form/RegistrationForm.php: -------------------------------------------------------------------------------- 1 | translator = $translator; 20 | 21 | parent::__construct('register'); 22 | $this->setAttribute('method', 'post'); 23 | $this->setAttribute('class', 'register-form'); 24 | 25 | // Add the email field 26 | $this->add( 27 | array( 28 | 'name' => 'email', 29 | 'type' => '\Zend\Form\Element\Email', 30 | 'attributes' => array( 31 | 'placeholder' => $this->translator->translate('user.form.emailAddress') 32 | ), 33 | ) 34 | ); 35 | 36 | // Add the password field 37 | $this->add( 38 | array( 39 | 'name' => 'password', 40 | 'type' => '\Zend\Form\Element\Password', 41 | 'attributes' => array( 42 | 'placeholder' => $this->translator->translate('user.form.password') 43 | ), 44 | ) 45 | ); 46 | 47 | // Add the password confirm field 48 | $this->add( 49 | array( 50 | 'name' => 'passwordConfirm', 51 | 'type' => '\Zend\Form\Element\Password', 52 | 'attributes' => array( 53 | 'placeholder' => $this->translator->translate('user.form.passwordConfirm') 54 | ), 55 | ) 56 | ); 57 | 58 | 59 | // Add the submit button 60 | $this->add( 61 | array( 62 | 'name' => 'submit', 63 | 'type' => '\Zend\Form\Element\Submit', 64 | 'attributes' => array( 65 | 'value' => $this->translator->translate('user.registrationForm.register'), 66 | ) 67 | ) 68 | ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /module/User/src/User/Model/DAO/UserDAO.php: -------------------------------------------------------------------------------- 1 | getPaginator( 27 | 'SELECT u FROM User\Entity\User u ORDER BY u.email' 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /module/User/view/_sideBar.phtml: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /module/User/view/user/user/index.phtml: -------------------------------------------------------------------------------- 1 | loginForm)) { 3 | $loginForm->setAttribute('action', $this->url('user', array('action' => 'login'))); 4 | $loginForm = $this->loginForm; 5 | $loginForm->prepare(); 6 | $loginForm = $this->form()->render($loginForm); 7 | } 8 | 9 | if (isset($this->registrationForm)) { 10 | $registrationForm->setAttribute('action', $this->url('user', array('action' => 'register'))); 11 | $registrationForm = $this->registrationForm; 12 | $registrationForm->prepare(); 13 | $registrationForm = $this->form()->render($registrationForm); 14 | } 15 | 16 | if (isset($this->uploadForm)) { 17 | $uploadForm->setAttribute('action', $this->url('manager', array('action' => 'upload'))); 18 | $uploadForm = $this->uploadForm; 19 | $uploadForm->prepare(); 20 | $uploadForm = $this->form()->render($uploadForm); 21 | } 22 | ?> 23 | 48 | partial('_sideBar.phtml'); ?> 49 | -------------------------------------------------------------------------------- /module/User/view/user/user/settings.phtml: -------------------------------------------------------------------------------- 1 | headTitle($this->translate('user.settings.title')); 3 | 4 | if (isset($this->passwordResetForm)) { 5 | $passwordResetForm->setAttribute('action', $this->url('user', array('action' => 'settings'))); 6 | $passwordResetForm = $this->passwordResetForm; 7 | $passwordResetForm->prepare(); 8 | $passwordResetForm = $this->form()->render($passwordResetForm); 9 | } 10 | 11 | if (isset($this->apiAuthTokenForm)) { 12 | $apiAuthTokenForm->setAttribute('action', $this->url('user', array('action' => 'token'))); 13 | $apiAuthTokenForm = $this->apiAuthTokenForm; 14 | $apiAuthTokenForm->prepare(); 15 | $apiAuthTokenForm = $this->form()->render($apiAuthTokenForm); 16 | } 17 | 18 | $token = !is_null($user->apiAccessToken) 19 | ? $user->apiAccessToken 20 | : $this->translate('user.ApiAuthTokenForm.notdefinedtext'); 21 | 22 | 23 | ?> 24 | 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 |
34 | 35 |
36 | 37 |
38 | 39 |
40 |
41 | -------------------------------------------------------------------------------- /module/WpPdfConversion/Module.php: -------------------------------------------------------------------------------- 1 | array( 26 | __DIR__ . '/autoload_classmap.php' 27 | ), 28 | 'Zend\Loader\StandardAutoloader' => array( 29 | 'namespaces' => array( 30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 31 | ), 32 | ), 33 | ); 34 | } 35 | 36 | /** 37 | * Get service config 38 | * 39 | * @return array 40 | */ 41 | public function getServiceConfig() 42 | { 43 | return array(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /module/WpPdfConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | sm->get('DocxConversion\Model\Converter\Unoconv'); 22 | 23 | // Fetch the document to convert 24 | $unconvertedDocument = $job->getStageDocument(JOB_CONVERSION_STAGE_DOCX); 25 | if (!$unconvertedDocument) { 26 | throw new \Exception('Couldn\'t find the stage document'); 27 | } 28 | 29 | // Convert the document 30 | $unoconv->setFilter('pdf'); 31 | $unoconv->setInputFile($unconvertedDocument->path); 32 | $outputPath = $job->getDocumentPath() . '/document_from_wp.pdf'; 33 | $unoconv->setOutputFile($outputPath); 34 | $unoconv->convert(); 35 | 36 | if (!$unoconv->getStatus()) { 37 | $job->status = JOB_STATUS_FAILED; 38 | return $job; 39 | } 40 | 41 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO'); 42 | $pdfDocument = $documentDAO->getInstance(); 43 | $pdfDocument->path = $outputPath; 44 | $pdfDocument->mimeType = 'application/pdf'; 45 | $pdfDocument->job = $job; 46 | $pdfDocument->conversionStage = JOB_CONVERSION_STAGE_WP_PDF; 47 | 48 | $job->documents[] = $pdfDocument; 49 | $job->conversionStage = JOB_CONVERSION_STAGE_WP_PDF; 50 | 51 | return $job; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /module/WpPdfConversion/test/assets/document.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/module/WpPdfConversion/test/assets/document.odt -------------------------------------------------------------------------------- /module/XmlFinal/Module.php: -------------------------------------------------------------------------------- 1 | array ( 26 | __DIR__ . '/autoload_classmap.php' 27 | ), 28 | 'Zend\Loader\StandardAutoloader' => array ( 29 | 'namespaces' => array ( 30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__ 31 | ) 32 | ) 33 | ); 34 | } 35 | 36 | /** 37 | * Get service config 38 | * 39 | * @return array 40 | */ 41 | public function getServiceConfig() { 42 | return array ( 43 | 'factories' => array ( 44 | 'XmlFinal\Model\Converter\XmlFinal' => function ($sm) { 45 | $logger = $sm->get ( 'Logger' ); 46 | return new XmlFinal ( $logger ); 47 | } 48 | ) 49 | ); 50 | } 51 | } -------------------------------------------------------------------------------- /module/XmlFinal/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | sm->get('XmlFinal\Model\Converter\XmlFinal'); 22 | 23 | // fetch xml documents 24 | $bibtexRefDoc = $job->getStageDocument(JOB_CONVERSION_STAGE_BIBTEXREFERENCES); 25 | $xmlMergeDoc = $job->getStageDocument(JOB_CONVERSION_STAGE_XML_MERGE); 26 | $outputPath = $job->getDocumentPath() . '/document-final.xml'; 27 | 28 | if (!$bibtexRefDoc && !$xmlMergeDoc) { 29 | throw new \Exception("Couldn't find the XML documents"); 30 | } 31 | 32 | if ($xmlMergeDoc) { 33 | $xmlFinal->setXmlMergeInputFile($xmlMergeDoc->path); 34 | } 35 | if ($bibtexRefDoc) { 36 | $xmlFinal->setBibtexRefInputFile($bibtexRefDoc->path); 37 | } 38 | $xmlFinal->setOutputFile($outputPath); 39 | $xmlFinal->convert(); 40 | 41 | if (!$xmlFinal->getStatus()) { 42 | $job->status = JOB_STATUS_FAILED; 43 | return $job; 44 | } 45 | 46 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO'); 47 | $xmlDocument = $documentDAO->getInstance(); 48 | $xmlDocument->path = $outputPath; 49 | $xmlDocument->mimeType = 'application/xml'; 50 | $xmlDocument->job = $job; 51 | $xmlDocument->conversionStage = JOB_CONVERSION_STAGE_XMLFINAL; 52 | 53 | $job->documents[] = $xmlDocument; 54 | $job->conversionStage = JOB_CONVERSION_STAGE_XMLFINAL; 55 | 56 | return $job; 57 | } 58 | } -------------------------------------------------------------------------------- /module/XmlFinal/test/assets/document-stage-14.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | World 4 | 5 | -------------------------------------------------------------------------------- /module/XmlFinal/test/assets/document-stage-5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello 4 | 5 | -------------------------------------------------------------------------------- /module/XmpConversion/Module.php: -------------------------------------------------------------------------------- 1 | array( 28 | __DIR__ . '/autoload_classmap.php' 29 | ), 30 | 'Zend\Loader\StandardAutoloader' => array( 31 | 'namespaces' => array( 32 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 33 | ), 34 | ), 35 | ); 36 | } 37 | 38 | /** 39 | * Get service config 40 | * 41 | * @return array 42 | */ 43 | public function getServiceConfig() 44 | { 45 | return array( 46 | 'factories' => array( 47 | 'XmpConversion\Model\Converter\Xmp' => function($sm) 48 | { 49 | $config = $sm->get('Config'); 50 | $logger = $sm->get('Logger'); 51 | if (!isset($config['conversion']['xmp'])) { 52 | throw new \Exception('XMP converter configuration is missing'); 53 | } 54 | $config = $config['conversion']['xmp']; 55 | 56 | return new Xmp($config, $logger); 57 | }, 58 | ), 59 | ); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /module/XmpConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | array( 26 | __DIR__ . '/autoload_classmap.php' 27 | ), 28 | 'Zend\Loader\StandardAutoloader' => array( 29 | 'namespaces' => array( 30 | __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, 31 | ), 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /module/ZipConversion/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | getDocumentPath() . '/documents.zip'; 26 | if (file_exists($zipFile)) { @unlink($zipFile); } 27 | 28 | $zip = new \ZipArchive(); 29 | if ($zip->open($zipFile, \ZipArchive::CREATE) !== TRUE) { 30 | throw new \Exception('Couldn\'t create zip archive'); 31 | } 32 | 33 | foreach ($job->getOutputDocuments() as $document) { 34 | $zip->addFile( 35 | $document->path, 36 | str_replace($job->getDocumentPath() . '/', '', $document->path) 37 | ); 38 | } 39 | $zip->close(); 40 | 41 | $documentDAO = $this->sm->get('Manager\Model\DAO\DocumentDAO'); 42 | $docxDocument = $documentDAO->getInstance(); 43 | $docxDocument->path = $zipFile; 44 | $docxDocument->job = $job; 45 | $docxDocument->conversionStage = JOB_CONVERSION_STAGE_ZIP; 46 | 47 | $job->documents[] = $docxDocument; 48 | $job->conversionStage = JOB_CONVERSION_STAGE_ZIP; 49 | 50 | return $job; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | module/Admin/test 5 | module/Api/test 6 | module/Application/test 7 | module/BibtexConversion/test 8 | module/BibtexreferencesConversion/test 9 | module/Cermine/test 10 | module/CitationstyleConversion/test 11 | module/DocxConversion/test 12 | module/EpubConversion/test 13 | module/HtmlConversion/test 14 | module/Manager/test 15 | module/MergeXMLOutputs/test 16 | module/NlmxmlConversion/test 17 | module/PathFinder/test 18 | module/PdfConversion/test 19 | module/ReferencesConversion/test 20 | module/User/test 21 | module/WpPdfConversion/test 22 | module/XmpConversion/test 23 | module/ZipConversion/test 24 | module/NERExtraction/test 25 | module/ParsCitConversion/test 26 | module/GrobidConversion/test 27 | module/XmlFinal/test 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | # The following rule tells Apache that if the requested filename 3 | # exists, simply serve it. 4 | RewriteCond %{REQUEST_FILENAME} -s [OR] 5 | RewriteCond %{REQUEST_FILENAME} -l [OR] 6 | RewriteCond %{REQUEST_FILENAME} -d 7 | RewriteRule ^.*$ - [NC,L] 8 | # The following rewrites all other queries to index.php. The 9 | # condition ensures that if you are using Apache aliases to do 10 | # mass virtual hosting, the base path will be prepended to 11 | # allow proper resolution of the index.php file; it will work 12 | # in non-aliased environments as well, providing a safe, one-size 13 | # fits all solution. 14 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$ 15 | RewriteRule ^(.*) - [E=BASE:%1] 16 | RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L] 17 | 18 | 19 | 20 | Header set Access-Control-Allow-Origin "*" 21 | 22 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/favicon.ico -------------------------------------------------------------------------------- /public/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /public/fonts/icons/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/icons/icomoon.eot -------------------------------------------------------------------------------- /public/fonts/icons/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/icons/icomoon.ttf -------------------------------------------------------------------------------- /public/fonts/icons/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/icons/icomoon.woff -------------------------------------------------------------------------------- /public/fonts/inika-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/inika-bold-webfont.eot -------------------------------------------------------------------------------- /public/fonts/inika-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/inika-bold-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/inika-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/inika-bold-webfont.woff -------------------------------------------------------------------------------- /public/fonts/inika-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/inika-regular-webfont.eot -------------------------------------------------------------------------------- /public/fonts/inika-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/inika-regular-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/inika-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/inika-regular-webfont.woff -------------------------------------------------------------------------------- /public/fonts/oswald-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/oswald-bold-webfont.eot -------------------------------------------------------------------------------- /public/fonts/oswald-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/oswald-bold-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/oswald-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/oswald-bold-webfont.woff -------------------------------------------------------------------------------- /public/fonts/oswald-light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/oswald-light-webfont.eot -------------------------------------------------------------------------------- /public/fonts/oswald-light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/oswald-light-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/oswald-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/oswald-light-webfont.woff -------------------------------------------------------------------------------- /public/fonts/oswald-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/oswald-regular-webfont.eot -------------------------------------------------------------------------------- /public/fonts/oswald-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/oswald-regular-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/oswald-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/fonts/oswald-regular-webfont.woff -------------------------------------------------------------------------------- /public/img/logo-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/img/logo-mobile.png -------------------------------------------------------------------------------- /public/img/logo-tablet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/img/logo-tablet.png -------------------------------------------------------------------------------- /public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/img/logo.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | run(); 21 | -------------------------------------------------------------------------------- /public/texture/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/texture/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /public/texture/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/texture/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/texture/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/texture/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/texture/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/texture/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/texture/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pkp/ots/7339068ee84aa5d8c9dd93fad0029c5f6b1cf24e/public/texture/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /public/texture/js/app.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $('input#saveDocument').click(function() { 3 | var saving = false; 4 | $('div#feedback').text('').show(); 5 | if (buffer.hasPendingChanges()) { 6 | $('div#feedback').text('Saving..'); 7 | saving = true; 8 | } 9 | else { 10 | $('div#feedback').text('no pending changes to save.').fadeOut('slow'); 11 | } 12 | archive.save().then(() => { 13 | if (saving) { 14 | $('div#feedback').text('Done!').fadeOut('slow'); 15 | } 16 | }); 17 | }); 18 | }); -------------------------------------------------------------------------------- /public/texture/js/store.js: -------------------------------------------------------------------------------- 1 | 2 | function OTSXMLStore() { 3 | this.readXML = function(documentId, cb) { 4 | fetch(documentId, { 5 | credentials: 'same-origin' 6 | }) 7 | .then(function(response){ 8 | response.text().then(function(xml) { 9 | cb(null, xml); 10 | }); 11 | }) 12 | }; 13 | 14 | this.writeXML = function(documentId, xml, cb) { 15 | fetch(documentId, { 16 | credentials: 'same-origin', 17 | method: 'POST', 18 | body: JSON.stringify({ 19 | 'content': xml 20 | }) 21 | }) 22 | .then(function(response) { 23 | if(response.status !== 200) { 24 | alert('Unable to save document due to an unexpected error. Please try again.'); 25 | } 26 | }); 27 | }; 28 | } -------------------------------------------------------------------------------- /start_queues.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | RUNNING=`ps ax | grep 'public/index.php queue doctrine' | grep -v grep | awk '{print $1}'` 3 | 4 | for pid in $RUNNING; do 5 | echo "Killing queue process [PID $pid]" 6 | kill -9 $pid 7 | done 8 | 9 | php public/index.php queue doctrine bibtex --start & 10 | echo "Started Bibtex queue [PID $!]" 11 | php public/index.php queue doctrine bibtexreferences --start & 12 | echo "Started BibtexReferences queue [PID $!]" 13 | php public/index.php queue doctrine cermine --start & 14 | echo "Started CERMINE queue [PID $!]" 15 | php public/index.php queue doctrine citationstyle --start & 16 | echo "Started CitationStyle queue [PID $!]" 17 | php public/index.php queue doctrine docx --start & 18 | echo "Started DocX queue [PID $!]" 19 | php public/index.php queue doctrine epub --start & 20 | echo "Started Epub queue [PID $!]" 21 | php public/index.php queue doctrine html --start & 22 | echo "Started HTML queue [PID $!]" 23 | php public/index.php queue doctrine merge --start & 24 | echo "Started XML merge queue [PID $!]" 25 | php public/index.php queue doctrine nlmxml --start & 26 | echo "Started NLMXML queue [PID $!]" 27 | php public/index.php queue doctrine pathfinder --start & 28 | echo "Started pathfinder queue [PID $!]" 29 | php public/index.php queue doctrine pdf --start & 30 | echo "Started PDF queue [PID $!]" 31 | php public/index.php queue doctrine references --start & 32 | echo "Started References queue [PID $!]" 33 | php public/index.php queue doctrine wppdf --start & 34 | echo "Started WpPdf queue [PID $!]" 35 | php public/index.php queue doctrine xmp --start & 36 | echo "Started XMP queue [PID $!]" 37 | php public/index.php queue doctrine zip --start & 38 | echo "Started Zip queue [PID $!]" 39 | php public/index.php queue doctrine ner --start & 40 | echo "Started NER queue [PID $!]" 41 | php public/index.php queue doctrine parsCit --start & 42 | echo "Started ParsCit queue [PID $!]" 43 | php public/index.php queue doctrine grobid --start & 44 | echo "Started Grobid queue [PID $!]" 45 | php public/index.php queue doctrine xmlfinal --start & 46 | echo "Started XML Final queue [PID $!]" 47 | -------------------------------------------------------------------------------- /style/css/jquery.autocomplete.css: -------------------------------------------------------------------------------- 1 | /var/www/html/vendor/dyve/jquery-autocomplete/src/jquery.autocomplete.css -------------------------------------------------------------------------------- /style/scss/_colors.scss: -------------------------------------------------------------------------------- 1 | // Color schema 2 | // http://colorschemedesigner.com/#3.61X--ILw0w0 3 | $primaryColor1: #0068CC; 4 | $primaryColor2: #266199; 5 | $primaryColor3: #004385; 6 | $primaryColor4: #3991E6; 7 | $primaryColor5: #67A7E6; 8 | 9 | $secondaryColor11: #1A00D3; 10 | $secondaryColor12: #36279E; 11 | $secondaryColor13: #110089; 12 | $secondaryColor14: #503AE9; 13 | $secondaryColor15: #7869E9; 14 | 15 | $secondaryColor21: #00D273; 16 | $secondaryColor22: #279E68; 17 | $secondaryColor23: #00894A; 18 | $secondaryColor24: #3AE999; 19 | $secondaryColor25: #69E9AE; 20 | 21 | $complementaryColor1: #FF9700; 22 | $complementaryColor2: #BF8530; 23 | $complementaryColor3: #A66200; 24 | $complementaryColor4: #FFB140; 25 | $complementaryColor5: #FFC673; 26 | 27 | // Page 28 | $backgroundColorLight: #FFF; 29 | $backgroundColorDark: #EEE; 30 | 31 | // Notifications 32 | $successColor: $secondaryColor21; 33 | $infoColor: $primaryColor5; 34 | $errorColor: $complementaryColor1; 35 | 36 | // Disabled 37 | $disabledColor: #777; 38 | 39 | // Nav 40 | $navColor: #000; 41 | 42 | // Text 43 | $textColorLight: #FFF; 44 | $textColorDark: #000; 45 | 46 | // Box 47 | $boxBackgroundColor: $primaryColor5; 48 | 49 | // Form 50 | $buttonColor: $primaryColor2; 51 | $buttonBorderColor: change-color($secondaryColor24, $lightness: 70%); 52 | -------------------------------------------------------------------------------- /style/scss/_forms.scss: -------------------------------------------------------------------------------- 1 | input[type="submit"] { 2 | @include button; 3 | margin-top: $gutter; 4 | } 5 | input[type="file"] { 6 | background: $backgroundColorLight; 7 | } 8 | 9 | input, select { 10 | padding: 0.8 * $gutter $gutter; 11 | display: block; 12 | margin-bottom: $gutter; 13 | border: none; 14 | font-family: $pageFont; 15 | } 16 | 17 | .input-error { 18 | border: 1px solid $errorColor; 19 | } 20 | 21 | // Form input error messages 22 | .input-error + ul { 23 | list-style: none; 24 | padding-left: 3px; 25 | margin: $gutter / 2 0 $gutter * 2 0; 26 | 27 | li { 28 | @include icon('before', true, 'notification'); 29 | font-family: $highlightFont; 30 | } 31 | li:before { 32 | margin-right: 0.5em; 33 | } 34 | } 35 | 36 | // Form labels 37 | form label { 38 | font-family: $highlightFont; 39 | } 40 | 41 | // Autocomplete highlight selected field 42 | .acSelect { 43 | background-color: $complementaryColor4; 44 | } 45 | -------------------------------------------------------------------------------- /style/scss/_grid-settings.scss: -------------------------------------------------------------------------------- 1 | @import "neat/neat-helpers"; 2 | 3 | // Grid settup 4 | $column: 70px; 5 | $gutter: 10px; 6 | $grid-columns: 12; 7 | $max-width: 960px; 8 | //$visual-grid: true; 9 | //$visual-grid-index: 100; 10 | 11 | // Define breakpoints 12 | $boundaryMobile: 480px; 13 | $boundaryTablet: 960px; 14 | $mobile: new-breakpoint(max-width $boundaryMobile, 6); 15 | $notMobile: new-breakpoint(min-width $boundaryMobile + 1, 6); 16 | $tablet: new-breakpoint(min-width $boundaryMobile + 1 max-width $boundaryTablet, 12); 17 | $desktop: new-breakpoint(min-width $boundaryTablet + 1, 12); 18 | $notDesktop: new-breakpoint(max-width $boundaryTablet, 12); 19 | -------------------------------------------------------------------------------- /style/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Button 2 | @mixin button { 3 | background-color: $buttonColor; 4 | border: none; 5 | padding: 5px 35px; 6 | border-radius: 2px; 7 | color: $textColorLight; 8 | font-family: $highlightFont; 9 | letter-spacing: 0.1em; 10 | text-transform: uppercase; 11 | } 12 | 13 | // Fade in transition 14 | @mixin fade-in($duration) { 15 | animation: fadein $duration; 16 | -moz-animation: fadein $duration; /* Firefox */ 17 | -webkit-animation: fadein $duration; /* Safari and Chrome */ 18 | -o-animation: fadein $duration; /* Opera */ 19 | 20 | } 21 | @mixin fade-in-full { 22 | from { opacity: 0; } 23 | to { opacity: 1; } 24 | } 25 | @keyframes fadein { @include fade-in-full; } 26 | @-moz-keyframes fadein { @include fade-in-full; } 27 | @-webkit-keyframes fadein { @include fade-in-full; } 28 | @-o-keyframes fadein { @include fade-in-full; } 29 | 30 | // Custom list style 31 | @mixin custom-list { 32 | ul { 33 | list-style: none; 34 | li { 35 | margin-bottom: $gutter; 36 | @include icon('before', true, 'forward'); 37 | } 38 | li:before { 39 | margin-right: 0.5em; 40 | color: $primaryColor1; 41 | } 42 | } 43 | } 44 | 45 | // Creates inline lists with no gap between the elements 46 | @mixin inline-list($fontSize) { 47 | ul { 48 | list-style: none; 49 | word-spacing: 0; 50 | letter-spacing: 0; 51 | font-size: 0; 52 | margin: 0; 53 | padding: 0; 54 | } 55 | li { 56 | display: inline; 57 | } 58 | 59 | li * { 60 | font-size: $fontSize; 61 | } 62 | } 63 | 64 | // Regular lists 65 | @mixin vertical-list { 66 | list-style: none; 67 | padding-left: 0; 68 | label { margin-right: $gutter; } 69 | } 70 | 71 | // CSS triangle 72 | @mixin triangle($size, $color: #000, $top: true, $right: false, $bottom: false, $left: false) { 73 | border: $size solid $color; 74 | width: 0px; 75 | height: 0px; 76 | @if $top != true { border-top-color: transparent; } 77 | @if $right != true { border-right-color: transparent; } 78 | @if $bottom != true { border-bottom-color: transparent; } 79 | @if $left != true { border-left-color: transparent; } 80 | } 81 | -------------------------------------------------------------------------------- /style/scss/_variables.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | $pageFontSize: 14px; 3 | $pageFontSizeSmaller: $pageFontSize - 2px; 4 | $pageLineHeight: $pageFontSize * 1.5; 5 | $pageLineHeightSmaller: $pageFontSizeSmaller * 1.5; 6 | $pageFont: Inika, Georgia, Serif; 7 | $highlightFont: Oswald, Sans-Serif; 8 | $mobilePageFont: Georgia, Serif; 9 | -------------------------------------------------------------------------------- /style/scss/bourbon/_bourbon-deprecated-upcoming.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // These mixins/functions are deprecated 3 | // They will be removed in the next MAJOR version release 4 | //************************************************************************// 5 | @mixin box-shadow ($shadows...) { 6 | @include prefixer(box-shadow, $shadows, spec); 7 | @warn "box-shadow is deprecated and will be removed in the next major version release"; 8 | } 9 | 10 | @mixin background-size ($lengths...) { 11 | @include prefixer(background-size, $lengths, spec); 12 | @warn "background-size is deprecated and will be removed in the next major version release"; 13 | } 14 | -------------------------------------------------------------------------------- /style/scss/bourbon/_bourbon.scss: -------------------------------------------------------------------------------- 1 | // Custom Helpers 2 | @import "helpers/deprecated-webkit-gradient"; 3 | @import "helpers/gradient-positions-parser"; 4 | @import "helpers/linear-positions-parser"; 5 | @import "helpers/radial-arg-parser"; 6 | @import "helpers/radial-positions-parser"; 7 | @import "helpers/render-gradients"; 8 | @import "helpers/shape-size-stripper"; 9 | 10 | // Custom Functions 11 | @import "functions/compact"; 12 | @import "functions/flex-grid"; 13 | @import "functions/grid-width"; 14 | @import "functions/linear-gradient"; 15 | @import "functions/modular-scale"; 16 | @import "functions/px-to-em"; 17 | @import "functions/radial-gradient"; 18 | @import "functions/tint-shade"; 19 | @import "functions/transition-property-name"; 20 | 21 | // CSS3 Mixins 22 | @import "css3/animation"; 23 | @import "css3/appearance"; 24 | @import "css3/backface-visibility"; 25 | @import "css3/background"; 26 | @import "css3/background-image"; 27 | @import "css3/border-image"; 28 | @import "css3/border-radius"; 29 | @import "css3/box-sizing"; 30 | @import "css3/columns"; 31 | @import "css3/flex-box"; 32 | @import "css3/font-face"; 33 | @import "css3/hidpi-media-query"; 34 | @import "css3/image-rendering"; 35 | @import "css3/inline-block"; 36 | @import "css3/keyframes"; 37 | @import "css3/linear-gradient"; 38 | @import "css3/perspective"; 39 | @import "css3/radial-gradient"; 40 | @import "css3/transform"; 41 | @import "css3/transition"; 42 | @import "css3/user-select"; 43 | @import "css3/placeholder"; 44 | 45 | // Addons & other mixins 46 | @import "addons/button"; 47 | @import "addons/clearfix"; 48 | @import "addons/font-family"; 49 | @import "addons/hide-text"; 50 | @import "addons/html5-input-types"; 51 | @import "addons/position"; 52 | @import "addons/prefixer"; 53 | @import "addons/retina-image"; 54 | @import "addons/size"; 55 | @import "addons/timing-functions"; 56 | @import "addons/triangle"; 57 | 58 | // Soon to be deprecated Mixins 59 | @import "bourbon-deprecated-upcoming"; 60 | -------------------------------------------------------------------------------- /style/scss/bourbon/addons/_clearfix.scss: -------------------------------------------------------------------------------- 1 | // Micro clearfix provides an easy way to contain floats without adding additional markup 2 | // 3 | // Example usage: 4 | // 5 | // // Contain all floats within .wrapper 6 | // .wrapper { 7 | // @include clearfix; 8 | // .content, 9 | // .sidebar { 10 | // float : left; 11 | // } 12 | // } 13 | 14 | @mixin clearfix { 15 | *zoom: 1; 16 | 17 | &:before, 18 | &:after { 19 | content: " "; 20 | display: table; 21 | } 22 | 23 | &:after { 24 | clear: both; 25 | } 26 | } 27 | 28 | // Acknowledgements 29 | // Micro clearfix: [Nicolas Gallagher](http://nicolasgallagher.com/micro-clearfix-hack/) 30 | -------------------------------------------------------------------------------- /style/scss/bourbon/addons/_font-family.scss: -------------------------------------------------------------------------------- 1 | $georgia: Georgia, Cambria, "Times New Roman", Times, serif; 2 | $helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif; 3 | $lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif; 4 | $monospace: "Bitstream Vera Sans Mono", Consolas, Courier, monospace; 5 | $verdana: Verdana, Geneva, sans-serif; 6 | -------------------------------------------------------------------------------- /style/scss/bourbon/addons/_hide-text.scss: -------------------------------------------------------------------------------- 1 | @mixin hide-text { 2 | color: transparent; 3 | font: 0/0 a; 4 | text-shadow: none; 5 | } 6 | -------------------------------------------------------------------------------- /style/scss/bourbon/addons/_position.scss: -------------------------------------------------------------------------------- 1 | @mixin position ($position: relative, $coordinates: 0 0 0 0) { 2 | 3 | @if type-of($position) == list { 4 | $coordinates: $position; 5 | $position: relative; 6 | } 7 | 8 | $top: nth($coordinates, 1); 9 | $right: nth($coordinates, 2); 10 | $bottom: nth($coordinates, 3); 11 | $left: nth($coordinates, 4); 12 | 13 | position: $position; 14 | 15 | @if $top == auto { 16 | top: $top; 17 | } 18 | @else if not(unitless($top)) { 19 | top: $top; 20 | } 21 | 22 | @if $right == auto { 23 | right: $right; 24 | } 25 | @else if not(unitless($right)) { 26 | right: $right; 27 | } 28 | 29 | @if $bottom == auto { 30 | bottom: $bottom; 31 | } 32 | @else if not(unitless($bottom)) { 33 | bottom: $bottom; 34 | } 35 | 36 | @if $left == auto { 37 | left: $left; 38 | } 39 | @else if not(unitless($left)) { 40 | left: $left; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /style/scss/bourbon/addons/_prefixer.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Example: @include prefixer(border-radius, $radii, webkit ms spec); 3 | //************************************************************************// 4 | $prefix-for-webkit: true !default; 5 | $prefix-for-mozilla: true !default; 6 | $prefix-for-microsoft: true !default; 7 | $prefix-for-opera: true !default; 8 | $prefix-for-spec: true !default; // required for keyframe mixin 9 | 10 | @mixin prefixer ($property, $value, $prefixes) { 11 | @each $prefix in $prefixes { 12 | @if $prefix == webkit { 13 | @if $prefix-for-webkit { 14 | -webkit-#{$property}: $value; 15 | } 16 | } 17 | @else if $prefix == moz { 18 | @if $prefix-for-mozilla { 19 | -moz-#{$property}: $value; 20 | } 21 | } 22 | @else if $prefix == ms { 23 | @if $prefix-for-microsoft { 24 | -ms-#{$property}: $value; 25 | } 26 | } 27 | @else if $prefix == o { 28 | @if $prefix-for-opera { 29 | -o-#{$property}: $value; 30 | } 31 | } 32 | @else if $prefix == spec { 33 | @if $prefix-for-spec { 34 | #{$property}: $value; 35 | } 36 | } 37 | @else { 38 | @warn "Unrecognized prefix: #{$prefix}"; 39 | } 40 | } 41 | } 42 | 43 | @mixin disable-prefix-for-all() { 44 | $prefix-for-webkit: false; 45 | $prefix-for-mozilla: false; 46 | $prefix-for-microsoft: false; 47 | $prefix-for-opera: false; 48 | $prefix-for-spec: false; 49 | } 50 | -------------------------------------------------------------------------------- /style/scss/bourbon/addons/_retina-image.scss: -------------------------------------------------------------------------------- 1 | @mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $asset-pipeline: false) { 2 | @if $asset-pipeline { 3 | background-image: image-url("#{$filename}.#{$extension}"); 4 | } 5 | @else { 6 | background-image: url("#{$filename}.#{$extension}"); 7 | } 8 | 9 | @include hidpi { 10 | 11 | @if $asset-pipeline { 12 | @if $retina-filename { 13 | background-image: image-url("#{$retina-filename}.#{$extension}"); 14 | } 15 | @else { 16 | background-image: image-url("#{$filename}@2x.#{$extension}"); 17 | } 18 | } 19 | 20 | @else { 21 | @if $retina-filename { 22 | background-image: url("#{$retina-filename}.#{$extension}"); 23 | } 24 | @else { 25 | background-image: url("#{$filename}@2x.#{$extension}"); 26 | } 27 | } 28 | 29 | background-size: $background-size; 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /style/scss/bourbon/addons/_size.scss: -------------------------------------------------------------------------------- 1 | @mixin size($size) { 2 | @if length($size) == 1 { 3 | @if $size == auto { 4 | width: $size; 5 | height: $size; 6 | } 7 | 8 | @else if unitless($size) { 9 | width: $size + px; 10 | height: $size + px; 11 | } 12 | 13 | @else if not(unitless($size)) { 14 | width: $size; 15 | height: $size; 16 | } 17 | } 18 | 19 | // Width x Height 20 | @if length($size) == 2 { 21 | $width: nth($size, 1); 22 | $height: nth($size, 2); 23 | 24 | @if $width == auto { 25 | width: $width; 26 | } 27 | @else if not(unitless($width)) { 28 | width: $width; 29 | } 30 | @else if unitless($width) { 31 | width: $width + px; 32 | } 33 | 34 | @if $height == auto { 35 | height: $height; 36 | } 37 | @else if not(unitless($height)) { 38 | height: $height; 39 | } 40 | @else if unitless($height) { 41 | height: $height + px; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /style/scss/bourbon/addons/_timing-functions.scss: -------------------------------------------------------------------------------- 1 | // CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie) 2 | // Timing functions are the same as demo'ed here: http://jqueryui.com/demos/effect/easing.html 3 | 4 | // EASE IN 5 | $ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530); 6 | $ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190); 7 | $ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220); 8 | $ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060); 9 | $ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715); 10 | $ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035); 11 | $ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335); 12 | $ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045); 13 | 14 | // EASE OUT 15 | $ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940); 16 | $ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000); 17 | $ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000); 18 | $ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000); 19 | $ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000); 20 | $ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000); 21 | $ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000); 22 | $ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275); 23 | 24 | // EASE IN OUT 25 | $ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955); 26 | $ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000); 27 | $ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000); 28 | $ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000); 29 | $ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950); 30 | $ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000); 31 | $ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860); 32 | $ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550); 33 | -------------------------------------------------------------------------------- /style/scss/bourbon/addons/_triangle.scss: -------------------------------------------------------------------------------- 1 | @mixin triangle ($size, $color, $direction) { 2 | height: 0; 3 | width: 0; 4 | 5 | @if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) { 6 | border-color: transparent; 7 | border-style: solid; 8 | border-width: $size / 2; 9 | 10 | @if $direction == up { 11 | border-bottom-color: $color; 12 | 13 | } @else if $direction == right { 14 | border-left-color: $color; 15 | 16 | } @else if $direction == down { 17 | border-top-color: $color; 18 | 19 | } @else if $direction == left { 20 | border-right-color: $color; 21 | } 22 | } 23 | 24 | @else if ($direction == up-right) or ($direction == up-left) { 25 | border-top: $size solid $color; 26 | 27 | @if $direction == up-right { 28 | border-left: $size solid transparent; 29 | 30 | } @else if $direction == up-left { 31 | border-right: $size solid transparent; 32 | } 33 | } 34 | 35 | @else if ($direction == down-right) or ($direction == down-left) { 36 | border-bottom: $size solid $color; 37 | 38 | @if $direction == down-right { 39 | border-left: $size solid transparent; 40 | 41 | } @else if $direction == down-left { 42 | border-right: $size solid transparent; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_animation.scss: -------------------------------------------------------------------------------- 1 | // http://www.w3.org/TR/css3-animations/#the-animation-name-property- 2 | // Each of these mixins support comma separated lists of values, which allows different transitions for individual properties to be described in a single style rule. Each value in the list corresponds to the value at that same position in the other properties. 3 | 4 | // Official animation shorthand property. 5 | @mixin animation ($animations...) { 6 | @include prefixer(animation, $animations, webkit moz spec); 7 | } 8 | 9 | // Individual Animation Properties 10 | @mixin animation-name ($names...) { 11 | @include prefixer(animation-name, $names, webkit moz spec); 12 | } 13 | 14 | 15 | @mixin animation-duration ($times...) { 16 | @include prefixer(animation-duration, $times, webkit moz spec); 17 | } 18 | 19 | 20 | @mixin animation-timing-function ($motions...) { 21 | // ease | linear | ease-in | ease-out | ease-in-out 22 | @include prefixer(animation-timing-function, $motions, webkit moz spec); 23 | } 24 | 25 | 26 | @mixin animation-iteration-count ($values...) { 27 | // infinite | 28 | @include prefixer(animation-iteration-count, $values, webkit moz spec); 29 | } 30 | 31 | 32 | @mixin animation-direction ($directions...) { 33 | // normal | alternate 34 | @include prefixer(animation-direction, $directions, webkit moz spec); 35 | } 36 | 37 | 38 | @mixin animation-play-state ($states...) { 39 | // running | paused 40 | @include prefixer(animation-play-state, $states, webkit moz spec); 41 | } 42 | 43 | 44 | @mixin animation-delay ($times...) { 45 | @include prefixer(animation-delay, $times, webkit moz spec); 46 | } 47 | 48 | 49 | @mixin animation-fill-mode ($modes...) { 50 | // none | forwards | backwards | both 51 | @include prefixer(animation-fill-mode, $modes, webkit moz spec); 52 | } 53 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_appearance.scss: -------------------------------------------------------------------------------- 1 | @mixin appearance ($value) { 2 | @include prefixer(appearance, $value, webkit moz ms o spec); 3 | } 4 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_backface-visibility.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Backface-visibility mixin 3 | //************************************************************************// 4 | @mixin backface-visibility($visibility) { 5 | @include prefixer(backface-visibility, $visibility, webkit spec); 6 | } 7 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_border-radius.scss: -------------------------------------------------------------------------------- 1 | //************************************************************************// 2 | // Shorthand Border-radius mixins 3 | //************************************************************************// 4 | @mixin border-top-radius($radii) { 5 | @include prefixer(border-top-left-radius, $radii, spec); 6 | @include prefixer(border-top-right-radius, $radii, spec); 7 | } 8 | 9 | @mixin border-bottom-radius($radii) { 10 | @include prefixer(border-bottom-left-radius, $radii, spec); 11 | @include prefixer(border-bottom-right-radius, $radii, spec); 12 | } 13 | 14 | @mixin border-left-radius($radii) { 15 | @include prefixer(border-top-left-radius, $radii, spec); 16 | @include prefixer(border-bottom-left-radius, $radii, spec); 17 | } 18 | 19 | @mixin border-right-radius($radii) { 20 | @include prefixer(border-top-right-radius, $radii, spec); 21 | @include prefixer(border-bottom-right-radius, $radii, spec); 22 | } 23 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_box-sizing.scss: -------------------------------------------------------------------------------- 1 | @mixin box-sizing ($box) { 2 | // content-box | border-box | inherit 3 | @include prefixer(box-sizing, $box, webkit moz spec); 4 | } 5 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_columns.scss: -------------------------------------------------------------------------------- 1 | @mixin columns($arg: auto) { 2 | // || 3 | @include prefixer(columns, $arg, webkit moz spec); 4 | } 5 | 6 | @mixin column-count($int: auto) { 7 | // auto || integer 8 | @include prefixer(column-count, $int, webkit moz spec); 9 | } 10 | 11 | @mixin column-gap($length: normal) { 12 | // normal || length 13 | @include prefixer(column-gap, $length, webkit moz spec); 14 | } 15 | 16 | @mixin column-fill($arg: auto) { 17 | // auto || length 18 | @include prefixer(columns-fill, $arg, webkit moz spec); 19 | } 20 | 21 | @mixin column-rule($arg) { 22 | // || || 23 | @include prefixer(column-rule, $arg, webkit moz spec); 24 | } 25 | 26 | @mixin column-rule-color($color) { 27 | @include prefixer(column-rule-color, $color, webkit moz spec); 28 | } 29 | 30 | @mixin column-rule-style($style: none) { 31 | // none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid 32 | @include prefixer(column-rule-style, $style, webkit moz spec); 33 | } 34 | 35 | @mixin column-rule-width ($width: none) { 36 | @include prefixer(column-rule-width, $width, webkit moz spec); 37 | } 38 | 39 | @mixin column-span($arg: none) { 40 | // none || all 41 | @include prefixer(column-span, $arg, webkit moz spec); 42 | } 43 | 44 | @mixin column-width($length: auto) { 45 | // auto || length 46 | @include prefixer(column-width, $length, webkit moz spec); 47 | } 48 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_flex-box.scss: -------------------------------------------------------------------------------- 1 | // CSS3 Flexible Box Model and property defaults 2 | 3 | // Custom shorthand notation for flexbox 4 | @mixin box($orient: inline-axis, $pack: start, $align: stretch) { 5 | @include display-box; 6 | @include box-orient($orient); 7 | @include box-pack($pack); 8 | @include box-align($align); 9 | } 10 | 11 | @mixin display-box { 12 | display: -webkit-box; 13 | display: -moz-box; 14 | display: box; 15 | } 16 | 17 | @mixin box-orient($orient: inline-axis) { 18 | // horizontal|vertical|inline-axis|block-axis|inherit 19 | @include prefixer(box-orient, $orient, webkit moz spec); 20 | } 21 | 22 | @mixin box-pack($pack: start) { 23 | // start|end|center|justify 24 | @include prefixer(box-pack, $pack, webkit moz spec); 25 | } 26 | 27 | @mixin box-align($align: stretch) { 28 | // start|end|center|baseline|stretch 29 | @include prefixer(box-align, $align, webkit moz spec); 30 | } 31 | 32 | @mixin box-direction($direction: normal) { 33 | // normal|reverse|inherit 34 | @include prefixer(box-direction, $direction, webkit moz spec); 35 | } 36 | 37 | @mixin box-lines($lines: single) { 38 | // single|multiple 39 | @include prefixer(box-lines, $lines, webkit moz spec); 40 | } 41 | 42 | @mixin box-ordinal-group($int: 1) { 43 | @include prefixer(box-ordinal-group, $int, webkit moz spec); 44 | } 45 | 46 | @mixin box-flex($value: 0.0) { 47 | @include prefixer(box-flex, $value, webkit moz spec); 48 | } 49 | 50 | @mixin box-flex-group($int: 1) { 51 | @include prefixer(box-flex-group, $int, webkit moz spec); 52 | } 53 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_font-face.scss: -------------------------------------------------------------------------------- 1 | // Order of the includes matters, and it is: normal, bold, italic, bold+italic. 2 | 3 | @mixin font-face($font-family, $file-path, $weight: normal, $style: normal, $asset-pipeline: false ) { 4 | @font-face { 5 | font-family: $font-family; 6 | font-weight: $weight; 7 | font-style: $style; 8 | 9 | @if $asset-pipeline == true { 10 | src: font-url('#{$file-path}.eot'); 11 | src: font-url('#{$file-path}.eot?#iefix') format('embedded-opentype'), 12 | font-url('#{$file-path}.woff') format('woff'), 13 | font-url('#{$file-path}.ttf') format('truetype'), 14 | font-url('#{$file-path}.svg##{$font-family}') format('svg'); 15 | } @else { 16 | src: url('#{$file-path}.eot'); 17 | src: url('#{$file-path}.eot?#iefix') format('embedded-opentype'), 18 | url('#{$file-path}.woff') format('woff'), 19 | url('#{$file-path}.ttf') format('truetype'), 20 | url('#{$file-path}.svg##{$font-family}') format('svg'); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_hidpi-media-query.scss: -------------------------------------------------------------------------------- 1 | // HiDPI mixin. Default value set to 1.3 to target Google Nexus 7 (http://bjango.com/articles/min-device-pixel-ratio/) 2 | @mixin hidpi($ratio: 1.3) { 3 | @media only screen and (-webkit-min-device-pixel-ratio: $ratio), 4 | only screen and (min--moz-device-pixel-ratio: $ratio), 5 | only screen and (-o-min-device-pixel-ratio: #{$ratio}/1), 6 | only screen and (min-resolution: #{round($ratio*96)}dpi), 7 | only screen and (min-resolution: #{$ratio}dppx) { 8 | @content; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_image-rendering.scss: -------------------------------------------------------------------------------- 1 | @mixin image-rendering ($mode:optimizeQuality) { 2 | 3 | @if ($mode == optimize-contrast) { 4 | image-rendering: -moz-crisp-edges; 5 | image-rendering: -o-crisp-edges; 6 | image-rendering: -webkit-optimize-contrast; 7 | image-rendering: optimize-contrast; 8 | } 9 | 10 | @else { 11 | image-rendering: $mode; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_inline-block.scss: -------------------------------------------------------------------------------- 1 | // Legacy support for inline-block in IE7 (maybe IE6) 2 | @mixin inline-block { 3 | display: inline-block; 4 | vertical-align: baseline; 5 | zoom: 1; 6 | *display: inline; 7 | *vertical-align: auto; 8 | } 9 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_keyframes.scss: -------------------------------------------------------------------------------- 1 | // Adds keyframes blocks for supported prefixes, removing redundant prefixes in the block's content 2 | @mixin keyframes($name) { 3 | $original-prefix-for-webkit: $prefix-for-webkit; 4 | $original-prefix-for-mozilla: $prefix-for-mozilla; 5 | $original-prefix-for-microsoft: $prefix-for-microsoft; 6 | $original-prefix-for-opera: $prefix-for-opera; 7 | $original-prefix-for-spec: $prefix-for-spec; 8 | 9 | @if $original-prefix-for-webkit { 10 | @include disable-prefix-for-all(); 11 | $prefix-for-webkit: true; 12 | @-webkit-keyframes #{$name} { 13 | @content; 14 | } 15 | } 16 | @if $original-prefix-for-mozilla { 17 | @include disable-prefix-for-all(); 18 | $prefix-for-mozilla: true; 19 | @-moz-keyframes #{$name} { 20 | @content; 21 | } 22 | } 23 | @if $original-prefix-for-opera { 24 | @include disable-prefix-for-all(); 25 | $prefix-for-opera: true; 26 | @-o-keyframes #{$name} { 27 | @content; 28 | } 29 | } 30 | @if $original-prefix-for-spec { 31 | @include disable-prefix-for-all(); 32 | $prefix-for-spec: true; 33 | @keyframes #{$name} { 34 | @content; 35 | } 36 | } 37 | 38 | $prefix-for-webkit: $original-prefix-for-webkit; 39 | $prefix-for-mozilla: $original-prefix-for-mozilla; 40 | $prefix-for-microsoft: $original-prefix-for-microsoft; 41 | $prefix-for-opera: $original-prefix-for-opera; 42 | $prefix-for-spec: $original-prefix-for-spec; 43 | } 44 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_linear-gradient.scss: -------------------------------------------------------------------------------- 1 | @mixin linear-gradient($pos, $G1, $G2: false, 2 | $G3: false, $G4: false, 3 | $G5: false, $G6: false, 4 | $G7: false, $G8: false, 5 | $G9: false, $G10: false, 6 | $deprecated-pos1: left top, 7 | $deprecated-pos2: left bottom, 8 | $fallback: false) { 9 | // Detect what type of value exists in $pos 10 | $pos-type: type-of(nth($pos, 1)); 11 | $pos-spec: null; 12 | $pos-degree: null; 13 | 14 | // If $pos is missing from mixin, reassign vars and add default position 15 | @if ($pos-type == color) or (nth($pos, 1) == "transparent") { 16 | $G10: $G9; $G9: $G8; $G8: $G7; $G7: $G6; $G6: $G5; 17 | $G5: $G4; $G4: $G3; $G3: $G2; $G2: $G1; $G1: $pos; 18 | $pos: null; 19 | } 20 | 21 | @if $pos { 22 | $positions: _linear-positions-parser($pos); 23 | $pos-degree: nth($positions, 1); 24 | $pos-spec: nth($positions, 2); 25 | } 26 | 27 | $full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10); 28 | 29 | // Set $G1 as the default fallback color 30 | $fallback-color: nth($G1, 1); 31 | 32 | // If $fallback is a color use that color as the fallback color 33 | @if (type-of($fallback) == color) or ($fallback == "transparent") { 34 | $fallback-color: $fallback; 35 | } 36 | 37 | background-color: $fallback-color; 38 | background-image: _deprecated-webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $full); // Safari <= 5.0 39 | background-image: -webkit-linear-gradient($pos-degree $full); // Safari 5.1+, Chrome 40 | background-image: unquote("linear-gradient(#{$pos-spec}#{$full})"); 41 | } 42 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_perspective.scss: -------------------------------------------------------------------------------- 1 | @mixin perspective($depth: none) { 2 | // none | 3 | @include prefixer(perspective, $depth, webkit moz spec); 4 | } 5 | 6 | @mixin perspective-origin($value: 50% 50%) { 7 | @include prefixer(perspective-origin, $value, webkit moz spec); 8 | } 9 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_placeholder.scss: -------------------------------------------------------------------------------- 1 | $placeholders: '-webkit-input-placeholder', 2 | '-moz-placeholder', 3 | '-ms-input-placeholder'; 4 | 5 | @mixin placeholder { 6 | @each $placeholder in $placeholders { 7 | @if $placeholder == "-webkit-input-placeholder" { 8 | &::#{$placeholder} { 9 | @content; 10 | } 11 | } 12 | @else if $placeholder == "-moz-placeholder" { 13 | // FF 18- 14 | &:#{$placeholder} { 15 | @content; 16 | } 17 | 18 | // FF 19+ 19 | &::#{$placeholder} { 20 | @content; 21 | } 22 | } 23 | @else { 24 | &:#{$placeholder} { 25 | @content; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_radial-gradient.scss: -------------------------------------------------------------------------------- 1 | // Requires Sass 3.1+ 2 | @mixin radial-gradient($G1, $G2, 3 | $G3: false, $G4: false, 4 | $G5: false, $G6: false, 5 | $G7: false, $G8: false, 6 | $G9: false, $G10: false, 7 | $pos: null, 8 | $shape-size: null, 9 | $deprecated-pos1: center center, 10 | $deprecated-pos2: center center, 11 | $deprecated-radius1: 0, 12 | $deprecated-radius2: 460, 13 | $fallback: false) { 14 | 15 | $data: _radial-arg-parser($G1, $G2, $pos, $shape-size); 16 | $G1: nth($data, 1); 17 | $G2: nth($data, 2); 18 | $pos: nth($data, 3); 19 | $shape-size: nth($data, 4); 20 | 21 | $full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10); 22 | 23 | // Strip deprecated cover/contain for spec 24 | $shape-size-spec: _shape-size-stripper($shape-size); 25 | 26 | // Set $G1 as the default fallback color 27 | $first-color: nth($full, 1); 28 | $fallback-color: nth($first-color, 1); 29 | 30 | @if (type-of($fallback) == color) or ($fallback == "transparent") { 31 | $fallback-color: $fallback; 32 | } 33 | 34 | // Add Commas and spaces 35 | $shape-size: if($shape-size, '#{$shape-size}, ', null); 36 | $pos: if($pos, '#{$pos}, ', null); 37 | $pos-spec: if($pos, 'at #{$pos}', null); 38 | $shape-size-spec: if(($shape-size-spec != ' ') and ($pos == null), '#{$shape-size-spec}, ', '#{$shape-size-spec} '); 39 | 40 | background-color: $fallback-color; 41 | background-image: _deprecated-webkit-gradient(radial, $deprecated-pos1, $deprecated-pos2, $full, $deprecated-radius1, $deprecated-radius2); // Safari <= 5.0 && IOS 4 42 | background-image: -webkit-radial-gradient(unquote(#{$pos}#{$shape-size}#{$full})); 43 | background-image: unquote("radial-gradient(#{$shape-size-spec}#{$pos-spec}#{$full})"); 44 | } 45 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_transform.scss: -------------------------------------------------------------------------------- 1 | @mixin transform($property: none) { 2 | // none | 3 | @include prefixer(transform, $property, webkit moz ms o spec); 4 | } 5 | 6 | @mixin transform-origin($axes: 50%) { 7 | // x-axis - left | center | right | length | % 8 | // y-axis - top | center | bottom | length | % 9 | // z-axis - length 10 | @include prefixer(transform-origin, $axes, webkit moz ms o spec); 11 | } 12 | 13 | @mixin transform-style ($style: flat) { 14 | @include prefixer(transform-style, $style, webkit moz ms o spec); 15 | } 16 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_transition.scss: -------------------------------------------------------------------------------- 1 | // Shorthand mixin. Supports multiple parentheses-deliminated values for each variable. 2 | // Example: @include transition (all, 2.0s, ease-in-out); 3 | // @include transition ((opacity, width), (1.0s, 2.0s), ease-in, (0, 2s)); 4 | // @include transition ($property:(opacity, width), $delay: (1.5s, 2.5s)); 5 | 6 | @mixin transition ($properties...) { 7 | @if length($properties) >= 1 { 8 | @include prefixer(transition, $properties, webkit moz spec); 9 | } 10 | 11 | @else { 12 | $properties: all 0.15s ease-out 0; 13 | @include prefixer(transition, $properties, webkit moz spec); 14 | } 15 | } 16 | 17 | @mixin transition-property ($properties...) { 18 | -webkit-transition-property: transition-property-names($properties, 'webkit'); 19 | -moz-transition-property: transition-property-names($properties, 'moz'); 20 | transition-property: transition-property-names($properties, false); 21 | } 22 | 23 | @mixin transition-duration ($times...) { 24 | @include prefixer(transition-duration, $times, webkit moz spec); 25 | } 26 | 27 | @mixin transition-timing-function ($motions...) { 28 | // ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier() 29 | @include prefixer(transition-timing-function, $motions, webkit moz spec); 30 | } 31 | 32 | @mixin transition-delay ($times...) { 33 | @include prefixer(transition-delay, $times, webkit moz spec); 34 | } 35 | -------------------------------------------------------------------------------- /style/scss/bourbon/css3/_user-select.scss: -------------------------------------------------------------------------------- 1 | @mixin user-select($arg: none) { 2 | @include prefixer(user-select, $arg, webkit moz ms spec); 3 | } 4 | -------------------------------------------------------------------------------- /style/scss/bourbon/functions/_compact.scss: -------------------------------------------------------------------------------- 1 | // Remove `false` values from a list 2 | 3 | @function compact($vars...) { 4 | $list: (); 5 | @each $var in $vars { 6 | @if $var { 7 | $list: append($list, $var, comma); 8 | } 9 | } 10 | @return $list; 11 | } 12 | -------------------------------------------------------------------------------- /style/scss/bourbon/functions/_flex-grid.scss: -------------------------------------------------------------------------------- 1 | // Flexible grid 2 | @function flex-grid($columns, $container-columns: $fg-max-columns) { 3 | $width: $columns * $fg-column + ($columns - 1) * $fg-gutter; 4 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; 5 | @return percentage($width / $container-width); 6 | } 7 | 8 | // Flexible gutter 9 | @function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) { 10 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; 11 | @return percentage($gutter / $container-width); 12 | } 13 | 14 | // The $fg-column, $fg-gutter and $fg-max-columns variables must be defined in your base stylesheet to properly use the flex-grid function. 15 | // This function takes the fluid grid equation (target / context = result) and uses columns to help define each. 16 | // 17 | // The calculation presumes that your column structure will be missing the last gutter: 18 | // 19 | // -- column -- gutter -- column -- gutter -- column 20 | // 21 | // $fg-column: 60px; // Column Width 22 | // $fg-gutter: 25px; // Gutter Width 23 | // $fg-max-columns: 12; // Total Columns For Main Container 24 | // 25 | // div { 26 | // width: flex-grid(4); // returns (315px / 995px) = 31.65829%; 27 | // margin-left: flex-gutter(); // returns (25px / 995px) = 2.51256%; 28 | // 29 | // p { 30 | // width: flex-grid(2, 4); // returns (145px / 315px) = 46.031746%; 31 | // float: left; 32 | // margin: flex-gutter(4); // returns (25px / 315px) = 7.936508%; 33 | // } 34 | // 35 | // blockquote { 36 | // float: left; 37 | // width: flex-grid(2, 4); // returns (145px / 315px) = 46.031746%; 38 | // } 39 | // } -------------------------------------------------------------------------------- /style/scss/bourbon/functions/_grid-width.scss: -------------------------------------------------------------------------------- 1 | @function grid-width($n) { 2 | @return $n * $gw-column + ($n - 1) * $gw-gutter; 3 | } 4 | 5 | // The $gw-column and $gw-gutter variables must be defined in your base stylesheet to properly use the grid-width function. 6 | // 7 | // $gw-column: 100px; // Column Width 8 | // $gw-gutter: 40px; // Gutter Width 9 | // 10 | // div { 11 | // width: grid-width(4); // returns 520px; 12 | // margin-left: $gw-gutter; // returns 40px; 13 | // } 14 | -------------------------------------------------------------------------------- /style/scss/bourbon/functions/_linear-gradient.scss: -------------------------------------------------------------------------------- 1 | @function linear-gradient($pos, $gradients...) { 2 | $type: linear; 3 | $pos-type: type-of(nth($pos, 1)); 4 | 5 | // if $pos doesn't exist, fix $gradient 6 | @if ($pos-type == color) or (nth($pos, 1) == "transparent") { 7 | $gradients: zip($pos $gradients); 8 | $pos: false; 9 | } 10 | 11 | $type-gradient: $type, $pos, $gradients; 12 | @return $type-gradient; 13 | } 14 | -------------------------------------------------------------------------------- /style/scss/bourbon/functions/_modular-scale.scss: -------------------------------------------------------------------------------- 1 | @function modular-scale($value, $increment, $ratio) { 2 | @if $increment > 0 { 3 | @for $i from 1 through $increment { 4 | $value: ($value * $ratio); 5 | } 6 | } 7 | 8 | @if $increment < 0 { 9 | $increment: abs($increment); 10 | @for $i from 1 through $increment { 11 | $value: ($value / $ratio); 12 | } 13 | } 14 | 15 | @return $value; 16 | } 17 | 18 | // div { 19 | // Increment Up GR with positive value 20 | // font-size: modular-scale(14px, 1, 1.618); // returns: 22.652px 21 | // 22 | // Increment Down GR with negative value 23 | // font-size: modular-scale(14px, -1, 1.618); // returns: 8.653px 24 | // 25 | // Can be used with ceil(round up) or floor(round down) 26 | // font-size: floor( modular-scale(14px, 1, 1.618) ); // returns: 22px 27 | // font-size: ceil( modular-scale(14px, 1, 1.618) ); // returns: 23px 28 | // } 29 | // 30 | // modularscale.com 31 | 32 | @function golden-ratio($value, $increment) { 33 | @return modular-scale($value, $increment, 1.618) 34 | } 35 | 36 | // div { 37 | // font-size: golden-ratio(14px, 1); // returns: 22.652px 38 | // } 39 | // 40 | // goldenratiocalculator.com 41 | -------------------------------------------------------------------------------- /style/scss/bourbon/functions/_px-to-em.scss: -------------------------------------------------------------------------------- 1 | // Convert pixels to ems 2 | // eg. for a relational value of 12px write em(12) when the parent is 16px 3 | // if the parent is another value say 24px write em(12, 24) 4 | 5 | @function em($pxval, $base: 16) { 6 | @return ($pxval / $base) * 1em; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /style/scss/bourbon/functions/_radial-gradient.scss: -------------------------------------------------------------------------------- 1 | // This function is required and used by the background-image mixin. 2 | @function radial-gradient($G1, $G2, 3 | $G3: false, $G4: false, 4 | $G5: false, $G6: false, 5 | $G7: false, $G8: false, 6 | $G9: false, $G10: false, 7 | $pos: null, 8 | $shape-size: null) { 9 | 10 | $data: _radial-arg-parser($G1, $G2, $pos, $shape-size); 11 | $G1: nth($data, 1); 12 | $G2: nth($data, 2); 13 | $pos: nth($data, 3); 14 | $shape-size: nth($data, 4); 15 | 16 | $type: radial; 17 | $gradient: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10); 18 | 19 | $type-gradient: $type, $shape-size $pos, $gradient; 20 | @return $type-gradient; 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /style/scss/bourbon/functions/_tint-shade.scss: -------------------------------------------------------------------------------- 1 | // Add percentage of white to a color 2 | @function tint($color, $percent){ 3 | @return mix(white, $color, $percent); 4 | } 5 | 6 | // Add percentage of black to a color 7 | @function shade($color, $percent){ 8 | @return mix(black, $color, $percent); 9 | } 10 | -------------------------------------------------------------------------------- /style/scss/bourbon/functions/_transition-property-name.scss: -------------------------------------------------------------------------------- 1 | // Return vendor-prefixed property names if appropriate 2 | // Example: transition-property-names((transform, color, background), moz) -> -moz-transform, color, background 3 | //************************************************************************// 4 | @function transition-property-names($props, $vendor: false) { 5 | $new-props: (); 6 | 7 | @each $prop in $props { 8 | $new-props: append($new-props, transition-property-name($prop, $vendor), comma); 9 | } 10 | 11 | @return $new-props; 12 | } 13 | 14 | @function transition-property-name($prop, $vendor: false) { 15 | // put other properties that need to be prefixed here aswell 16 | @if $vendor and $prop == transform { 17 | @return unquote('-'+$vendor+'-'+$prop); 18 | } 19 | @else { 20 | @return $prop; 21 | } 22 | } -------------------------------------------------------------------------------- /style/scss/bourbon/helpers/_deprecated-webkit-gradient.scss: -------------------------------------------------------------------------------- 1 | // Render Deprecated Webkit Gradient - Linear || Radial 2 | //************************************************************************// 3 | @function _deprecated-webkit-gradient($type, 4 | $deprecated-pos1, $deprecated-pos2, 5 | $full, 6 | $deprecated-radius1: false, $deprecated-radius2: false) { 7 | $gradient-list: (); 8 | $gradient: false; 9 | $full-length: length($full); 10 | $percentage: false; 11 | $gradient-type: $type; 12 | 13 | @for $i from 1 through $full-length { 14 | $gradient: nth($full, $i); 15 | 16 | @if length($gradient) == 2 { 17 | $color-stop: color-stop(nth($gradient, 2), nth($gradient, 1)); 18 | $gradient-list: join($gradient-list, $color-stop, comma); 19 | } 20 | @else if $gradient != null { 21 | @if $i == $full-length { 22 | $percentage: 100%; 23 | } 24 | @else { 25 | $percentage: ($i - 1) * (100 / ($full-length - 1)) + "%"; 26 | } 27 | $color-stop: color-stop(unquote($percentage), $gradient); 28 | $gradient-list: join($gradient-list, $color-stop, comma); 29 | } 30 | } 31 | 32 | @if $type == radial { 33 | $gradient: -webkit-gradient(radial, $deprecated-pos1, $deprecated-radius1, $deprecated-pos2, $deprecated-radius2, $gradient-list); 34 | } 35 | @else if $type == linear { 36 | $gradient: -webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $gradient-list); 37 | } 38 | @return $gradient; 39 | } 40 | -------------------------------------------------------------------------------- /style/scss/bourbon/helpers/_gradient-positions-parser.scss: -------------------------------------------------------------------------------- 1 | @function _gradient-positions-parser($gradient-type, $gradient-positions) { 2 | @if $gradient-positions 3 | and ($gradient-type == linear) 4 | and (type-of($gradient-positions) != color) { 5 | $gradient-positions: _linear-positions-parser($gradient-positions); 6 | } 7 | @else if $gradient-positions 8 | and ($gradient-type == radial) 9 | and (type-of($gradient-positions) != color) { 10 | $gradient-positions: _radial-positions-parser($gradient-positions); 11 | } 12 | @return $gradient-positions; 13 | } 14 | -------------------------------------------------------------------------------- /style/scss/bourbon/helpers/_radial-arg-parser.scss: -------------------------------------------------------------------------------- 1 | @function _radial-arg-parser($G1, $G2, $pos, $shape-size) { 2 | @each $value in $G1, $G2 { 3 | $first-val: nth($value, 1); 4 | $pos-type: type-of($first-val); 5 | $spec-at-index: null; 6 | 7 | // Determine if spec was passed to mixin 8 | @if type-of($value) == list { 9 | $spec-at-index: if(index($value, at), index($value, at), false); 10 | } 11 | @if $spec-at-index { 12 | @if $spec-at-index > 1 { 13 | @for $i from 1 through ($spec-at-index - 1) { 14 | $shape-size: $shape-size nth($value, $i); 15 | } 16 | @for $i from ($spec-at-index + 1) through length($value) { 17 | $pos: $pos nth($value, $i); 18 | } 19 | } 20 | @else if $spec-at-index == 1 { 21 | @for $i from ($spec-at-index + 1) through length($value) { 22 | $pos: $pos nth($value, $i); 23 | } 24 | } 25 | $G1: false; 26 | } 27 | 28 | // If not spec calculate correct values 29 | @else { 30 | @if ($pos-type != color) or ($first-val != "transparent") { 31 | @if ($pos-type == number) 32 | or ($first-val == "center") 33 | or ($first-val == "top") 34 | or ($first-val == "right") 35 | or ($first-val == "bottom") 36 | or ($first-val == "left") { 37 | 38 | $pos: $value; 39 | 40 | @if $pos == $G1 { 41 | $G1: false; 42 | } 43 | } 44 | 45 | @else if 46 | ($first-val == "ellipse") 47 | or ($first-val == "circle") 48 | or ($first-val == "closest-side") 49 | or ($first-val == "closest-corner") 50 | or ($first-val == "farthest-side") 51 | or ($first-val == "farthest-corner") 52 | or ($first-val == "contain") 53 | or ($first-val == "cover") { 54 | 55 | $shape-size: $value; 56 | 57 | @if $value == $G1 { 58 | $G1: false; 59 | } 60 | 61 | @else if $value == $G2 { 62 | $G2: false; 63 | } 64 | } 65 | } 66 | } 67 | } 68 | @return $G1, $G2, $pos, $shape-size; 69 | } 70 | -------------------------------------------------------------------------------- /style/scss/bourbon/helpers/_radial-positions-parser.scss: -------------------------------------------------------------------------------- 1 | @function _radial-positions-parser($gradient-pos) { 2 | $shape-size: nth($gradient-pos, 1); 3 | $pos: nth($gradient-pos, 2); 4 | $shape-size-spec: _shape-size-stripper($shape-size); 5 | 6 | $pre-spec: unquote(if($pos, "#{$pos}, ", null)) 7 | unquote(if($shape-size, "#{$shape-size},", null)); 8 | $pos-spec: if($pos, "at #{$pos}", null); 9 | 10 | $spec: "#{$shape-size-spec} #{$pos-spec}"; 11 | 12 | // Add comma 13 | @if ($spec != ' ') { 14 | $spec: "#{$spec}," 15 | } 16 | 17 | @return $pre-spec $spec; 18 | } 19 | -------------------------------------------------------------------------------- /style/scss/bourbon/helpers/_render-gradients.scss: -------------------------------------------------------------------------------- 1 | // User for linear and radial gradients within background-image or border-image properties 2 | 3 | @function _render-gradients($gradient-positions, $gradients, $gradient-type, $vendor: false) { 4 | $pre-spec: null; 5 | $spec: null; 6 | $vendor-gradients: null; 7 | @if $gradient-type == linear { 8 | @if $gradient-positions { 9 | $pre-spec: nth($gradient-positions, 1); 10 | $spec: nth($gradient-positions, 2); 11 | } 12 | } 13 | @else if $gradient-type == radial { 14 | $pre-spec: nth($gradient-positions, 1); 15 | $spec: nth($gradient-positions, 2); 16 | } 17 | 18 | @if $vendor { 19 | $vendor-gradients: -#{$vendor}-#{$gradient-type}-gradient(#{$pre-spec} $gradients); 20 | } 21 | @else if $vendor == false { 22 | $vendor-gradients: "#{$gradient-type}-gradient(#{$spec} #{$gradients})"; 23 | $vendor-gradients: unquote($vendor-gradients); 24 | } 25 | @return $vendor-gradients; 26 | } 27 | -------------------------------------------------------------------------------- /style/scss/bourbon/helpers/_shape-size-stripper.scss: -------------------------------------------------------------------------------- 1 | @function _shape-size-stripper($shape-size) { 2 | $shape-size-spec: null; 3 | @each $value in $shape-size { 4 | @if ($value == "cover") or ($value == "contain") { 5 | $value: null; 6 | } 7 | $shape-size-spec: "#{$shape-size-spec} #{$value}"; 8 | } 9 | @return $shape-size-spec; 10 | } 11 | -------------------------------------------------------------------------------- /style/scss/neat/_neat-helpers.scss: -------------------------------------------------------------------------------- 1 | // Functions 2 | @import "functions/private"; 3 | @import "functions/new-breakpoint"; 4 | @import "functions/px-to-em"; 5 | 6 | // Settings 7 | @import "settings/grid"; 8 | @import "settings/visual-grid"; 9 | -------------------------------------------------------------------------------- /style/scss/neat/_neat.scss: -------------------------------------------------------------------------------- 1 | // Bourbon Neat 2 | // MIT Licensed 3 | // Copyright (c) 2012-2013 thoughtbot, inc. 4 | 5 | // Helpers 6 | @import "neat-helpers"; 7 | 8 | // Grid 9 | @import "grid/private"; 10 | @import "grid/reset"; 11 | @import "grid/grid"; 12 | @import "grid/omega"; 13 | @import "grid/outer-container"; 14 | @import "grid/span-columns"; 15 | @import "grid/row"; 16 | @import "grid/shift"; 17 | @import "grid/pad"; 18 | @import "grid/fill-parent"; 19 | @import "grid/media"; 20 | @import "grid/to-deprecate"; 21 | @import "grid/visual-grid"; 22 | -------------------------------------------------------------------------------- /style/scss/neat/functions/_new-breakpoint.scss: -------------------------------------------------------------------------------- 1 | @function new-breakpoint($query:$feature $value $columns, $total-columns: $grid-columns) { 2 | 3 | @if length($query) == 1 { 4 | $query: $default-feature nth($query, 1) $total-columns; 5 | } 6 | 7 | @else if length($query) == 2 or length($query) == 4 { 8 | $query: append($query, $total-columns); 9 | } 10 | 11 | @if not belongs-to($query, $visual-grid-breakpoints) { 12 | $visual-grid-breakpoints: append($visual-grid-breakpoints, $query, comma); 13 | } 14 | 15 | @return $query; 16 | } 17 | -------------------------------------------------------------------------------- /style/scss/neat/functions/_px-to-em.scss: -------------------------------------------------------------------------------- 1 | @function em($pxval, $base: 16) { 2 | @return ($pxval / $base) * 1em; 3 | } 4 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_fill-parent.scss: -------------------------------------------------------------------------------- 1 | @mixin fill-parent() { 2 | width: 100%; 3 | 4 | @if $border-box-sizing == false { 5 | @include box-sizing(border-box); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_grid.scss: -------------------------------------------------------------------------------- 1 | @if $border-box-sizing == true { 2 | * { 3 | @include box-sizing(border-box); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_media.scss: -------------------------------------------------------------------------------- 1 | @mixin media($query:$feature $value $columns, $total-columns: $grid-columns) { 2 | 3 | @if length($query) == 1 { 4 | @media screen and ($default-feature: nth($query, 1)) { 5 | $default-grid-columns: $grid-columns; 6 | $grid-columns: $total-columns; 7 | @content; 8 | $grid-columns: $default-grid-columns; 9 | } 10 | } 11 | 12 | @else if length($query) == 2 { 13 | @media screen and (nth($query, 1): nth($query, 2)) { 14 | $default-grid-columns: $grid-columns; 15 | $grid-columns: $total-columns; 16 | @content; 17 | $grid-columns: $default-grid-columns; 18 | } 19 | } 20 | 21 | @else if length($query) == 3 { 22 | @media screen and (nth($query, 1): nth($query, 2)) { 23 | $default-grid-columns: $grid-columns; 24 | $grid-columns: nth($query, 3); 25 | @content; 26 | $grid-columns: $default-grid-columns; 27 | } 28 | } 29 | 30 | @else if length($query) == 4 { 31 | @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) { 32 | $default-grid-columns: $grid-columns; 33 | $grid-columns: $total-columns; 34 | @content; 35 | $grid-columns: $default-grid-columns; 36 | } 37 | } 38 | 39 | @else if length($query) == 5 { 40 | @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) { 41 | $default-grid-columns: $grid-columns; 42 | $grid-columns: nth($query, 5); 43 | @content; 44 | $grid-columns: $default-grid-columns; 45 | } 46 | } 47 | 48 | @else { 49 | @warn "Wrong number of arguments for breakpoint(). Read the documentation for more details."; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_omega.scss: -------------------------------------------------------------------------------- 1 | // Remove last element gutter 2 | @mixin omega($query: block, $direction: default) { 3 | $table: if(belongs-to(table, $query), true, false); 4 | $auto: if(belongs-to(auto, $query), true, false); 5 | 6 | @if $direction != default { 7 | @warn "The omega mixin will no longer take a $direction argument. To change the layout direction, use row($direction) or set $default-layout-direction instead." 8 | } @else { 9 | $direction: get-direction($layout-direction, $default-layout-direction); 10 | } 11 | 12 | @if length($query) == 1 { 13 | @if $auto { 14 | &:last-child { 15 | margin-#{$direction}: 0; 16 | } 17 | } 18 | 19 | @else if contains-display-value($query) { 20 | @if $table { 21 | padding-#{$direction}: 0; 22 | } 23 | 24 | @else { 25 | margin-#{$direction}: 0; 26 | } 27 | } 28 | 29 | @else { 30 | @include nth-child($query, $direction); 31 | } 32 | } 33 | 34 | @else if length($query) == 2 { 35 | @if $table { 36 | @if $auto { 37 | &:last-child { 38 | padding-#{$direction}: 0; 39 | } 40 | } 41 | 42 | @else { 43 | &:nth-child(#{nth($query, 1)}) { 44 | padding-#{$direction}: 0; 45 | } 46 | } 47 | } 48 | 49 | @else { 50 | @if $auto { 51 | &:last-child { 52 | margin-#{$direction}: 0; 53 | } 54 | } 55 | 56 | @else { 57 | @include nth-child(nth($query, 1), $direction); 58 | } 59 | } 60 | } 61 | 62 | @else { 63 | @warn "Too many arguments passed to the omega() mixin." 64 | } 65 | } 66 | 67 | @mixin nth-child($query, $direction) { 68 | $opposite-direction: get-opposite-direction($direction); 69 | 70 | &:nth-child(#{$query}) { 71 | margin-#{$direction}: 0; 72 | } 73 | 74 | @if type-of($query) == number { 75 | &:nth-child(#{$query}+1) { 76 | clear: $opposite-direction; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_outer-container.scss: -------------------------------------------------------------------------------- 1 | @mixin outer-container { 2 | @include clearfix; 3 | max-width: $max-width; 4 | margin: { 5 | left: auto; 6 | right: auto; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_pad.scss: -------------------------------------------------------------------------------- 1 | @mixin pad($padding: flex-gutter()) { 2 | $padding-list: null; 3 | @each $value in $padding { 4 | $value: if($value == 'default', flex-gutter(), $value); 5 | $padding-list: join($padding-list, $value); 6 | } 7 | padding: $padding-list; 8 | } 9 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_private.scss: -------------------------------------------------------------------------------- 1 | $parent-columns: $grid-columns !default; 2 | $fg-column: $column; 3 | $fg-gutter: $gutter; 4 | $fg-max-columns: $grid-columns; 5 | $container-display-table: false !default; 6 | $layout-direction: nil !default; 7 | 8 | @function flex-grid($columns, $container-columns: $fg-max-columns) { 9 | $width: $columns * $fg-column + ($columns - 1) * $fg-gutter; 10 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; 11 | @return percentage($width / $container-width); 12 | } 13 | 14 | @function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) { 15 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter; 16 | @return percentage($gutter / $container-width); 17 | } 18 | 19 | @function grid-width($n) { 20 | @return $n * $gw-column + ($n - 1) * $gw-gutter; 21 | } 22 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_reset.scss: -------------------------------------------------------------------------------- 1 | @mixin reset-display { 2 | $container-display-table: false; 3 | } 4 | 5 | @mixin reset-layout-direction { 6 | $layout-direction: $default-layout-direction; 7 | } 8 | 9 | @mixin reset-all { 10 | @include reset-display; 11 | @include reset-layout-direction; 12 | } 13 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_row.scss: -------------------------------------------------------------------------------- 1 | @mixin row($display: block, $direction: $default-layout-direction) { 2 | @include clearfix; 3 | $layout-direction: $direction; 4 | 5 | @if $display == table { 6 | display: table; 7 | @include fill-parent; 8 | table-layout: fixed; 9 | $container-display-table: true; 10 | } 11 | 12 | @else { 13 | display: block; 14 | $container-display-table: false; 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_shift.scss: -------------------------------------------------------------------------------- 1 | @mixin shift($n-columns: 1) { 2 | 3 | $direction: get-direction($layout-direction, $default-layout-direction); 4 | $opposite-direction: get-opposite-direction($direction); 5 | 6 | margin-#{$opposite-direction}: $n-columns * flex-grid(1, $parent-columns) + $n-columns * flex-gutter($parent-columns); 7 | 8 | // Reset nesting context 9 | $parent-columns: $grid-columns; 10 | } 11 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_span-columns.scss: -------------------------------------------------------------------------------- 1 | @mixin span-columns($span: $columns of $container-columns, $display: block) { 2 | 3 | $columns: nth($span, 1); 4 | $container-columns: container-span($span); 5 | $display-table: false; 6 | 7 | $direction: get-direction($layout-direction, $default-layout-direction); 8 | $opposite-direction: get-opposite-direction($direction); 9 | 10 | @if $container-columns != $grid-columns { 11 | $parent-columns: $container-columns; 12 | } @else { 13 | $parent-columns: $grid-columns; 14 | } 15 | 16 | @if $container-display-table == true { 17 | $display-table: true; 18 | } @else if $display == table { 19 | $display-table: true; 20 | } @else { 21 | $display-table: false; 22 | } 23 | 24 | @if $display-table { 25 | display: table-cell; 26 | padding-#{$direction}: flex-gutter($container-columns); 27 | width: flex-grid($columns, $container-columns) + flex-gutter($container-columns); 28 | 29 | &:last-child { 30 | width: flex-grid($columns, $container-columns); 31 | padding-#{$direction}: 0; 32 | } 33 | } 34 | 35 | @else { 36 | display: block; 37 | float: #{$opposite-direction}; 38 | margin-#{$direction}: flex-gutter($container-columns); 39 | width: flex-grid($columns, $container-columns); 40 | 41 | &:last-child { 42 | margin-#{$direction}: 0; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_to-deprecate.scss: -------------------------------------------------------------------------------- 1 | @mixin breakpoint($query:$feature $value $columns, $total-columns: $grid-columns) { 2 | @warn "The breakpoint() mixin was renamed to media() in Neat 1.0. Please update your project with the new syntax before the next version bump."; 3 | 4 | @if length($query) == 1 { 5 | @media screen and ($default-feature: nth($query, 1)) { 6 | $default-grid-columns: $grid-columns; 7 | $grid-columns: $total-columns; 8 | @content; 9 | $grid-columns: $default-grid-columns; 10 | } 11 | } 12 | 13 | @else if length($query) == 2 { 14 | @media screen and (nth($query, 1): nth($query, 2)) { 15 | $default-grid-columns: $grid-columns; 16 | $grid-columns: $total-columns; 17 | @content; 18 | $grid-columns: $default-grid-columns; 19 | } 20 | } 21 | 22 | @else if length($query) == 3 { 23 | @media screen and (nth($query, 1): nth($query, 2)) { 24 | $default-grid-columns: $grid-columns; 25 | $grid-columns: nth($query, 3); 26 | @content; 27 | $grid-columns: $default-grid-columns; 28 | } 29 | } 30 | 31 | @else if length($query) == 4 { 32 | @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) { 33 | $default-grid-columns: $grid-columns; 34 | $grid-columns: $total-columns; 35 | @content; 36 | $grid-columns: $default-grid-columns; 37 | } 38 | } 39 | 40 | @else if length($query) == 5 { 41 | @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) { 42 | $default-grid-columns: $grid-columns; 43 | $grid-columns: nth($query, 5); 44 | @content; 45 | $grid-columns: $default-grid-columns; 46 | } 47 | } 48 | 49 | @else { 50 | @warn "Wrong number of arguments for breakpoint(). Read the documentation for more details."; 51 | } 52 | } 53 | 54 | @mixin nth-omega($nth, $display: block, $direction: default) { 55 | @warn "The nth-omega() mixin is deprecated. Please use omega() instead."; 56 | @include omega($nth $display, $direction); 57 | } 58 | -------------------------------------------------------------------------------- /style/scss/neat/grid/_visual-grid.scss: -------------------------------------------------------------------------------- 1 | @mixin grid-column-gradient($values...) { 2 | background-image: deprecated-webkit-gradient(linear, left top, left bottom, $values); 3 | background-image: -webkit-linear-gradient(left, $values); 4 | background-image: -moz-linear-gradient(left, $values); 5 | background-image: -ms-linear-gradient(left, $values); 6 | background-image: -o-linear-gradient(left, $values); 7 | background-image: unquote("linear-gradient(left, #{$values})"); 8 | } 9 | 10 | @if $visual-grid == true or $visual-grid == yes { 11 | body:before { 12 | content: ''; 13 | display: inline-block; 14 | @include grid-column-gradient(gradient-stops($grid-columns)); 15 | height: 100%; 16 | left: 0; 17 | margin: 0 auto; 18 | max-width: $max-width; 19 | opacity: $visual-grid-opacity; 20 | position: fixed; 21 | right: 0; 22 | width: 100%; 23 | pointer-events: none; 24 | 25 | @if $visual-grid-index == back { 26 | z-index: -1; 27 | } 28 | 29 | @else if $visual-grid-index == front { 30 | z-index: 9999; 31 | } 32 | 33 | @each $breakpoint in $visual-grid-breakpoints { 34 | @if $breakpoint != nil { 35 | @include media($breakpoint) { 36 | @include grid-column-gradient(gradient-stops($grid-columns)); 37 | } 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /style/scss/neat/settings/_grid.scss: -------------------------------------------------------------------------------- 1 | $column: golden-ratio(1em, 3) !default; // Column width 2 | $gutter: golden-ratio(1em, 1) !default; // Gutter between each two columns 3 | $grid-columns: 12 !default; // Total number of columns in the grid 4 | $max-width: em(1088) !default; // Max-width of the outer container 5 | $border-box-sizing: true !default; // Makes all elements have a border-box layout 6 | $default-feature: min-width; // Default @media feature for the breakpoint() mixin 7 | $default-layout-direction: LTR !default; 8 | -------------------------------------------------------------------------------- /style/scss/neat/settings/_visual-grid.scss: -------------------------------------------------------------------------------- 1 | $visual-grid: false !default; // Display the base grid 2 | $visual-grid-color: #EEE !default; 3 | $visual-grid-index: back !default; // Show grid behind content (back) or overlay it over the content (front) 4 | $visual-grid-opacity: 0.4 !default; 5 | $visual-grid-breakpoints: () !default; 6 | -------------------------------------------------------------------------------- /unittest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd $(cd -P -- "$(dirname -- "$0")" && pwd -P) 3 | php vendor/phpunit/phpunit/phpunit.php --stop-on-error --stop-on-failure $1 4 | -------------------------------------------------------------------------------- /var/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /var/doctrine/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /var/documents/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /var/uploads/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /vendor/.gitignore: -------------------------------------------------------------------------------- 1 | !.gitignore 2 | .composer 3 | composer 4 | autoload.php 5 | 6 | MartinPaulEve 7 | MichaelThessel 8 | CeON 9 | citation-style-language 10 | dagwieers 11 | doctrine 12 | dyve 13 | knmnyn 14 | phpunit 15 | pkp 16 | slm 17 | symfony 18 | zendframework 19 | -------------------------------------------------------------------------------- /vendor/README.md: -------------------------------------------------------------------------------- 1 | This vendor/ directory is where third-party modules should be installed. 2 | -------------------------------------------------------------------------------- /vendor/xmlps/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | __DIR__ . '/library/Libxml/Libxml.php', 4 | 'Xmlps\Event\Handler\AclDispatchHandler' => __DIR__ . '/library/Event/Handler/AclDispatchHandler.php', 5 | 'Xmlps\Event\Handler\FlashMessengerRenderHandler' => __DIR__ . '/library/Event/Handler/FlashMessengerRenderHandler.php', 6 | 'Xmlps\Log\Writer\Doctrine' => __DIR__ . '/library/Log/Writer/Doctrine.php', 7 | 'Xmlps\Logger\Logger' => __DIR__ . '/library/Log/Logger.php', 8 | 'Xmlps\Command\Command' => __DIR__ . '/library/Command/Command.php', 9 | 'Xmlps\Doctrine\Listener\ServiceManagerListener' => __DIR__ . '/library/Doctrine/Listener/ServiceManagerListener.php', 10 | 'Xmlps\Controller\Plugin\ControllerAcl' => __DIR__ . '/library/Controller/Plugin/ControllerAcl.php', 11 | 'Xmlps\DAO\DAO' => __DIR__ . '/library/DAO/DAO.php', 12 | 'Xmlps\DAO\DAOInterface' => __DIR__ . '/library/DAO/DAOInterface.php', 13 | 'Xmlps\UnitTest\ModelTest' => __DIR__ . '/library/UnitTest/ModelTest.php', 14 | 'Xmlps\UnitTest\TestHelper' => __DIR__ . '/library/UnitTest/TestHelper.php', 15 | 'Xmlps\UnitTest\ControllerTest' => __DIR__ . '/library/UnitTest/ControllerTest.php', 16 | 'Xmlps\DataObject\DataObject' => __DIR__ . '/library/DataObject/DataObject.php', 17 | ); 18 | -------------------------------------------------------------------------------- /vendor/xmlps/library/DAO/DAOInterface.php: -------------------------------------------------------------------------------- 1 | getApplication()->getServiceManager(); 18 | $em = $sm->get('doctrine.entitymanager.orm_default'); 19 | $dem = $em->getEventManager(); 20 | $dem->addEventListener( 21 | array(\Doctrine\ORM\Events::postLoad), 22 | new ServiceManagerListener($sm) 23 | ); 24 | 25 | ... 26 | * } 27 | * 28 | */ 29 | class ServiceManagerListener 30 | { 31 | protected $sm; 32 | 33 | public function __construct(ServiceManager $sm) 34 | { 35 | $this->sm = $sm; 36 | } 37 | 38 | public function postLoad($eventArgs) 39 | { 40 | $entity = $eventArgs->getEntity(); 41 | $class = new \ReflectionClass($entity); 42 | if ($class->implementsInterface('Zend\ServiceManager\ServiceLocatorAwareInterface')) { 43 | $entity->setServiceLocator($this->sm); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /vendor/xmlps/library/Event/Handler/FlashMessengerRenderHandler.php: -------------------------------------------------------------------------------- 1 | attach(MvcEvent::EVENT_RENDER, function($e) { 13 | * FlashMessengerRender::registerMessages($e); 14 | * }); 15 | * } 16 | */ 17 | class FlashMessengerRenderHandler 18 | { 19 | public static function registerMessages(&$e) 20 | { 21 | $application = $e->getApplication(); 22 | $sm = $application->getServiceManager(); 23 | $flashMessenger = $sm->get('ControllerPluginManager')->get('flashMessenger'); 24 | 25 | $messages = array(); 26 | 27 | $flashMessenger->setNamespace('success'); 28 | if ($flashMessenger->hasMessages()) { 29 | $messages['success'] = $flashMessenger->getMessages(); 30 | } 31 | $flashMessenger->clearMessages(); 32 | 33 | $flashMessenger->setNamespace('info'); 34 | if ($flashMessenger->hasMessages()) { 35 | $messages['info'] = $flashMessenger->getMessages(); 36 | } 37 | $flashMessenger->clearMessages(); 38 | 39 | $flashMessenger->setNamespace('default'); 40 | if ($flashMessenger->hasMessages()) { 41 | if (isset($messages['info'])) { 42 | $messages['info'] = array_merge($messages['info'], $flashMessenger->getMessages()); 43 | } 44 | else { 45 | $messages['info'] = $flashMessenger->getMessages(); 46 | } 47 | } 48 | $flashMessenger->clearMessages(); 49 | 50 | $flashMessenger->setNamespace('error'); 51 | if ($flashMessenger->hasMessages()) { 52 | $messages['error'] = $flashMessenger->getMessages(); 53 | } 54 | $flashMessenger->clearMessages(); 55 | 56 | $e->getViewModel()->setVariable('flashMessages', $messages); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /vendor/xmlps/library/Libxml/Libxml.php: -------------------------------------------------------------------------------- 1 | message; }, 31 | libxml_get_errors() 32 | )); 33 | libxml_clear_errors(); 34 | 35 | return $errors; 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /vendor/xmlps/library/Log/Writer/Doctrine.php: -------------------------------------------------------------------------------- 1 | logEntityDAO = $logEntityDAO; 29 | } 30 | 31 | /** 32 | * This writer does not support formatting. 33 | * 34 | * @param string|FormatterInterface $formatter 35 | * 36 | * @return WriterInterface 37 | */ 38 | public function setFormatter($formatter) 39 | { 40 | return $this; 41 | } 42 | 43 | /** 44 | * Write a message to the log. 45 | * 46 | * @param array $event Event data 47 | * 48 | * @return void 49 | */ 50 | protected function doWrite(array $event) 51 | { 52 | $logEntity = $this->logEntityDAO->getInstance(); 53 | 54 | $logEntity->timestamp = time(); 55 | $logEntity->priority = $event['priority']; 56 | $logEntity->message = $event['message']; 57 | $logEntity->ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null; 58 | 59 | $this->logEntityDAO->save($logEntity); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /vendor/xmlps/library/UnitTest/ControllerTest.php: -------------------------------------------------------------------------------- 1 | setApplicationConfig( 20 | include $baseDir . '/config/application.config.php' 21 | ); 22 | 23 | $this->sm = $this->getApplicationServiceLocator(); 24 | } 25 | 26 | /** 27 | * Helper function. Log in a user 28 | * 29 | * @return void 30 | */ 31 | protected function mockLogin($user) { 32 | $authService = $this->getMock('Zend\Authentication\AuthenticationService'); 33 | $authService->expects($this->any()) 34 | ->method('getIdentity') 35 | ->will($this->returnValue($user)); 36 | 37 | $authService->expects($this->any()) 38 | ->method('hasIdentity') 39 | ->will($this->returnValue(true)); 40 | 41 | $this->getApplicationServiceLocator()->setAllowOverride(true); 42 | $this->getApplicationServiceLocator() 43 | ->setService('Zend\Authentication\AuthenticationService', $authService); 44 | } 45 | 46 | /** 47 | * Clean up after test 48 | * 49 | * @return void 50 | */ 51 | public function tearDown() 52 | { 53 | $this->cleanTestData(); 54 | } 55 | 56 | /** 57 | * Creates test data for this test 58 | * 59 | * @return void 60 | */ 61 | protected function createTestData() {} 62 | 63 | /** 64 | * Cleans test data after test 65 | * 66 | * @return void 67 | */ 68 | protected function cleanTestData() {} 69 | 70 | /** 71 | * Resets the test data 72 | * 73 | * @return void 74 | */ 75 | protected function resetTestData() 76 | { 77 | $this->cleanTestData(); 78 | $this->createTestData(); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /vendor/xmlps/library/UnitTest/ModelTest.php: -------------------------------------------------------------------------------- 1 | sm = new ServiceManager(new ServiceManagerConfig()); 28 | $this->sm->setService( 29 | 'ApplicationConfig', 30 | include $baseDir . '/config/application.config.php' 31 | ); 32 | $this->sm->get('ModuleManager')->loadModules(); 33 | } 34 | 35 | /** 36 | * Clean up after test 37 | * 38 | * @return void 39 | */ 40 | public function tearDown() 41 | { 42 | $this->cleanTestData(); 43 | } 44 | 45 | /** 46 | * Creates test data for this test 47 | * 48 | * @return void 49 | */ 50 | protected function createTestData() {} 51 | 52 | /** 53 | * Cleans test data after test 54 | * 55 | * @return void 56 | */ 57 | protected function cleanTestData() {} 58 | 59 | /** 60 | * Resets the test data 61 | * 62 | * @return void 63 | */ 64 | protected function resetTestData() 65 | { 66 | $this->cleanTestData(); 67 | $this->createTestData(); 68 | } 69 | } 70 | --------------------------------------------------------------------------------