├── .firebaserc
├── .gitignore
├── .ruby-version
├── Capfile
├── Dockerfile
├── Gemfile
├── Gemfile.lock
├── LICENSE
├── README.md
├── Rakefile
├── app
├── assets
│ ├── config
│ │ └── manifest.js
│ ├── images
│ │ ├── .keep
│ │ ├── bacteria.png
│ │ ├── big_overview.png
│ │ ├── brain.jpg
│ │ ├── demo.gif
│ │ ├── dna-wide.png
│ │ ├── dna-wide.webp
│ │ ├── dna.jpg
│ │ ├── img_colormap.gif
│ │ ├── lightbox
│ │ │ ├── close.png
│ │ │ ├── loading.gif
│ │ │ ├── next.png
│ │ │ └── prev.png
│ │ ├── micro.jpg
│ │ ├── overview.jpg
│ │ ├── overview.png
│ │ ├── overview.webp
│ │ ├── screenshot01.png
│ │ ├── screenshot02.png
│ │ ├── screenshot03.png
│ │ ├── screenshot04.png
│ │ ├── screenshot05.png
│ │ ├── screenshot06.png
│ │ ├── screenshot07.png
│ │ ├── sm_screenshot01.png
│ │ ├── sm_screenshot02.png
│ │ ├── sm_screenshot03.png
│ │ ├── sm_screenshot04.png
│ │ ├── sm_screenshot05.png
│ │ ├── sm_screenshot06.png
│ │ ├── sm_screenshot07.png
│ │ └── virus.jpg
│ ├── javascripts
│ │ ├── annotation_modal.js
│ │ ├── annotations.js
│ │ ├── annotator_manager.js
│ │ ├── api_keys.js
│ │ ├── application.js
│ │ ├── assigns.js
│ │ ├── audits.js
│ │ ├── cable.js
│ │ ├── channels
│ │ │ └── .keep
│ │ ├── concept_name_cache.js
│ │ ├── documents.js
│ │ ├── entity_types.js
│ │ ├── home.js
│ │ ├── jquery-smartphoto.js
│ │ ├── jquery-tablesort.js
│ │ ├── jquery.uploadfile.js
│ │ ├── jscolor.js
│ │ ├── lexicon_groups.js
│ │ ├── lexicons.js
│ │ ├── lightbox.js
│ │ ├── models.js
│ │ ├── mousetrap.min.js
│ │ ├── project_action.js
│ │ ├── project_users.js
│ │ ├── projects.js
│ │ ├── q.js
│ │ ├── range.js
│ │ ├── relation_modal.js
│ │ ├── relation_types.js
│ │ ├── relations.js
│ │ ├── smartphoto.js
│ │ ├── sortable.js
│ │ ├── statistics.js
│ │ ├── svg.js
│ │ ├── tasks.js
│ │ ├── underscore-min.map
│ │ └── underscore.min.js
│ └── stylesheets
│ │ ├── annotations.scss
│ │ ├── api_keys.scss
│ │ ├── application.css.scss
│ │ ├── assigns.scss
│ │ ├── audits.scss
│ │ ├── colors.scss
│ │ ├── documents.scss
│ │ ├── entity_types.scss
│ │ ├── home.scss.erb
│ │ ├── lexicon_groups.scss
│ │ ├── lexicons.scss
│ │ ├── lightbox.scss
│ │ ├── models.scss
│ │ ├── project_users.scss
│ │ ├── projects.scss
│ │ ├── range.scss
│ │ ├── relation_types.scss
│ │ ├── relations.scss
│ │ ├── scaffolds.scss
│ │ ├── smartphoto.css
│ │ ├── statistics.scss
│ │ ├── tasks.scss
│ │ ├── toastr.scss
│ │ └── uploadfile.scss
├── channels
│ └── application_cable
│ │ ├── channel.rb
│ │ └── connection.rb
├── controllers
│ ├── annotations_controller.rb
│ ├── api_keys_controller.rb
│ ├── application_controller.rb
│ ├── assigns_controller.rb
│ ├── audits_controller.rb
│ ├── concerns
│ │ └── .keep
│ ├── documents_controller.rb
│ ├── entity_types_controller.rb
│ ├── home_controller.rb
│ ├── lexicon_groups_controller.rb
│ ├── lexicons_controller.rb
│ ├── models_controller.rb
│ ├── project_users_controller.rb
│ ├── projects_controller.rb
│ ├── relation_types_controller.rb
│ ├── relations_controller.rb
│ ├── statistics_controller.rb
│ ├── tasks_controller.rb
│ ├── users
│ │ ├── confirmations_controller.rb
│ │ ├── omniauth_callbacks_controller.rb
│ │ ├── passwords_controller.rb
│ │ ├── registrations_controller.rb
│ │ ├── sessions_controller.rb
│ │ └── unlocks_controller.rb
│ └── users_controller.rb
├── helpers
│ ├── annotations_helper.rb
│ ├── api_keys_helper.rb
│ ├── application_helper.rb
│ ├── assigns_helper.rb
│ ├── audits_helper.rb
│ ├── devise_helper.rb
│ ├── documents_helper.rb
│ ├── entity_types_helper.rb
│ ├── home_helper.rb
│ ├── lexicon_groups_helper.rb
│ ├── lexicons_helper.rb
│ ├── models_helper.rb
│ ├── project_users_helper.rb
│ ├── projects_helper.rb
│ ├── relation_types_helper.rb
│ ├── relations_helper.rb
│ ├── statistics_helper.rb
│ └── tasks_helper.rb
├── jobs
│ ├── application_job.rb
│ └── sentry_job.rb
├── mailers
│ ├── application_mailer.rb
│ └── user_mailer.rb
├── models
│ ├── annotation.rb
│ ├── api_key.rb
│ ├── application_record.rb
│ ├── assign.rb
│ ├── audit.rb
│ ├── concerns
│ │ └── .keep
│ ├── document.rb
│ ├── entity_type.rb
│ ├── entity_util.rb
│ ├── lexicon.rb
│ ├── lexicon_group.rb
│ ├── model.rb
│ ├── node.rb
│ ├── project.rb
│ ├── project_user.rb
│ ├── relation.rb
│ ├── relation_type.rb
│ ├── task.rb
│ ├── upload_batch.rb
│ └── user.rb
└── views
│ ├── _signin.html.erb
│ ├── annotations
│ ├── _annotation.json.jbuilder
│ ├── _annotation_modal.html.erb
│ ├── _annotation_table.html.erb
│ ├── _form.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── api_keys
│ ├── _api_key.json.jbuilder
│ ├── _form.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── assigns
│ ├── _assign.json.jbuilder
│ ├── _form.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── audits
│ ├── _audit.json.jbuilder
│ ├── _form.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── devise
│ ├── confirmations
│ │ └── new.html.erb
│ ├── mailer
│ │ ├── confirmation_instructions.html.erb
│ │ ├── email_changed.html.erb
│ │ ├── password_change.html.erb
│ │ ├── reset_password_instructions.html.erb
│ │ └── unlock_instructions.html.erb
│ ├── passwords
│ │ ├── edit.html.erb
│ │ └── new.html.erb
│ ├── registrations
│ │ ├── edit.html.erb
│ │ └── new.html.erb
│ ├── sessions
│ │ └── new.html.erb
│ ├── shared
│ │ ├── _error_messages.html.erb
│ │ └── _links.html.erb
│ └── unlocks
│ │ └── new.html.erb
│ ├── documents
│ ├── _buttons.html.erb
│ ├── _doc_info.html.erb
│ ├── _document.json.jbuilder
│ ├── _document_main.html.erb
│ ├── _errors_modal.html.erb
│ ├── _fig.html.erb
│ ├── _form.html.erb
│ ├── _infon.html.erb
│ ├── _outline.html.erb
│ ├── _ref.html.erb
│ ├── _text_fragment.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── partial.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── entity_types
│ ├── _entity_type.json.jbuilder
│ ├── _form.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── home
│ ├── about.html.erb
│ ├── index.html.erb
│ ├── privacy.html.erb
│ ├── sitemap.html.erb
│ ├── stat.html.erb
│ └── tos.html.erb
│ ├── kaminari
│ ├── _first_page.html.erb
│ ├── _gap.html.erb
│ ├── _last_page.html.erb
│ ├── _next_page.html.erb
│ ├── _page.html.erb
│ ├── _paginator.html.erb
│ └── _prev_page.html.erb
│ ├── layouts
│ ├── application.html.erb
│ ├── mailer.html.erb
│ └── mailer.text.erb
│ ├── lexicon_groups
│ ├── _form.html.erb
│ ├── _lexicon_group.json.jbuilder
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── lexicons
│ ├── _form.html.erb
│ ├── _lexicon.json.jbuilder
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── models
│ ├── _form.html.erb
│ ├── _model.json.jbuilder
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── project_users
│ ├── _form.html.erb
│ ├── _project_user.json.jbuilder
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── projects
│ ├── _annotator_modal.html.erb
│ ├── _form.html.erb
│ ├── _index_partial.html.erb
│ ├── _project.json.jbuilder
│ ├── _project_action_modal.html.erb
│ ├── _project_buttons.html.erb
│ ├── _project_header.html.erb
│ ├── _project_tab.html.erb
│ ├── buttons.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── partial.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── relation_types
│ ├── _form.html.erb
│ ├── _relation_type.json.jbuilder
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── relations
│ ├── _relation.json.jbuilder
│ ├── _relation_modal.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── statistics
│ ├── annotation_agree.erb
│ ├── entities.html.erb
│ └── relation_agree.html.erb
│ ├── tasks
│ ├── _form.html.erb
│ ├── _index_partial.html.erb
│ ├── _task.json.jbuilder
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── index.json.jbuilder
│ ├── new.html.erb
│ ├── partial.html.erb
│ ├── show.html.erb
│ └── show.json.jbuilder
│ ├── user_mailer
│ ├── project_done.html.erb
│ ├── project_done.text.erb
│ ├── session_email.html.erb
│ └── session_email.text.erb
│ └── users
│ ├── _form.html.erb
│ ├── edit.html.erb
│ ├── index.html.erb
│ ├── new.html.erb
│ └── show.html.erb
├── bin
├── bundle
├── rails
├── rake
├── setup
├── spring
├── update
└── yarn
├── config.ru
├── config
├── application.rb
├── boot.rb
├── cable.yml
├── credentials.yml.enc
├── credentials.yml.enc.sample
├── database.yml.docker
├── deploy.rb
├── deploy
│ ├── production.rb
│ └── staging.rb
├── environment.rb
├── environments
│ ├── development.rb
│ ├── production.rb
│ └── test.rb
├── initializers
│ ├── application_controller_renderer.rb
│ ├── assets.rb
│ ├── backtrace_silencers.rb
│ ├── content_security_policy.rb
│ ├── cookies_serializer.rb
│ ├── devise.rb
│ ├── filter_parameter_logging.rb
│ ├── inflections.rb
│ ├── mime_types.rb
│ ├── recaptcha.rb
│ ├── senty.rb
│ └── wrap_parameters.rb
├── locales
│ ├── devise.en.yml
│ └── en.yml
├── master.key.sample
├── nginx.conf
├── puma.rb
├── routes.rb
├── sitemap.rb
├── spring.rb
└── storage.yml
├── db
├── migrate
│ ├── 20190603132151_devise_create_users.rb
│ ├── 20190603132409_add_omniauth_to_users.rb
│ ├── 20190610111421_create_projects.rb
│ ├── 20190610111644_create_documents.rb
│ ├── 20190610111733_create_entity_types.rb
│ ├── 20190610112015_create_lexicon_groups.rb
│ ├── 20190610112037_create_lexicons.rb
│ ├── 20190610112216_create_models.rb
│ ├── 20190610112558_create_upload_batches.rb
│ ├── 20190610112726_create_tasks.rb
│ ├── 20190610113324_create_project_users.rb
│ ├── 20190610113454_create_assigns.rb
│ ├── 20190610114418_create_annotations.rb
│ ├── 20190610114703_create_api_keys.rb
│ ├── 20190624104832_add_image_to_user.rb
│ ├── 20190624115428_add_devise_trackable_columns_to_users.rb
│ ├── 20190701065407_add_round_to_annotation.rb
│ ├── 20190702083409_add_project_user_id_to_assign.rb
│ ├── 20190702110738_delete_total_round_from_project.rb
│ ├── 20190702115746_add_assigns_count_to_document.rb
│ ├── 20190702224238_add_lexicon_groups_count_to_project.rb
│ ├── 20190702232438_change_type_for_l_exicon_name.rb
│ ├── 20190703092302_rename_status_in_project.rb
│ ├── 20190703144016_change_xml_in_document.rb
│ ├── 20190706050029_add_detached_to_assign.rb
│ ├── 20190707221246_change_content_in_annotations.rb
│ ├── 20190708033230_add_update_time_to_annotations.rb
│ ├── 20190708104730_add_a_id_no_to_annotation.rb
│ ├── 20190715050346_add_annotations_count_to_assign.rb
│ ├── 20190716191610_make_annotator_longer.rb
│ ├── 20190718173126_add_prefix_to_entity_type.rb
│ ├── 20190718203242_add_version_to_annotation.rb
│ ├── 20190721043153_add_locked_to_project.rb
│ ├── 20190722155228_add_done_to_project.rb
│ ├── 20190725191023_create_relation_types.rb
│ ├── 20190725201359_create_relations.rb
│ ├── 20190725201503_create_nodes.rb
│ ├── 20190726143910_add_ref_id_to_node.rb
│ ├── 20190729192949_add_sig1_sig2_to_relation.rb
│ ├── 20190730153024_add_document_version_to_node.rb
│ ├── 20190801143837_add_agree_to_annotation.rb
│ ├── 20190813171427_add_finalized_to_project.rb
│ ├── 20190916045155_change_access_cpount_to_access_count.rb
│ ├── 20191103204624_add_done_count_to_document.rb
│ ├── 20191119235655_create_audits.rb
│ ├── 20191119235922_add_enable_audit_to_project.rb
│ ├── 20191123035908_add_requests_to_audit.rb
│ ├── 20191214135432_add_collaborate_round_to_project.rb
│ ├── 20191214143443_add_rounds_to_project.rb
│ ├── 20200220023849_add_curatable_count_to_document.rb
│ ├── 20200405053933_add_infons_to_document.rb
│ ├── 20200427162815_add_project_id_to_annotation.rb
│ ├── 20210410090218_use_longer_xml.rb
│ └── 20221112134136_change_did_to_big_int.rb
├── schema.rb
└── seeds.rb
├── docker-entrypoint.sh
├── lib
├── assets
│ └── .keep
└── tasks
│ └── .keep
├── log
└── .keep
├── package.json
├── public
├── 404.html
├── 422.html
├── 500.html
├── android-chrome-192x192.png
├── android-chrome-512x512.png
├── apple-touch-icon-precomposed.png
├── apple-touch-icon.png
├── favicon-16x16.png
├── favicon-32x32.png
├── favicon.ico
├── robots.txt
├── sample_lexicon.tsv
├── sample_test.xml
├── sample_training.xml
├── samples
│ ├── 11773052_v0.xml
│ ├── 18093912_v0.xml
│ ├── 3757249_v0.xml
│ └── korean_sample.txt
├── site.webmanifest
└── sitemap.xml.gz
├── scripts
├── README.md
├── apikey
└── pubqrator.rb
├── tmp
└── .keep
└── vendor
├── .keep
└── assets
└── bower_components
├── date-fns
├── .babelrc
├── .bower.json
├── .editorconfig
├── .flowconfig
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── benchmark.js
├── dist
│ ├── date_fns.js
│ ├── date_fns.js.map
│ ├── date_fns.min.js
│ ├── date_fns.min.js.map
│ └── date_fns_docs.json
├── flow-typed
│ ├── benchmark.js.flow
│ ├── mocha.js.flow
│ ├── power-assert.js.flow
│ └── sinon.js.flow
├── testWithoutLocales.js
├── typings.d.ts
└── yarn.lock
├── handlebars
├── .bower.json
├── .gitignore
├── README.md
├── component.json
├── composer.json
├── handlebars-source.gemspec
├── handlebars.amd.js
├── handlebars.amd.min.js
├── handlebars.js
├── handlebars.js.nuspec
├── handlebars.min.js
├── handlebars.runtime.amd.js
├── handlebars.runtime.amd.min.js
├── handlebars.runtime.js
├── handlebars.runtime.min.js
├── lib
│ └── handlebars
│ │ └── source.rb
└── package.json
└── moment
├── .bower.json
├── CHANGELOG.md
├── LICENSE
├── README.md
├── locale
├── af.js
├── ar-dz.js
├── ar-kw.js
├── ar-ly.js
├── ar-ma.js
├── ar-sa.js
├── ar-tn.js
├── ar.js
├── az.js
├── be.js
├── bg.js
├── bm.js
├── bn.js
├── bo.js
├── br.js
├── bs.js
├── ca.js
├── cs.js
├── cv.js
├── cy.js
├── da.js
├── de-at.js
├── de-ch.js
├── de.js
├── dv.js
├── el.js
├── en-SG.js
├── en-au.js
├── en-ca.js
├── en-gb.js
├── en-ie.js
├── en-il.js
├── en-nz.js
├── eo.js
├── es-do.js
├── es-us.js
├── es.js
├── et.js
├── eu.js
├── fa.js
├── fi.js
├── fo.js
├── fr-ca.js
├── fr-ch.js
├── fr.js
├── fy.js
├── ga.js
├── gd.js
├── gl.js
├── gom-latn.js
├── gu.js
├── he.js
├── hi.js
├── hr.js
├── hu.js
├── hy-am.js
├── id.js
├── is.js
├── it-ch.js
├── it.js
├── ja.js
├── jv.js
├── ka.js
├── kk.js
├── km.js
├── kn.js
├── ko.js
├── ku.js
├── ky.js
├── lb.js
├── lo.js
├── lt.js
├── lv.js
├── me.js
├── mi.js
├── mk.js
├── ml.js
├── mn.js
├── mr.js
├── ms-my.js
├── ms.js
├── mt.js
├── my.js
├── nb.js
├── ne.js
├── nl-be.js
├── nl.js
├── nn.js
├── pa-in.js
├── pl.js
├── pt-br.js
├── pt.js
├── ro.js
├── ru.js
├── sd.js
├── se.js
├── si.js
├── sk.js
├── sl.js
├── sq.js
├── sr-cyrl.js
├── sr.js
├── ss.js
├── sv.js
├── sw.js
├── ta.js
├── te.js
├── tet.js
├── tg.js
├── th.js
├── tl-ph.js
├── tlh.js
├── tr.js
├── tzl.js
├── tzm-latn.js
├── tzm.js
├── ug-cn.js
├── uk.js
├── ur.js
├── uz-latn.js
├── uz.js
├── vi.js
├── x-pseudo.js
├── yo.js
├── zh-cn.js
├── zh-hk.js
└── zh-tw.js
├── min
├── locales.js
├── locales.min.js
├── moment-with-locales.js
├── moment-with-locales.min.js
└── moment.min.js
├── moment.d.ts
├── moment.js
├── package-lock.json
├── src
├── lib
│ ├── create
│ │ ├── check-overflow.js
│ │ ├── date-from-array.js
│ │ ├── from-anything.js
│ │ ├── from-array.js
│ │ ├── from-object.js
│ │ ├── from-string-and-array.js
│ │ ├── from-string-and-format.js
│ │ ├── from-string.js
│ │ ├── local.js
│ │ ├── parsing-flags.js
│ │ ├── utc.js
│ │ └── valid.js
│ ├── duration
│ │ ├── abs.js
│ │ ├── add-subtract.js
│ │ ├── as.js
│ │ ├── bubble.js
│ │ ├── clone.js
│ │ ├── constructor.js
│ │ ├── create.js
│ │ ├── duration.js
│ │ ├── get.js
│ │ ├── humanize.js
│ │ ├── iso-string.js
│ │ ├── prototype.js
│ │ └── valid.js
│ ├── format
│ │ └── format.js
│ ├── locale
│ │ ├── base-config.js
│ │ ├── calendar.js
│ │ ├── constructor.js
│ │ ├── en.js
│ │ ├── formats.js
│ │ ├── invalid.js
│ │ ├── lists.js
│ │ ├── locale.js
│ │ ├── locales.js
│ │ ├── ordinal.js
│ │ ├── pre-post-format.js
│ │ ├── prototype.js
│ │ ├── relative.js
│ │ └── set.js
│ ├── moment
│ │ ├── add-subtract.js
│ │ ├── calendar.js
│ │ ├── clone.js
│ │ ├── compare.js
│ │ ├── constructor.js
│ │ ├── creation-data.js
│ │ ├── diff.js
│ │ ├── format.js
│ │ ├── from.js
│ │ ├── get-set.js
│ │ ├── locale.js
│ │ ├── min-max.js
│ │ ├── moment.js
│ │ ├── now.js
│ │ ├── prototype.js
│ │ ├── start-end-of.js
│ │ ├── to-type.js
│ │ ├── to.js
│ │ └── valid.js
│ ├── parse
│ │ ├── regex.js
│ │ └── token.js
│ ├── units
│ │ ├── aliases.js
│ │ ├── constants.js
│ │ ├── day-of-month.js
│ │ ├── day-of-week.js
│ │ ├── day-of-year.js
│ │ ├── hour.js
│ │ ├── millisecond.js
│ │ ├── minute.js
│ │ ├── month.js
│ │ ├── offset.js
│ │ ├── priorities.js
│ │ ├── quarter.js
│ │ ├── second.js
│ │ ├── timestamp.js
│ │ ├── timezone.js
│ │ ├── units.js
│ │ ├── week-calendar-utils.js
│ │ ├── week-year.js
│ │ ├── week.js
│ │ └── year.js
│ └── utils
│ │ ├── abs-ceil.js
│ │ ├── abs-floor.js
│ │ ├── abs-round.js
│ │ ├── compare-arrays.js
│ │ ├── defaults.js
│ │ ├── deprecate.js
│ │ ├── extend.js
│ │ ├── has-own-prop.js
│ │ ├── hooks.js
│ │ ├── index-of.js
│ │ ├── is-array.js
│ │ ├── is-date.js
│ │ ├── is-function.js
│ │ ├── is-number.js
│ │ ├── is-object-empty.js
│ │ ├── is-object.js
│ │ ├── is-undefined.js
│ │ ├── keys.js
│ │ ├── map.js
│ │ ├── mod.js
│ │ ├── some.js
│ │ ├── to-int.js
│ │ └── zero-fill.js
├── locale
│ ├── af.js
│ ├── ar-dz.js
│ ├── ar-kw.js
│ ├── ar-ly.js
│ ├── ar-ma.js
│ ├── ar-sa.js
│ ├── ar-tn.js
│ ├── ar.js
│ ├── az.js
│ ├── be.js
│ ├── bg.js
│ ├── bm.js
│ ├── bn.js
│ ├── bo.js
│ ├── br.js
│ ├── bs.js
│ ├── ca.js
│ ├── cs.js
│ ├── cv.js
│ ├── cy.js
│ ├── da.js
│ ├── de-at.js
│ ├── de-ch.js
│ ├── de.js
│ ├── dv.js
│ ├── el.js
│ ├── en-SG.js
│ ├── en-au.js
│ ├── en-ca.js
│ ├── en-gb.js
│ ├── en-ie.js
│ ├── en-il.js
│ ├── en-nz.js
│ ├── eo.js
│ ├── es-do.js
│ ├── es-us.js
│ ├── es.js
│ ├── et.js
│ ├── eu.js
│ ├── fa.js
│ ├── fi.js
│ ├── fo.js
│ ├── fr-ca.js
│ ├── fr-ch.js
│ ├── fr.js
│ ├── fy.js
│ ├── ga.js
│ ├── gd.js
│ ├── gl.js
│ ├── gom-latn.js
│ ├── gu.js
│ ├── he.js
│ ├── hi.js
│ ├── hr.js
│ ├── hu.js
│ ├── hy-am.js
│ ├── id.js
│ ├── is.js
│ ├── it-ch.js
│ ├── it.js
│ ├── ja.js
│ ├── jv.js
│ ├── ka.js
│ ├── kk.js
│ ├── km.js
│ ├── kn.js
│ ├── ko.js
│ ├── ku.js
│ ├── ky.js
│ ├── lb.js
│ ├── lo.js
│ ├── lt.js
│ ├── lv.js
│ ├── me.js
│ ├── mi.js
│ ├── mk.js
│ ├── ml.js
│ ├── mn.js
│ ├── mr.js
│ ├── ms-my.js
│ ├── ms.js
│ ├── mt.js
│ ├── my.js
│ ├── nb.js
│ ├── ne.js
│ ├── nl-be.js
│ ├── nl.js
│ ├── nn.js
│ ├── pa-in.js
│ ├── pl.js
│ ├── pt-br.js
│ ├── pt.js
│ ├── ro.js
│ ├── ru.js
│ ├── sd.js
│ ├── se.js
│ ├── si.js
│ ├── sk.js
│ ├── sl.js
│ ├── sq.js
│ ├── sr-cyrl.js
│ ├── sr.js
│ ├── ss.js
│ ├── sv.js
│ ├── sw.js
│ ├── ta.js
│ ├── te.js
│ ├── tet.js
│ ├── tg.js
│ ├── th.js
│ ├── tl-ph.js
│ ├── tlh.js
│ ├── tr.js
│ ├── tzl.js
│ ├── tzm-latn.js
│ ├── tzm.js
│ ├── ug-cn.js
│ ├── uk.js
│ ├── ur.js
│ ├── uz-latn.js
│ ├── uz.js
│ ├── vi.js
│ ├── x-pseudo.js
│ ├── yo.js
│ ├── zh-cn.js
│ ├── zh-hk.js
│ └── zh-tw.js
└── moment.js
└── templates
├── default.js
├── locale-header.js
└── test-header.js
/.firebaserc:
--------------------------------------------------------------------------------
1 | {
2 | "projects": {
3 | "default": "pubqrator-384dd"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/.ruby-version:
--------------------------------------------------------------------------------
1 | 2.5.5
2 |
--------------------------------------------------------------------------------
/Capfile:
--------------------------------------------------------------------------------
1 | # Load DSL and set up stages
2 | require "capistrano/setup"
3 |
4 | # Include default deployment tasks
5 | require "capistrano/deploy"
6 |
7 | # Load the SCM plugin appropriate to your project:
8 | #
9 | # require "capistrano/scm/hg"
10 | # install_plugin Capistrano::SCM::Hg
11 | # or
12 | # require "capistrano/scm/svn"
13 | # install_plugin Capistrano::SCM::Svn
14 | # or
15 | require "capistrano/scm/git"
16 | install_plugin Capistrano::SCM::Git
17 |
18 | # Include tasks from other gems included in your Gemfile
19 | #
20 | # For documentation on these, see for example:
21 | #
22 | # https://github.com/capistrano/rvm
23 | # https://github.com/capistrano/rbenv
24 | # https://github.com/capistrano/chruby
25 | # https://github.com/capistrano/bundler
26 | # https://github.com/capistrano/rails
27 | # https://github.com/capistrano/passenger
28 | #
29 | # require "capistrano/rvm"
30 | require "capistrano/rbenv"
31 | # require "capistrano/chruby"
32 | require "capistrano/bundler"
33 | require "capistrano/rails/assets"
34 | require "capistrano/rails/migrations"
35 | # require "capistrano/passenger"
36 |
37 | # Load DSL and Setup Up Stages
38 | require 'capistrano/rails'
39 | # require 'capistrano/rvm'
40 | require 'capistrano/puma'
41 | install_plugin Capistrano::Puma
42 |
43 | # Load custom tasks from `lib/capistrano/tasks` if you have any defined
44 | Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
45 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ruby:2.5.5
2 |
3 | ENV DEBIAN_FRONTEND noninteractive
4 |
5 | RUN apt-get update && \
6 | apt-get install -y --no-install-recommends wait-for-it mariadb-client libmariadb-dev nodejs\
7 | graphicsmagick poppler-utils poppler-data ghostscript \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | RUN mkdir -p /app
11 | WORKDIR /app
12 | COPY Gemfile /app/Gemfile
13 | COPY Gemfile.lock /app/Gemfile.lock
14 | RUN gem install bundler
15 | RUN bundle install
16 | COPY . /app
17 |
18 | RUN rm config/credentials.yml.enc
19 | COPY config/master.key.sample config/master.key
20 | COPY config/credentials.yml.enc.sample config/credentials.yml.enc
21 | COPY config/database.yml.docker config/database.yml
22 |
23 | COPY docker-entrypoint.sh /usr/local/bin/entrypoint.sh
24 | RUN chmod +x /usr/local/bin/entrypoint.sh
25 | RUN chmod +x docker-entrypoint.sh
26 | RUN ln -s usr/local/bin/entrypoint.sh /entrypoint.sh # backwards compat
27 |
28 | ENTRYPOINT ["entrypoint.sh"]
29 | EXPOSE 3000
30 | # Start the main process.
31 | CMD ["rails", "server", "-b", "0.0.0.0"]
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Dongseop Kwon
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require_relative 'config/application'
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_directory ../javascripts .js
3 | //= link_directory ../stylesheets .css
4 |
--------------------------------------------------------------------------------
/app/assets/images/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/.keep
--------------------------------------------------------------------------------
/app/assets/images/bacteria.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/bacteria.png
--------------------------------------------------------------------------------
/app/assets/images/big_overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/big_overview.png
--------------------------------------------------------------------------------
/app/assets/images/brain.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/brain.jpg
--------------------------------------------------------------------------------
/app/assets/images/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/demo.gif
--------------------------------------------------------------------------------
/app/assets/images/dna-wide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/dna-wide.png
--------------------------------------------------------------------------------
/app/assets/images/dna-wide.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/dna-wide.webp
--------------------------------------------------------------------------------
/app/assets/images/dna.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/dna.jpg
--------------------------------------------------------------------------------
/app/assets/images/img_colormap.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/img_colormap.gif
--------------------------------------------------------------------------------
/app/assets/images/lightbox/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/lightbox/close.png
--------------------------------------------------------------------------------
/app/assets/images/lightbox/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/lightbox/loading.gif
--------------------------------------------------------------------------------
/app/assets/images/lightbox/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/lightbox/next.png
--------------------------------------------------------------------------------
/app/assets/images/lightbox/prev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/lightbox/prev.png
--------------------------------------------------------------------------------
/app/assets/images/micro.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/micro.jpg
--------------------------------------------------------------------------------
/app/assets/images/overview.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/overview.jpg
--------------------------------------------------------------------------------
/app/assets/images/overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/overview.png
--------------------------------------------------------------------------------
/app/assets/images/overview.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/overview.webp
--------------------------------------------------------------------------------
/app/assets/images/screenshot01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/screenshot01.png
--------------------------------------------------------------------------------
/app/assets/images/screenshot02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/screenshot02.png
--------------------------------------------------------------------------------
/app/assets/images/screenshot03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/screenshot03.png
--------------------------------------------------------------------------------
/app/assets/images/screenshot04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/screenshot04.png
--------------------------------------------------------------------------------
/app/assets/images/screenshot05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/screenshot05.png
--------------------------------------------------------------------------------
/app/assets/images/screenshot06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/screenshot06.png
--------------------------------------------------------------------------------
/app/assets/images/screenshot07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/screenshot07.png
--------------------------------------------------------------------------------
/app/assets/images/sm_screenshot01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/sm_screenshot01.png
--------------------------------------------------------------------------------
/app/assets/images/sm_screenshot02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/sm_screenshot02.png
--------------------------------------------------------------------------------
/app/assets/images/sm_screenshot03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/sm_screenshot03.png
--------------------------------------------------------------------------------
/app/assets/images/sm_screenshot04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/sm_screenshot04.png
--------------------------------------------------------------------------------
/app/assets/images/sm_screenshot05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/sm_screenshot05.png
--------------------------------------------------------------------------------
/app/assets/images/sm_screenshot06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/sm_screenshot06.png
--------------------------------------------------------------------------------
/app/assets/images/sm_screenshot07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/sm_screenshot07.png
--------------------------------------------------------------------------------
/app/assets/images/virus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/images/virus.jpg
--------------------------------------------------------------------------------
/app/assets/javascripts/annotations.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/api_keys.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | jQuery(function() {
4 | return $('#api_key_user_email').autocomplete({
5 | source: function( request, response ) {
6 | $.ajax({
7 | dataType: "json",
8 | type : 'Get',
9 | url: $('#api_key_user_email').data('autocomplete-source'),
10 | data: request,
11 | success: function(data) {
12 | response( $.map( data, function(item) {
13 | return item.email;
14 | }));
15 | },
16 | error: function(data) {
17 | response([]);
18 | }
19 | });
20 | },
21 | messages: {
22 | noResults: '',
23 | results: function() {}
24 | },
25 | minLength: 3,
26 |
27 | });
28 | });
--------------------------------------------------------------------------------
/app/assets/javascripts/assigns.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/audits.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/cable.js:
--------------------------------------------------------------------------------
1 | // Action Cable provides the framework to deal with WebSockets in Rails.
2 | // You can generate new channels where WebSocket features live using the `rails generate channel` command.
3 | //
4 | //= require action_cable
5 | //= require_self
6 | //= require_tree ./channels
7 |
8 | (function() {
9 | this.App || (this.App = {});
10 |
11 | App.cable = ActionCable.createConsumer();
12 |
13 | }).call(this);
14 |
--------------------------------------------------------------------------------
/app/assets/javascripts/channels/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/assets/javascripts/channels/.keep
--------------------------------------------------------------------------------
/app/assets/javascripts/entity_types.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/home.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/lexicon_groups.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/lexicons.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/models.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/project_users.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/relation_types.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/relations.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/statistics.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/javascripts/tasks.js:
--------------------------------------------------------------------------------
1 | // Place all the behaviors and hooks related to the matching controller here.
2 | // All this logic will automatically be available in application.js.
3 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/api_keys.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the api_keys controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/audits.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the audits controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
5 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/colors.scss:
--------------------------------------------------------------------------------
1 | $red: #db2828;
2 | $orange: #f2711c;
3 | $yellow: #fbbd08;
4 | $olive: #b5cc18;
5 | $greeen: #21ba45;
6 | $teal: #00b5ad;
7 | $purple: #a333c8;
8 | $blue: #2185d0;
9 | $violet: #6435c9;
10 | $pink: #e03997;
11 | $brown: #a5673f;
12 | $grey: #767676;
13 | $black: #1b1c1d;
14 | $link-color: #DC1644;
--------------------------------------------------------------------------------
/app/assets/stylesheets/entity_types.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the entity_types controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/home.scss.erb:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the home controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 | .hero {
5 | width: 100wh;
6 | height: 300px;
7 | color: #fff;
8 | background: linear-gradient(-45deg, #EE7752, #E73C7E, #23A6D5, #23D5AB);
9 | padding: 6em 0 0 0;
10 | color: white;
11 | margin-bottom: 0px;
12 | div.ui.header {
13 | // width: 690px;
14 | margin: 0 auto;
15 | color: #fff;
16 | font-family: 'Exo 2', sans-serif;
17 | font-display: auto;
18 | line-height: 200%;
19 | font-weight: normal;
20 | font-size: 40px;
21 | text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
22 | span {
23 | color: gold;
24 | font-size: 1.3em;
25 | }
26 | span.tag {
27 | color: #f0f6a1;
28 | }
29 | .sub.header {
30 | font-family: 'Raleway', sans-serif;
31 | font-display: auto;
32 | font-size: 0.625em;
33 | color: rgba(255, 255, 255, 0.8);
34 | }
35 | }
36 | }
37 |
38 | .home-desc {
39 | h3 {
40 | font-family: 'Raleway', sans-serif;
41 | font-display: auto;
42 | font-size: 1.5em;
43 | margin-top: 0.5em;
44 | margin-bottom: 0.5em;
45 | }
46 | .row {
47 | margin-bottom: 2em;
48 | }
49 | }
50 |
51 | .ui.header.blue {
52 | }
--------------------------------------------------------------------------------
/app/assets/stylesheets/lexicon_groups.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the lexicon_groups controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/lexicons.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the lexicons controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/models.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the models controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/project_users.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the project_users controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
5 | .name-auto-complete {
6 | width: 30em;
7 | margin-right: 1em;
8 | display: inline-flex;
9 |
10 | .ui.input {
11 | flex: 1;
12 | }
13 | }
--------------------------------------------------------------------------------
/app/assets/stylesheets/projects.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the collections controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
5 |
6 | .footnote {
7 | padding-left: 1.5em;
8 | color: #668;
9 | b {
10 | color: #666;
11 | }
12 | }
13 |
14 | .topnote {
15 | margin-top: 1em;
16 | color: #668;
17 | b {
18 | color: #666;
19 | }
20 | }
21 |
22 | .ui.header i.icon.project-locked-icon {
23 | display: inline-block;
24 | font-size: 1.1rem;
25 | color: silver;
26 | vertical-align: text-top;
27 | }
--------------------------------------------------------------------------------
/app/assets/stylesheets/relation_types.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the relation_types controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/statistics.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the statistics controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/tasks.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the tasks controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/channels/application_cable/channel.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Channel < ActionCable::Channel::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/channels/application_cable/connection.rb:
--------------------------------------------------------------------------------
1 | module ApplicationCable
2 | class Connection < ActionCable::Connection::Base
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/controllers/concerns/.keep
--------------------------------------------------------------------------------
/app/controllers/home_controller.rb:
--------------------------------------------------------------------------------
1 | class HomeController < ApplicationController
2 | def index
3 | @top_menu = "home"
4 | end
5 |
6 | def sitemap
7 | end
8 |
9 | def about
10 | @top_menu = "about"
11 | end
12 | def proxy
13 | url = params[:url]
14 | response = HTTParty.get(url)
15 | render plain: response
16 | end
17 |
18 | def stat
19 | @project_count = Project.execute_sql("SELECT count(*) as cnt FROM projects").first[0]
20 | @document_count = Document.execute_sql("SELECT count(*) as cnt FROM documents").first[0]
21 | @user_count = User.execute_sql("SELECT count(*) as cnt FROM users").first[0]
22 | @task_count = Task.execute_sql("SELECT count(*) as cnt FROM tasks").first[0]
23 | @assign_count = Assign.execute_sql("SELECT count(*) as cnt FROM assigns").first[0]
24 | @round_count = Assign.execute_sql("SELECT SUM(round) FROM projects").first[0]
25 | @annotation_count = Annotation.execute_sql("SELECT count(*) as cnt FROM annotations").first[0]
26 | @owner_count = Annotation.execute_sql("SELECT count(DISTINCT user_id) as cnt FROM project_users WHERE role=0").first[0]
27 | end
28 | end
29 |
--------------------------------------------------------------------------------
/app/controllers/users/confirmations_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Users::ConfirmationsController < Devise::ConfirmationsController
4 | # GET /resource/confirmation/new
5 | # def new
6 | # super
7 | # end
8 |
9 | # POST /resource/confirmation
10 | # def create
11 | # super
12 | # end
13 |
14 | # GET /resource/confirmation?confirmation_token=abcdef
15 | # def show
16 | # super
17 | # end
18 |
19 | # protected
20 |
21 | # The path used after resending confirmation instructions.
22 | # def after_resending_confirmation_instructions_path_for(resource_name)
23 | # super(resource_name)
24 | # end
25 |
26 | # The path used after confirmation.
27 | # def after_confirmation_path_for(resource_name, resource)
28 | # super(resource_name, resource)
29 | # end
30 | end
31 |
--------------------------------------------------------------------------------
/app/controllers/users/omniauth_callbacks_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
4 | # You should configure your model like this:
5 | # devise :omniauthable, omniauth_providers: [:twitter]
6 |
7 | # You should also create an action method in this controller like this:
8 | # def twitter
9 | # end
10 |
11 | # More info at:
12 | # https://github.com/plataformatec/devise#omniauth
13 |
14 | # GET|POST /resource/auth/twitter
15 | # def passthru
16 | # super
17 | # end
18 |
19 | # GET|POST /users/auth/twitter/callback
20 | # def failure
21 | # super
22 | # end
23 |
24 | # protected
25 |
26 | # The path used when OmniAuth fails
27 | # def after_omniauth_failure_path_for(scope)
28 | # super(scope)
29 | # end
30 |
31 | def google_oauth2
32 | @user = User.from_omniauth(request.env["omniauth.auth"])
33 | if @user.persisted?
34 | sign_in @user, :event => :authentication #this will throw if @user is not activated
35 | set_flash_message(:notice, :success, :kind => "Google") if is_navigational_format?
36 | else
37 | session["devise.google_data"] = request.env["omniauth.auth"]
38 | end
39 | redirect_to '/'
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/app/controllers/users/passwords_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Users::PasswordsController < Devise::PasswordsController
4 |
5 | # GET /resource/password/new
6 | # def new
7 | # super
8 | # end
9 |
10 | # POST /resource/password
11 | # def create
12 | # super
13 | # end
14 |
15 | # GET /resource/password/edit?reset_password_token=abcdef
16 | # def edit
17 | # super
18 | # end
19 |
20 | # PUT /resource/password
21 | # def update
22 | # super
23 | # end
24 |
25 | # protected
26 |
27 | # def after_resetting_password_path_for(resource)
28 | # super(resource)
29 | # end
30 |
31 | # The path used after sending reset password instructions
32 | # def after_sending_reset_password_instructions_path_for(resource_name)
33 | # super(resource_name)
34 | # end
35 | end
36 |
--------------------------------------------------------------------------------
/app/controllers/users/sessions_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Users::SessionsController < Devise::SessionsController
4 | # before_action :configure_sign_in_params, only: [:create]
5 |
6 | # GET /resource/sign_in
7 | # def new
8 | # super
9 | # end
10 |
11 | # POST /resource/sign_in
12 | # def create
13 | # super
14 | # end
15 |
16 | # DELETE /resource/sign_out
17 | # def destroy
18 | # super
19 | # end
20 |
21 | def destroy
22 | super
23 | cookies.delete :teamtat
24 | end
25 |
26 | # protected
27 |
28 | # If you have extra params to permit, append them to the sanitizer.
29 | # def configure_sign_in_params
30 | # devise_parameter_sanitizer.permit(:sign_in, keys: [:attribute])
31 | # end
32 | end
33 |
--------------------------------------------------------------------------------
/app/controllers/users/unlocks_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Users::UnlocksController < Devise::UnlocksController
4 | # GET /resource/unlock/new
5 | # def new
6 | # super
7 | # end
8 |
9 | # POST /resource/unlock
10 | # def create
11 | # super
12 | # end
13 |
14 | # GET /resource/unlock?unlock_token=abcdef
15 | # def show
16 | # super
17 | # end
18 |
19 | # protected
20 |
21 | # The path used after sending unlock password instructions
22 | # def after_sending_unlock_instructions_path_for(resource)
23 | # super(resource)
24 | # end
25 |
26 | # The path used after unlocking the resource
27 | # def after_unlock_path_for(resource)
28 | # super(resource)
29 | # end
30 | end
31 |
--------------------------------------------------------------------------------
/app/helpers/annotations_helper.rb:
--------------------------------------------------------------------------------
1 | module AnnotationsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/api_keys_helper.rb:
--------------------------------------------------------------------------------
1 | module ApiKeysHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | def sortable(column, title = nil)
3 | title ||= column.titleize
4 | css_class = column == sort_column ? "current #{sort_direction}" : nil
5 | direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc"
6 |
7 | if column == sort_column
8 | if sort_direction == "asc"
9 | title = "#{title} "
10 | else
11 | title = "#{title} "
12 | end
13 | else
14 | title = "#{title} "
15 | end
16 | link_to title.html_safe, {:sort => column, :direction => direction}, {:class => css_class}
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/app/helpers/assigns_helper.rb:
--------------------------------------------------------------------------------
1 | module AssignsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/audits_helper.rb:
--------------------------------------------------------------------------------
1 | module AuditsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/devise_helper.rb:
--------------------------------------------------------------------------------
1 | module DeviseHelper
2 | def devise_error_messages!
3 | return "" if !devise_error_messages? && flash[:recaptcha_error].blank?
4 |
5 | messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }
6 | messages << content_tag(:li, flash[:recaptcha_error]) if flash[:recaptcha_error].present?
7 |
8 | sentence = I18n.t("errors.messages.not_saved",
9 | :count => messages.size,
10 | :resource => resource.class.model_name.human.downcase)
11 |
12 | html = <<-HTML
13 |
14 |
15 |
16 | #{messages.join}
17 |
18 |
19 | HTML
20 |
21 | html.html_safe
22 | end
23 |
24 | def devise_error_messages?
25 | !resource.errors.empty?
26 | end
27 |
28 | end
--------------------------------------------------------------------------------
/app/helpers/entity_types_helper.rb:
--------------------------------------------------------------------------------
1 | module EntityTypesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/home_helper.rb:
--------------------------------------------------------------------------------
1 | module HomeHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/lexicon_groups_helper.rb:
--------------------------------------------------------------------------------
1 | module LexiconGroupsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/lexicons_helper.rb:
--------------------------------------------------------------------------------
1 | module LexiconsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/models_helper.rb:
--------------------------------------------------------------------------------
1 | module ModelsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/project_users_helper.rb:
--------------------------------------------------------------------------------
1 | module ProjectUsersHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/projects_helper.rb:
--------------------------------------------------------------------------------
1 | module ProjectsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/relation_types_helper.rb:
--------------------------------------------------------------------------------
1 | module RelationTypesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/relations_helper.rb:
--------------------------------------------------------------------------------
1 | module RelationsHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/statistics_helper.rb:
--------------------------------------------------------------------------------
1 | module StatisticsHelper
2 | def stat_percent(val, total)
3 | if total == 0
4 | return 0
5 | else
6 | (val.to_f/total.to_f * 100.0).round(2)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/helpers/tasks_helper.rb:
--------------------------------------------------------------------------------
1 | module TasksHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/jobs/application_job.rb:
--------------------------------------------------------------------------------
1 | class ApplicationJob < ActiveJob::Base
2 | end
3 |
--------------------------------------------------------------------------------
/app/jobs/sentry_job.rb:
--------------------------------------------------------------------------------
1 | # # Job: Raven sends asynchronous events to sentry (deliver_later)
2 | # class SentryJob < ActiveJob::Base
3 | # queue_as :sentry
4 |
5 | # def perform(event)
6 | # Raven.send_event(event)
7 | # end
8 | # end
--------------------------------------------------------------------------------
/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | default from: 'from@teamtat.org'
3 | layout 'mailer'
4 | end
5 |
--------------------------------------------------------------------------------
/app/mailers/user_mailer.rb:
--------------------------------------------------------------------------------
1 | class UserMailer < ApplicationMailer
2 | default from: 'notifications@teamtat.org'
3 |
4 | def project_done
5 | @project = params[:project]
6 | @manager = @project.project_users.where('role = 0').first.user
7 | @url = "https://www.teamtat.org/projects/#{@project.id}"
8 | if @manager.valid_email?
9 | mail(to: @manager.email, subject: "Assignments are done for Project #{@project.name}")
10 | Rails.logger.debug("MAIL TO #{@manager.email} ABOUT #{@project.name}")
11 | end
12 | end
13 |
14 | def session_email(email, user, url)
15 | @user = user
16 | @url = url
17 | mail(to: email, subject: "Session: #{user.session_str}")
18 | end
19 | end
--------------------------------------------------------------------------------
/app/models/api_key.rb:
--------------------------------------------------------------------------------
1 | class ApiKey < ApplicationRecord
2 | belongs_to :user
3 | validates :key, presence: true
4 |
5 | def generate_key
6 | self.key = SecureRandom.urlsafe_base64(32)
7 | end
8 |
9 | def user_email
10 | user.try(:email)
11 | end
12 |
13 | def user_email=(email)
14 | self.user = User.find_by(email: email) if email.present?
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class ApplicationRecord < ActiveRecord::Base
2 | self.abstract_class = true
3 | def self.execute_sql(*sql_array)
4 | connection.execute(send(:sanitize_sql_array, sql_array))
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/audit.rb:
--------------------------------------------------------------------------------
1 | class Audit < ApplicationRecord
2 | belongs_to :user
3 | belongs_to :project
4 | belongs_to :document, optional: true
5 | belongs_to :annotation, optional: true
6 | belongs_to :relation, optional: true
7 | end
8 |
--------------------------------------------------------------------------------
/app/models/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/models/concerns/.keep
--------------------------------------------------------------------------------
/app/models/lexicon.rb:
--------------------------------------------------------------------------------
1 | class Lexicon < ApplicationRecord
2 | belongs_to :lexicon_group, counter_cache: true
3 | validates :name, presence: true
4 |
5 | def self.to_csv(lexicons)
6 | lexicons.map do |l|
7 | "#{l.ltype}\t#{l.lexicon_id}\t#{l.name}"
8 | end.join("\n")
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/app/models/lexicon_group.rb:
--------------------------------------------------------------------------------
1 | class LexiconGroup < ApplicationRecord
2 | has_many :lexicons, dependent: :destroy
3 | has_many :tasks, dependent: :nullify
4 | validates :name, presence: true
5 | belongs_to :project, counter_cache: true
6 |
7 | def option_item
8 | ["#{self.name} (#{self.lexicons_count} items)", self.id]
9 | end
10 |
11 | def self.load_samples(project)
12 | LexiconGroup.transaction do
13 | lg = project.lexicon_groups.create!({name: 'Sample Lexicon', key: 'samples'})
14 | File.open(Rails.root.join("public", "sample_lexicon.tsv"), "r") do |f|
15 | lg.upload_lexicon(f)
16 | end
17 | end
18 | end
19 |
20 | def upload_lexicon(file)
21 | LexiconGroup.transaction do
22 | self.lexicons.delete_all
23 | arr = []
24 | TSV.parse(file.read).without_header.map do |row|
25 | # logger.debug(row.inspect)
26 | line = "(#{row[0].dump}, #{row[1].dump}, #{row[2].dump}, #{self.id}, NOW(), NOW())"
27 | # logger.debug(line)
28 | arr << line
29 | end
30 | sql = "INSERT INTO lexicons(ltype, lexicon_id, name, lexicon_group_id, created_at, updated_at) VALUES " + arr.join(",")
31 | Lexicon.connection.insert(sql)
32 | count = Lexicon.where(lexicon_group_id: self.id).count()
33 | logger.debug(count)
34 | ActiveRecord::Base.connection.execute("UPDATE lexicon_groups SET lexicons_count = #{count} WHERE id = #{self.id}")
35 | end
36 | end
37 | end
38 |
--------------------------------------------------------------------------------
/app/models/model.rb:
--------------------------------------------------------------------------------
1 | class Model < ApplicationRecord
2 | belongs_to :project, counter_cache: true
3 | validates :name, presence: true
4 | has_many :task, dependent: :nullify
5 |
6 | def option_item
7 | ["[User] #{self.name} (created at #{self.created_at})", self.id]
8 | end
9 |
10 | def model_url
11 | "https://www.ncbi.nlm.nih.gov/CBBresearch/Lu/Demo/RESTful/eztag.cgi/ezTag_P#{'%016X' % self.project.id}_#{self.url}"
12 | end
13 | def status
14 | if self.url.blank?
15 | "Processing"
16 | else
17 | "Done"
18 | end
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/app/models/node.rb:
--------------------------------------------------------------------------------
1 | class Node < ApplicationRecord
2 | belongs_to :relation
3 | belongs_to :document
4 | end
5 |
--------------------------------------------------------------------------------
/app/models/project_user.rb:
--------------------------------------------------------------------------------
1 | class ProjectUser < ApplicationRecord
2 | belongs_to :project, counter_cache: true
3 | belongs_to :user
4 | has_many :assigns, dependent: :destroy
5 | enum role: [:project_manager, :annotator]
6 | enum status: [:prepare, :annotate, :review]
7 | end
8 |
--------------------------------------------------------------------------------
/app/models/task.rb:
--------------------------------------------------------------------------------
1 | class Task < ApplicationRecord
2 | belongs_to :project, counter_cache: true
3 | belongs_to :lexicon_group, optional: true
4 | belongs_to :model, optional: true
5 |
6 | TYPES = [
7 | 'Annotate with Lexicon',
8 | 'Train on Annotated Text',
9 | 'Annotate with Model'
10 | ]
11 |
12 | PRE_TRAINED_MODELS = ['Chemical', 'Disease']
13 | STATUS = ['requested', 'processing', 'success', 'error', 'canceled']
14 | def desc
15 |
16 | end
17 |
18 | def title
19 | TYPES[self.task_type]
20 | end
21 |
22 | def busy?
23 | self.status == 'requested' || self.status == 'processing'
24 | end
25 |
26 | def status_with_icon
27 | if self.busy?
28 | " #{self.status.capitalize}".html_safe
29 | else
30 | " #{self.status.capitalize}".html_safe
31 | end
32 | end
33 |
34 | def can_cancel?
35 | self.status == "requested"
36 | end
37 |
38 | def type_cls
39 | if self.task_type == 1
40 | "train"
41 | else
42 | "annotate"
43 | end
44 | end
45 | end
46 |
--------------------------------------------------------------------------------
/app/models/upload_batch.rb:
--------------------------------------------------------------------------------
1 | class UploadBatch < ApplicationRecord
2 | end
3 |
--------------------------------------------------------------------------------
/app/views/annotations/_annotation.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.id annotation.a_id
2 | json.type annotation.a_type
3 | json.concept annotation.concept
4 | json.offset annotation.offset
5 | json.text annotation.content
6 | json.passage annotation.passage
7 | json.note annotation.note
8 | json.annotator annotation.annotator
9 | json.updated_at annotation.updated_at.utc.iso8601
10 | json.user_id annotation.user_id
11 | json.annotation_id annotation.id
12 | json.review_result annotation.review_result
13 |
--------------------------------------------------------------------------------
/app/views/annotations/edit.html.erb:
--------------------------------------------------------------------------------
1 | Editing Annotation
2 |
3 | <%= render 'form', annotation: @annotation %>
4 |
5 | <%= link_to 'Show', @annotation %> |
6 | <%= link_to 'Back', annotations_path %>
7 |
--------------------------------------------------------------------------------
/app/views/annotations/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 | Annotations
4 |
5 |
6 |
7 |
8 | ID
9 | Type
10 | Concept
11 | Annotator
12 | Text
13 | Note
14 | Offset
15 | Passage
16 |
17 |
18 |
19 |
20 | <% @annotations.each do |annotation| %>
21 |
22 | <%= annotation.a_id %>
23 | <%= annotation.a_type %>
24 | <%= annotation.concept %>
25 | <%= annotation.annotator %>
26 | <%= annotation.content %>
27 | <%= annotation.note %>
28 | <%= annotation.offset %>
29 | <%= annotation.passage %>
30 |
31 | <% end %>
32 |
33 |
34 |
35 |
36 |
37 | <%= link_to 'New Annotation', new_annotation_path %>
38 |
--------------------------------------------------------------------------------
/app/views/annotations/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @annotations, partial: "annotations/annotation", as: :annotation
2 |
--------------------------------------------------------------------------------
/app/views/annotations/new.html.erb:
--------------------------------------------------------------------------------
1 | New Annotation
2 |
3 | <%= render 'form', annotation: @annotation %>
4 |
5 | <%= link_to 'Back', annotations_path %>
6 |
--------------------------------------------------------------------------------
/app/views/annotations/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | A:
5 | <%= @annotation.a_id %>
6 |
7 |
8 |
9 | A type:
10 | <%= @annotation.a_type %>
11 |
12 |
13 |
14 | Concept:
15 | <%= @annotation.concept %>
16 |
17 |
18 |
19 | User:
20 | <%= @annotation.user %>
21 |
22 |
23 |
24 | Content:
25 | <%= @annotation.content %>
26 |
27 |
28 |
29 | Note:
30 | <%= @annotation.note %>
31 |
32 |
33 |
34 | Offset:
35 | <%= @annotation.offset %>
36 |
37 |
38 |
39 | Passage:
40 | <%= @annotation.passage %>
41 |
42 |
43 |
44 | Assign:
45 | <%= @annotation.assign %>
46 |
47 |
48 |
49 | Source:
50 | <%= @annotation.source %>
51 |
52 |
53 | <%= link_to 'Edit', edit_annotation_path(@annotation) %> |
54 | <%= link_to 'Back', annotations_path %>
55 |
--------------------------------------------------------------------------------
/app/views/annotations/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | if !@annotation.nil?
2 | json.annotation do
3 | json.partial! "annotations/annotation", annotation: @annotation
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/api_keys/_api_key.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! api_key, :id, :key, :user_id, :last_access_at, :last_access_ip, :access_cpount, :created_at, :updated_at
2 | json.url api_key_url(api_key, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/api_keys/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for(api_key, html: {class: 'ui form'}) do |f| %>
2 | <% if api_key.errors.any? %>
3 |
4 |
7 |
8 |
9 | <% api_key.errors.full_messages.each do |message| %>
10 | <%= message %>
11 | <% end %>
12 |
13 |
14 | <% end %>
15 |
16 | <%= f.label :user_email %>
17 | <%= f.text_field :user_email, data: { autocomplete_source: users_path} %>
18 |
19 |
20 | <%= f.submit "Create", class: "ui button primary" %>
21 |
22 | <% end %>
23 |
--------------------------------------------------------------------------------
/app/views/api_keys/edit.html.erb:
--------------------------------------------------------------------------------
1 | Editing Api Key
2 |
3 | <%= render 'form', api_key: @api_key %>
4 |
5 | <%= link_to 'Show', @api_key %> |
6 | <%= link_to 'Back', api_keys_path %>
7 |
--------------------------------------------------------------------------------
/app/views/api_keys/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <%=sortable 'key'%>
7 | User
8 | <%=sortable 'created_at'%>
9 | <%=sortable 'last_access_at'%>
10 | <%=sortable 'last_access_ip'%>
11 | <%=sortable 'access_count'%>
12 |
13 |
14 |
15 |
16 |
17 | <% @api_keys.each do |api_key| %>
18 |
19 | <%= api_key.key %>
20 | <%=link_to api_key.user.email, api_key.user %>
21 | <%=time_ago_in_words api_key.created_at %>
22 | <%=time_ago_in_words api_key.last_access_at if api_key.last_access_at.present? %>
23 | <%= api_key.last_access_ip %>
24 | <%= api_key.access_count %>
25 | <%= link_to 'Destroy', api_key, method: :delete, data: { confirm: 'Are you sure?' } %>
26 |
27 | <% end %>
28 |
29 |
30 |
31 |
32 |
33 | <%= link_to 'New Api Key', new_api_key_path, class: "ui button primary" %>
34 |
--------------------------------------------------------------------------------
/app/views/api_keys/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @api_keys, partial: "api_keys/api_key", as: :api_key
2 |
--------------------------------------------------------------------------------
/app/views/api_keys/new.html.erb:
--------------------------------------------------------------------------------
1 | New Api Key
2 |
3 | <%= render 'form', api_key: @api_key %>
4 |
5 | <%= link_to 'Back', api_keys_path %>
6 |
--------------------------------------------------------------------------------
/app/views/api_keys/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | Key:
5 | <%= @api_key.key %>
6 |
7 |
8 |
9 | User:
10 | <%= @api_key.user %>
11 |
12 |
13 |
14 | Last access at:
15 | <%= @api_key.last_access_at %>
16 |
17 |
18 |
19 | Last access ip:
20 | <%= @api_key.last_access_ip %>
21 |
22 |
23 |
24 | Access cpount:
25 | <%= @api_key.access_cpount %>
26 |
27 |
28 | <%= link_to 'Edit', edit_api_key_path(@api_key) %> |
29 | <%= link_to 'Back', api_keys_path %>
30 |
--------------------------------------------------------------------------------
/app/views/api_keys/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "api_keys/api_key", api_key: @api_key
2 |
--------------------------------------------------------------------------------
/app/views/assigns/_assign.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! assign, :id, :project_id, :document, :user_id, :round, :done, :curatable, :created_at, :updated_at
2 | json.url assign_url(assign, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/assigns/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with(model: assign, local: true) do |form| %>
2 | <% if assign.errors.any? %>
3 |
4 |
<%= pluralize(assign.errors.count, "error") %> prohibited this assign from being saved:
5 |
6 |
7 | <% assign.errors.full_messages.each do |message| %>
8 | <%= message %>
9 | <% end %>
10 |
11 |
12 | <% end %>
13 |
14 |
15 | <%= form.label :project_id %>
16 | <%= form.text_field :project_id %>
17 |
18 |
19 |
20 | <%= form.label :document %>
21 | <%= form.text_field :document %>
22 |
23 |
24 |
25 | <%= form.label :user_id %>
26 | <%= form.text_field :user_id %>
27 |
28 |
29 |
30 | <%= form.label :round %>
31 | <%= form.number_field :round %>
32 |
33 |
34 |
35 | <%= form.label :done %>
36 | <%= form.check_box :done %>
37 |
38 |
39 |
40 | <%= form.label :curatable %>
41 | <%= form.check_box :curatable %>
42 |
43 |
44 |
45 | <%= form.submit %>
46 |
47 | <% end %>
48 |
--------------------------------------------------------------------------------
/app/views/assigns/edit.html.erb:
--------------------------------------------------------------------------------
1 | Editing Assign
2 |
3 | <%= render 'form', assign: @assign %>
4 |
5 | <%= link_to 'Show', @assign %> |
6 | <%= link_to 'Back', assigns_path %>
7 |
--------------------------------------------------------------------------------
/app/views/assigns/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @assigns, partial: "assigns/assign", as: :assign
2 |
--------------------------------------------------------------------------------
/app/views/assigns/new.html.erb:
--------------------------------------------------------------------------------
1 | New Assign
2 |
3 | <%= render 'form', assign: @assign %>
4 |
5 | <%= link_to 'Back', assigns_path %>
6 |
--------------------------------------------------------------------------------
/app/views/assigns/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | Project:
5 | <%= @assign.project %>
6 |
7 |
8 |
9 | Document:
10 | <%= @assign.document %>
11 |
12 |
13 |
14 | User:
15 | <%= @assign.user %>
16 |
17 |
18 |
19 | Round:
20 | <%= @assign.round %>
21 |
22 |
23 |
24 | Done:
25 | <%= @assign.done %>
26 |
27 |
28 |
29 | Curatable:
30 | <%= @assign.curatable %>
31 |
32 |
33 | <%= link_to 'Edit', edit_assign_path(@assign) %> |
34 | <%= link_to 'Back', assigns_path %>
35 |
--------------------------------------------------------------------------------
/app/views/assigns/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "assigns/assign", assign: @assign
2 |
--------------------------------------------------------------------------------
/app/views/audits/_audit.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! audit, :id, :user_id, :project_id, :document_id, :annotation_id, :relation_id, :message, :created_at, :updated_at
2 | json.url audit_url(audit, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/audits/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with(model: audit, local: true) do |form| %>
2 | <% if audit.errors.any? %>
3 |
4 |
<%= pluralize(audit.errors.count, "error") %> prohibited this audit from being saved:
5 |
6 |
7 | <% audit.errors.full_messages.each do |message| %>
8 | <%= message %>
9 | <% end %>
10 |
11 |
12 | <% end %>
13 |
14 |
15 | <%= form.label :user_id %>
16 | <%= form.text_field :user_id %>
17 |
18 |
19 |
20 | <%= form.label :project_id %>
21 | <%= form.text_field :project_id %>
22 |
23 |
24 |
25 | <%= form.label :document_id %>
26 | <%= form.text_field :document_id %>
27 |
28 |
29 |
30 | <%= form.label :annotation_id %>
31 | <%= form.text_field :annotation_id %>
32 |
33 |
34 |
35 | <%= form.label :relation_id %>
36 | <%= form.text_field :relation_id %>
37 |
38 |
39 |
40 | <%= form.label :message %>
41 | <%= form.text_field :message %>
42 |
43 |
44 |
45 | <%= form.submit %>
46 |
47 | <% end %>
48 |
--------------------------------------------------------------------------------
/app/views/audits/edit.html.erb:
--------------------------------------------------------------------------------
1 | Editing Audit
2 |
3 | <%= render 'form', audit: @audit %>
4 |
5 | <%= link_to 'Show', @audit %> |
6 | <%= link_to 'Back', audits_path %>
7 |
--------------------------------------------------------------------------------
/app/views/audits/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @audits, partial: "audits/audit", as: :audit
2 |
--------------------------------------------------------------------------------
/app/views/audits/new.html.erb:
--------------------------------------------------------------------------------
1 | New Audit
2 |
3 | <%= render 'form', audit: @audit %>
4 |
5 | <%= link_to 'Back', audits_path %>
6 |
--------------------------------------------------------------------------------
/app/views/audits/show.html.erb:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | <%= notice %>
7 |
8 |
9 | User:
10 | <%=image_tag(@audit.user.image_or_default, class: "ui avatar image", title: @audit.user.email_or_session_tail) %>
11 | <%= @audit.user.name_or_email_or_id %>
12 |
13 |
14 |
15 | Document:
16 | <%=link_to "[#{@audit.document.did}] #{@audit.document.title}", @audit.document %>
17 |
18 |
19 |
20 | Message:
21 | <%= @audit.message %>
22 |
23 |
24 |
25 | Request:
26 |
27 | <%= JSON.pretty_generate(JSON.parse(@audit.request)) %>
28 |
29 |
30 |
31 |
32 | Result:
33 |
34 | <%= JSON.pretty_generate(JSON.parse(@audit.result)) %>
35 |
36 |
37 |
38 |
39 | Created At:
40 | <%= @audit.created_at.localtime %>
41 |
42 |
43 |
44 |
45 | <%= link_to 'Back', audits_path %>
46 |
--------------------------------------------------------------------------------
/app/views/audits/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "audits/audit", audit: @audit
2 |
--------------------------------------------------------------------------------
/app/views/devise/confirmations/new.html.erb:
--------------------------------------------------------------------------------
1 | Resend confirmation instructions
2 |
3 | <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4 | <%= render "devise/shared/error_messages", resource: resource %>
5 |
6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
9 |
10 |
11 |
12 | <%= f.submit "Resend confirmation instructions" %>
13 |
14 | <% end %>
15 |
16 | <%= render "devise/shared/links" %>
17 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/confirmation_instructions.html.erb:
--------------------------------------------------------------------------------
1 | Welcome <%= @email %>!
2 |
3 | You can confirm your account email through the link below:
4 |
5 | <%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>
6 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/email_changed.html.erb:
--------------------------------------------------------------------------------
1 | Hello <%= @email %>!
2 |
3 | <% if @resource.try(:unconfirmed_email?) %>
4 | We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.
5 | <% else %>
6 | We're contacting you to notify you that your email has been changed to <%= @resource.email %>.
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/password_change.html.erb:
--------------------------------------------------------------------------------
1 | Hello <%= @resource.email %>!
2 |
3 | We're contacting you to notify you that your password has been changed.
4 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/reset_password_instructions.html.erb:
--------------------------------------------------------------------------------
1 | Hello <%= @resource.email %>!
2 |
3 | Someone has requested a link to change your password. You can do this through the link below.
4 |
5 | <%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>
6 |
7 | If you didn't request this, please ignore this email.
8 | Your password won't change until you access the link above and create a new one.
9 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/unlock_instructions.html.erb:
--------------------------------------------------------------------------------
1 | Hello <%= @resource.email %>!
2 |
3 | Your account has been locked due to an excessive number of unsuccessful sign in attempts.
4 |
5 | Click the link below to unlock your account:
6 |
7 | <%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>
8 |
--------------------------------------------------------------------------------
/app/views/devise/passwords/edit.html.erb:
--------------------------------------------------------------------------------
1 | Change your password
2 |
3 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: 'ui form' }) do |f| %>
4 | <%= devise_error_messages! %>
5 | <%= f.hidden_field :reset_password_token %>
6 |
7 |
8 | <%= f.label :password, "New password" %>
9 | <% if @minimum_password_length %>
10 | (<%= @minimum_password_length %> characters minimum)
11 | <% end %>
12 | <%= f.password_field :password, autofocus: true, autocomplete: "off" %>
13 |
14 |
15 |
16 | <%= f.label :password_confirmation, "Confirm new password" %>
17 | <%= f.password_field :password_confirmation, autocomplete: "off" %>
18 |
19 |
20 |
21 | <%= f.submit "Change my password", class: 'ui button primary' %>
22 |
23 | <% end %>
24 |
25 | <%= render "devise/shared/links" %>
26 |
--------------------------------------------------------------------------------
/app/views/devise/passwords/new.html.erb:
--------------------------------------------------------------------------------
1 | Forgot your password?
2 |
3 | <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post , class: "ui form"}) do |f| %>
4 | <%= devise_error_messages! %>
5 |
6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9 |
10 |
11 |
12 | <%= f.submit "Send me reset password instructions", class: "ui button primary" %>
13 |
14 | <% end %>
15 |
16 | <%= render "devise/shared/links" %>
17 |
--------------------------------------------------------------------------------
/app/views/devise/registrations/edit.html.erb:
--------------------------------------------------------------------------------
1 | Edit <%= resource_name.to_s.humanize %>
2 |
3 | <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'ui form' }) do |f| %>
4 | <%= devise_error_messages! %>
5 |
6 |
7 | <%= f.label :name %>
8 | <%= f.text_field :name, autofocus: true, autocomplete: "off" %>
9 |
10 |
11 |
12 | <%= f.label :password, "New password" %>
13 | <% if @minimum_password_length %>
14 | (<%= @minimum_password_length %> characters minimum)
15 | <% end %>
16 | <%= f.password_field :password, autofocus: true, autocomplete: "off" %>
17 |
18 |
19 |
20 | <%= f.label :password_confirmation, "Confirm new password" %>
21 | <%= f.password_field :password_confirmation, autocomplete: "off" %>
22 |
23 |
24 |
25 | <%= f.submit "Update", class: 'ui button primary'%>
26 | <%= link_to 'Show Profile', @user, class: 'ui button' %>
27 |
28 | <% end %>
29 |
30 | Close my account
31 |
32 | <%= button_to "Close", registration_path(resource_name), class: 'ui button red', data: { confirm: "Are you sure?" }, method: :delete %>
33 |
34 | <%#= link_to "Back", :back %>
35 |
--------------------------------------------------------------------------------
/app/views/devise/registrations/new.html.erb:
--------------------------------------------------------------------------------
1 | Sign Up
2 |
3 | <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {class: "ui form"}) do |f| %>
4 | <%= devise_error_messages! %>
5 |
6 | <%= f.label :email %>
7 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
8 |
9 |
10 |
11 | <%= f.label :name %>
12 | <%= f.text_field :name, autofocus: true, autocomplete: "name" %>
13 |
14 |
15 |
16 | <%= f.label :password %>
17 | <% if @minimum_password_length %>
18 | (<%= @minimum_password_length %> characters minimum)
19 | <% end %>
20 | <%= f.password_field :password, autocomplete: "off" %>
21 |
22 |
23 |
24 | <%= f.label :password_confirmation %>
25 | <%= f.password_field :password_confirmation, autocomplete: "off" %>
26 |
27 | <% if Rails.configuration.use_recaptcha %>
28 | <%= flash[:recaptcha_error] %>
29 | <%= recaptcha_tags %>
30 | <% end %>
31 |
32 | <%= f.submit "Sign Up", class: "ui button primary" %>
33 |
34 | <% end %>
35 |
36 | <%= render "devise/shared/links" %>
37 |
--------------------------------------------------------------------------------
/app/views/devise/shared/_error_messages.html.erb:
--------------------------------------------------------------------------------
1 | <% if resource.errors.any? %>
2 |
3 |
4 | <%= I18n.t("errors.messages.not_saved",
5 | count: resource.errors.count,
6 | resource: resource.class.model_name.human.downcase)
7 | %>
8 |
9 |
10 | <% resource.errors.full_messages.each do |message| %>
11 | <%= message %>
12 | <% end %>
13 |
14 |
15 | <% end %>
16 |
--------------------------------------------------------------------------------
/app/views/devise/unlocks/new.html.erb:
--------------------------------------------------------------------------------
1 | Resend unlock instructions
2 |
3 | <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4 | <%= render "devise/shared/error_messages", resource: resource %>
5 |
6 |
7 | <%= f.label :email %>
8 | <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9 |
10 |
11 |
12 | <%= f.submit "Resend unlock instructions" %>
13 |
14 | <% end %>
15 |
16 | <%= render "devise/shared/links" %>
17 |
--------------------------------------------------------------------------------
/app/views/documents/_document.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! document, :id, :project_id, :did, :user_updated_at, :tool_updated_at, :xml, :title, :key, :did_no, :batch_id, :batch_no, :order_no, :created_at, :updated_at
2 | json.url document_url(document, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/documents/_errors_modal.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/documents/_fig.html.erb:
--------------------------------------------------------------------------------
1 | <%
2 | unless @figure_cache.include?(filename)
3 | @figure_cache << filename
4 | %>
5 |
6 |
7 |
8 | <% else %>
9 |
10 | <%=filename %>
11 |
12 | <% end %>
--------------------------------------------------------------------------------
/app/views/documents/_infon.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 | <% infons.each do |key, value| %>
9 |
10 | <%=key %>: <%= value %>
11 |
12 | <% end %>
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/views/documents/_outline.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% nodes.each do |item| %>
3 |
4 | <%=link_to "#passage-#{item[:id]}", class: "item outline-link" do %>
5 | <% if item[:text] == "front" %>
6 | Title
7 | <% elsif item[:text] =="title" %>
8 | <%= item[:description] %>
9 | <% else %>
10 | <%= item[:text].capitalize %>
11 | <% end %>
12 | <% end %>
13 |
14 | <% end %>
15 |
--------------------------------------------------------------------------------
/app/views/documents/edit.html.erb:
--------------------------------------------------------------------------------
1 | Editing Document
2 |
3 | <%= render 'form', document: @document %>
4 |
5 | <%= link_to 'Show', @document %> |
6 | <%= link_to 'Back', documents_path %>
7 |
--------------------------------------------------------------------------------
/app/views/documents/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @documents, partial: "documents/document", as: :document
2 |
--------------------------------------------------------------------------------
/app/views/documents/partial.html.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: "document_main" %>
--------------------------------------------------------------------------------
/app/views/documents/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "documents/document", document: @document
2 |
--------------------------------------------------------------------------------
/app/views/entity_types/_entity_type.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! entity_type, :id, :project_id, :name, :color, :prefix, :created_at, :updated_at
2 | json.url entity_type_url(entity_type, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/entity_types/edit.html.erb:
--------------------------------------------------------------------------------
1 | Editing Entity Type
2 |
3 | <%= render 'form', entity_type: @entity_type %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/entity_types/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @entity_types, partial: "entity_types/entity_type", as: :entity_type
2 |
--------------------------------------------------------------------------------
/app/views/entity_types/new.html.erb:
--------------------------------------------------------------------------------
1 | New Entity Type
2 |
3 | <%= render 'form', entity_type: @entity_type %>
4 |
--------------------------------------------------------------------------------
/app/views/entity_types/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | Project:
5 | <%= @entity_type.project %>
6 |
7 |
8 |
9 | Name:
10 | <%= @entity_type.name %>
11 |
12 |
13 |
14 | Color:
15 | <%= @entity_type.color %>
16 |
17 |
18 | <%= link_to 'Edit', edit_entity_type_path(@entity_type) %> |
19 | <%= link_to 'Back', entity_types_path %>
20 |
--------------------------------------------------------------------------------
/app/views/entity_types/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "entity_types/entity_type", entity_type: @entity_type
2 |
--------------------------------------------------------------------------------
/app/views/home/privacy.html.erb:
--------------------------------------------------------------------------------
1 | Home#privacy_policy
2 | Find me in app/views/home/privacy_policy.html.erb
3 |
--------------------------------------------------------------------------------
/app/views/home/sitemap.html.erb:
--------------------------------------------------------------------------------
1 | <% content_for :title, "Site Map" %>
2 |
3 |
4 |
7 |
8 |
14 |
--------------------------------------------------------------------------------
/app/views/home/stat.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Number of users
8 | <%=number_with_delimiter @user_count %>
9 |
10 |
11 | Number of projects
12 | <%=number_with_delimiter @project_count %>
13 |
14 |
15 | Number of documents
16 | <%=number_with_delimiter @document_count %>
17 |
18 |
19 | Number of annotations
20 | <%=number_with_delimiter @annotation_count %>
21 |
22 |
23 | Number of unique project managers
24 | <%=number_with_delimiter @owner_count %>
25 |
26 |
27 | Number of tasks (AI tool)
28 | <%=number_with_delimiter @task_count %>
29 |
30 |
31 | Number of rounds
32 | <%=number_with_delimiter @round_count %>
33 |
34 |
35 | Number of assigns
36 | <%=number_with_delimiter @assign_count %>
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/views/home/tos.html.erb:
--------------------------------------------------------------------------------
1 | Home#tos
2 | Find me in app/views/home/tos.html.erb
3 |
--------------------------------------------------------------------------------
/app/views/kaminari/_first_page.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/views/kaminari/_gap.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= t('views.pagination.truncate').html_safe %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/kaminari/_last_page.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/views/kaminari/_next_page.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/views/kaminari/_page.html.erb:
--------------------------------------------------------------------------------
1 | <% if page.current? %>
2 |
3 | <%= page %>
4 |
5 | <% else %>
6 |
7 | <%= page %>
8 |
9 | <% end %>
10 |
--------------------------------------------------------------------------------
/app/views/kaminari/_paginator.html.erb:
--------------------------------------------------------------------------------
1 | <%= paginator.render do %>
2 |
15 | <% end %>
16 |
--------------------------------------------------------------------------------
/app/views/kaminari/_prev_page.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/app/views/lexicon_groups/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for([@project, lexicon_group], html: {class: "ui form"}) do |f| %>
2 | <% if lexicon_group.errors.any? %>
3 |
4 |
5 |
6 |
7 | <% lexicon_group.errors.full_messages.each do |message| %>
8 | <%= message %>
9 | <% end %>
10 |
11 |
12 | <% end %>
13 |
14 |
15 | <%= f.label :name %>
16 | <%= f.text_field :name, placeholder: "Please enter a name of the lexicon" %>
17 |
18 |
19 |
20 | <%= link_to 'Back', lexicon_groups_path, class: "ui button" %>
21 | <%= f.submit "Save", class: "ui button primary" %>
22 |
23 | <% end %>
24 |
--------------------------------------------------------------------------------
/app/views/lexicon_groups/_lexicon_group.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! lexicon_group, :id, :name, :user_id, :created_at, :updated_at
2 | json.url lexicon_group_url(lexicon_group, format: :json)
--------------------------------------------------------------------------------
/app/views/lexicon_groups/edit.html.erb:
--------------------------------------------------------------------------------
1 | Edit
2 |
3 | <%= render 'form', lexicon_group: @lexicon_group %>
4 |
--------------------------------------------------------------------------------
/app/views/lexicon_groups/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @lexicon_groups, partial: 'lexicon_groups/lexicon_group', as: :lexicon_group
--------------------------------------------------------------------------------
/app/views/lexicon_groups/new.html.erb:
--------------------------------------------------------------------------------
1 | New Lexicon
2 |
3 | <%= render 'form', lexicon_group: @lexicon_group %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/lexicon_groups/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | Name:
5 | <%= @lexicon_group.name %>
6 |
7 |
8 |
9 | User:
10 | <%= @lexicon_group.user %>
11 |
12 |
13 | <%= link_to 'Edit', edit_lexicon_group_path(@lexicon_group) %> |
14 | <%= link_to 'Back', lexicon_groups_path %>
15 |
--------------------------------------------------------------------------------
/app/views/lexicon_groups/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "lexicon_groups/lexicon_group", lexicon_group: @lexicon_group
--------------------------------------------------------------------------------
/app/views/lexicons/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for([@lexicon_group, lexicon], html: {class: "ui form"}) do |f| %>
2 | <% if lexicon.errors.any? %>
3 |
4 |
5 |
6 |
7 | <% lexicon.errors.full_messages.each do |message| %>
8 | <%= message %>
9 | <% end %>
10 |
11 |
12 | <% end %>
13 |
14 |
15 | <%= f.label :ltype %>
16 | <%= f.text_field :ltype, placeholder: "Please enter an entity type, e.g. Disease" %>
17 |
18 |
19 |
20 | <%= f.label :lexicon_id %>
21 | <%= f.text_field :lexicon_id, placeholder: "Please enter a concept ID of the name below"%>
22 |
23 |
24 |
25 | <%= f.label :name %>
26 | <%= f.text_field :name, placeholder: "Please enter an entity name, e.g. Influenza" %>
27 |
28 |
29 |
30 | <%= link_to 'Back', lexicon_group_lexicons_path(@lexicon_group), class: "ui button" %>
31 | <%= f.submit "Save", class: "ui button primary" %>
32 |
33 | <% end %>
34 |
--------------------------------------------------------------------------------
/app/views/lexicons/_lexicon.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! lexicon, :id, :ltype, :lexicon_id, :name, :collection_id, :created_at, :updated_at
2 | json.url lexicon_url(lexicon, format: :json)
--------------------------------------------------------------------------------
/app/views/lexicons/edit.html.erb:
--------------------------------------------------------------------------------
1 | Edit
2 |
3 | <%= render 'form', lexicon: @lexicon %>
4 |
--------------------------------------------------------------------------------
/app/views/lexicons/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @lexicons, partial: 'lexicons/lexicon', as: :lexicon
--------------------------------------------------------------------------------
/app/views/lexicons/new.html.erb:
--------------------------------------------------------------------------------
1 | New Item
2 |
3 | <%= render 'form', lexicon: @lexicon %>
4 |
--------------------------------------------------------------------------------
/app/views/lexicons/show.html.erb:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 | <%= @lexicon.ltype %>
11 |
12 |
13 |
14 | <%= @lexicon.lexicon_id %>
15 |
16 |
17 |
18 |
19 | <%= @lexicon.name%>
20 |
21 |
22 |
23 | <% if @project.manager?(current_user) %>
24 | <%= link_to 'Edit', edit_lexicon_path(@lexicon), class: "ui button" %>
25 | <% end %>
26 | <%= link_to 'Back', lexicon_group_lexicons_path(@lexicon_group), class: "ui button" %>
27 |
--------------------------------------------------------------------------------
/app/views/lexicons/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "lexicons/lexicon", lexicon: @lexicon
--------------------------------------------------------------------------------
/app/views/models/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for(model, html: {class: "ui form"}) do |f| %>
2 | <% if model.errors.any? %>
3 |
4 |
5 |
6 |
7 | <% model.errors.full_messages.each do |message| %>
8 | <%= message %>
9 | <% end %>
10 |
11 |
12 | <% end %>
13 |
14 |
15 | <%= f.label :name %>
16 | <%= f.text_field :name %>
17 |
18 |
19 |
20 | <%= link_to 'Back', models_path, class: "ui button" %>
21 | <%= f.submit "Save", class: "ui button primary"%>
22 |
23 | <% end %>
24 |
--------------------------------------------------------------------------------
/app/views/models/_model.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! model, :id, :url, :user_id, :name, :created_at, :updated_at
2 | json.url model_url(model, format: :json)
--------------------------------------------------------------------------------
/app/views/models/edit.html.erb:
--------------------------------------------------------------------------------
1 | Edit Model
2 |
3 | <%= render 'form', model: @model %>
4 |
--------------------------------------------------------------------------------
/app/views/models/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @models, partial: 'models/model', as: :model
--------------------------------------------------------------------------------
/app/views/models/new.html.erb:
--------------------------------------------------------------------------------
1 | New Model
2 |
3 | <%= render 'form', model: @model %>
4 |
5 | <%= link_to 'Back', models_path %>
6 |
--------------------------------------------------------------------------------
/app/views/models/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <%= @model.status %>
7 |
8 |
9 |
10 |
11 | <% if @model.url.blank? %>
12 | Model is not ready yet. Please wait for more.
13 | <% else %>
14 | <%=link_to @model.model_url, @model.model_url %>
15 | <% end %>
16 |
17 |
18 |
19 |
20 | <% unless @model.url.blank? %>
21 |
27 |
38 | <% end %>
39 |
--------------------------------------------------------------------------------
/app/views/models/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "models/model", model: @model
--------------------------------------------------------------------------------
/app/views/project_users/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with(model: project_user, local: true) do |form| %>
2 | <% if project_user.errors.any? %>
3 |
4 |
5 |
6 |
7 | <% project_user.errors.full_messages.each do |message| %>
8 | <%= message %>
9 | <% end %>
10 |
11 |
12 | <% end %>
13 |
14 |
15 | <%= form.label :project_id %>
16 | <%= form.text_field :project_id %>
17 |
18 |
19 |
20 | <%= form.label :user_id %>
21 | <%= form.text_field :user_id %>
22 |
23 |
24 |
25 | <%= form.label :role %>
26 | <%= form.number_field :role %>
27 |
28 |
29 |
30 | <%= form.submit %>
31 |
32 | <% end %>
33 |
--------------------------------------------------------------------------------
/app/views/project_users/_project_user.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! project_user, :id, :project_id, :user_id, :role, :created_at, :updated_at
2 | json.url project_user_url(project_user, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/project_users/edit.html.erb:
--------------------------------------------------------------------------------
1 | Editing Project User
2 |
3 | <%= render 'form', project_user: @project_user %>
4 |
--------------------------------------------------------------------------------
/app/views/project_users/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @project_users, partial: "project_users/project_user", as: :project_user
2 |
--------------------------------------------------------------------------------
/app/views/project_users/new.html.erb:
--------------------------------------------------------------------------------
1 | New Project User
2 |
3 | <%= render 'form', project_user: @project_user %>
4 |
5 | <%= link_to 'Back', project_users_path %>
6 |
--------------------------------------------------------------------------------
/app/views/project_users/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | Project:
5 | <%= @project_user.project %>
6 |
7 |
8 |
9 | User:
10 | <%= @project_user.user %>
11 |
12 |
13 |
14 | Role:
15 | <%= @project_user.role %>
16 |
17 |
18 | <%= link_to 'Edit', edit_project_user_path(@project_user) %> |
19 | <%= link_to 'Back', project_users_path %>
20 |
--------------------------------------------------------------------------------
/app/views/project_users/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "project_users/project_user", project_user: @project_user
2 |
--------------------------------------------------------------------------------
/app/views/projects/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with(model: project, local: true, html: {class: "ui form"}) do |form| %>
2 | <% if project.errors.any? %>
3 |
4 |
5 |
6 |
7 | <% project.errors.full_messages.each do |message| %>
8 | <%= message %>
9 | <% end %>
10 |
11 |
12 | <% end %>
13 |
14 |
15 | <%= form.label :name %>
16 | <%= form.text_field :name, placeholder: "Please enter a name of the project. A project is the basic unit for concept tagging and training" %>
17 |
18 |
19 |
20 | <%= form.label :desc %>
21 | <%= form.text_field :desc, placeholder: "Please add a note for a more detailed description" %>
22 |
23 |
24 | <% if current_user.super_admin? %>
25 |
26 | <%= form.label :enable_audit %>
27 | <%= form.check_box :enable_audit %>
28 |
29 | <% end %>
30 |
34 |
35 |
36 | <%= link_to 'Back', projects_path, class: "ui button" %>
37 | <%= form.submit "Save", class: "ui button primary" %>
38 |
39 | <% end %>
40 |
--------------------------------------------------------------------------------
/app/views/projects/_project.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! project, :id, :name, :desc, :round, :documents_count, :cdate, :key, :source, :xml_url, :annotations_count, :status, :created_at, :updated_at
2 | json.url project_url(project, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/projects/_project_action_modal.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | Please do not close or reload the window until all work is done.
8 |
9 |
10 |
11 |
12 |
15 |
Processing documents
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/views/projects/_project_header.html.erb:
--------------------------------------------------------------------------------
1 | <% content_for :title, @project.name %>
2 |
3 |
20 |
--------------------------------------------------------------------------------
/app/views/projects/buttons.html.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: "project_buttons" %>
--------------------------------------------------------------------------------
/app/views/projects/edit.html.erb:
--------------------------------------------------------------------------------
1 | Edit
2 |
3 | <%= render 'form', project: @project %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/projects/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @projects, partial: "projects/project", as: :project
2 |
--------------------------------------------------------------------------------
/app/views/projects/new.html.erb:
--------------------------------------------------------------------------------
1 | New Project
2 |
3 | <%= render 'form', project: @project %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/projects/partial.html.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: "index_partial" %>
--------------------------------------------------------------------------------
/app/views/projects/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | Name:
5 | <%= @project.name %>
6 |
7 |
8 |
9 | Desc:
10 | <%= @project.desc %>
11 |
12 |
13 |
14 | Round:
15 | <%= @project.round %>
16 |
17 |
18 |
19 | Documents count:
20 | <%= @project.documents_count %>
21 |
22 |
23 |
24 | Cdate:
25 | <%= @project.cdate %>
26 |
27 |
28 |
29 | Key:
30 | <%= @project.key %>
31 |
32 |
33 |
34 | Source:
35 | <%= @project.source %>
36 |
37 |
38 |
39 | Xml url:
40 | <%= @project.xml_url %>
41 |
42 |
43 |
44 | Annotations count:
45 | <%= @project.annotations_count %>
46 |
47 |
48 |
49 | Status:
50 | <%= @project.status %>
51 |
52 |
53 | <%= link_to 'Edit', edit_project_path(@project) %> |
54 | <%= link_to 'Back', projects_path %>
55 |
--------------------------------------------------------------------------------
/app/views/projects/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | # json.partial! "projects/project", project: @project
2 |
3 |
4 | status = @project.status
5 |
6 | json.locked @project.locked
7 | json.extract! @project, :id
8 | json.status_with_icon @project.status_with_icon(status)
9 | json.status status
10 | json.busy @project.busy?(status)
11 | json.task_available @project.task_available?(status)
12 | json.has_annotations @project.has_annotations?
--------------------------------------------------------------------------------
/app/views/relation_types/_relation_type.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! relation_type, :id, :name, :color, :num_nodes, :entity_type, :project_id, :created_at, :updated_at
2 | json.url relation_type_url(relation_type, format: :json)
3 |
--------------------------------------------------------------------------------
/app/views/relation_types/edit.html.erb:
--------------------------------------------------------------------------------
1 | Editing Relation Type
2 |
3 | <%= render 'form', relation_type: @relation_type %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/relation_types/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @relation_types, partial: "relation_types/relation_type", as: :relation_type
2 |
--------------------------------------------------------------------------------
/app/views/relation_types/new.html.erb:
--------------------------------------------------------------------------------
1 | New Relation Type
2 |
3 | <%= render 'form', relation_type: @relation_type %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/relation_types/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | Name:
5 | <%= @relation_type.name %>
6 |
7 |
8 |
9 | Color:
10 | <%= @relation_type.color %>
11 |
12 |
13 |
14 | Num nodes:
15 | <%= @relation_type.num_nodes %>
16 |
17 |
18 |
19 | Entity type:
20 | <%= @relation_type.entity_type %>
21 |
22 |
23 |
24 | Project:
25 | <%= @relation_type.project %>
26 |
27 |
28 | <%= link_to 'Edit', edit_relation_type_path(@relation_type) %> |
29 | <%= link_to 'Back', relation_types_path %>
30 |
--------------------------------------------------------------------------------
/app/views/relation_types/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "relation_types/relation_type", relation_type: @relation_type
2 |
--------------------------------------------------------------------------------
/app/views/relations/_relation.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.id relation.r_id
2 | json.type relation.r_type
3 | json.passage relation.passage
4 | json.note relation.note
5 |
6 | json.nodes(relation.nodes) do |n|
7 | json.ref_id n.ref_id
8 | json.role n.role
9 | json.order_no n.order_no
10 | end
11 |
12 | json.annotator relation.annotator
13 | json.updated_at relation.updated_at.utc.iso8601
14 | json.user_id relation.user_id
15 | json.relation_id relation.id
16 |
--------------------------------------------------------------------------------
/app/views/relations/show.html.erb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/app/views/relations/show.html.erb
--------------------------------------------------------------------------------
/app/views/relations/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | if !@relation.nil?
2 | json.relation do
3 | json.partial! "relations/relation", relation: @relation
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/tasks/_task.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.extract! task, :id, :user_id, :collection_id, :tagger, :task_type, :pre_trained_model, :status, :model_url, :xml_url, :begin_at, :end_at, :created_at, :updated_at
2 | json.url task_url(task, format: :json)
--------------------------------------------------------------------------------
/app/views/tasks/edit.html.erb:
--------------------------------------------------------------------------------
1 | Edit Task
2 |
3 | <%= render 'form', task: @task %>
4 |
5 | <%= link_to 'Show', @task %> |
6 | <%= link_to 'Back', tasks_path %>
7 |
--------------------------------------------------------------------------------
/app/views/tasks/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! @tasks, partial: 'tasks/task', as: :task
--------------------------------------------------------------------------------
/app/views/tasks/partial.html.erb:
--------------------------------------------------------------------------------
1 | <%=render partial: "index_partial" %>
--------------------------------------------------------------------------------
/app/views/tasks/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= notice %>
2 |
3 |
4 | User:
5 | <%= @task.user %>
6 |
7 |
8 |
9 | Collection:
10 | <%= @task.collection %>
11 |
12 |
13 |
14 | Tagger:
15 | <%= @task.tagger %>
16 |
17 |
18 |
19 | Task type:
20 | <%= @task.task_type %>
21 |
22 |
23 |
24 | Pre-trained model:
25 | <%= @task.pre_trained_model %>
26 |
27 |
28 |
29 | Status:
30 | <%= @task.status %>
31 |
32 |
33 |
34 | Model URL:
35 | <%= @task.model_url %>
36 |
37 |
38 |
39 | Xml url:
40 | <%= @task.xml_url %>
41 |
42 |
43 |
44 | Begin at:
45 | <%= @task.begin_at %>
46 |
47 |
48 |
49 | End at:
50 | <%= @task.end_at %>
51 |
52 |
53 | <%= link_to 'Edit', edit_task_path(@task) %> |
54 | <%= link_to 'Back', tasks_path %>
55 |
--------------------------------------------------------------------------------
/app/views/tasks/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! "tasks/task", task: @task
--------------------------------------------------------------------------------
/app/views/user_mailer/project_done.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Assignments are done for Project <%= @project.name %>
8 |
9 |
10 | Project ID : <%= @project.id %>
11 | Project Name : <%= @project.name %>
12 | Number of documents: <%= @project.documents.all.size %>
13 | Number of assignments: <%= @project.assigns.all.size %>
14 |
15 |
16 | All annotation assignments are successfully done.
17 | To show the project, just follow this link: <%=link_to @url, @url %>
18 |
19 |
20 | Have a great day!
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/views/user_mailer/project_done.text.erb:
--------------------------------------------------------------------------------
1 | Assignments are done for Project <%= @project.name %>
2 | ===============================================
3 |
4 | - Project ID : <%= @project.id %>
5 | - Project Name : <%= @project.name %>
6 | - Number of documents: <%= @project.documents.all.size %>
7 | - Number of assignments: <%= @project.assigns.all.size %>
8 |
9 | All annotation assignments are successfully done.
10 | To show the project, just follow this link: <%= @url %>.
11 |
12 | Have a great day!
--------------------------------------------------------------------------------
/app/views/user_mailer/session_email.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Welcome to TeamTat
8 |
9 | To use your session again, just follow this link: <%=link_to @url, @url %>.
10 |
11 | Thanks for using TeamTat and have a great day!
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/views/user_mailer/session_email.text.erb:
--------------------------------------------------------------------------------
1 | Welcome to TeamTat
2 | ================================================================================
3 |
4 | To use your session again, just follow this link: <%=@url %>.
5 |
6 | Thanks for using TeamTat and have a great day!
7 |
--------------------------------------------------------------------------------
/app/views/users/edit.html.erb:
--------------------------------------------------------------------------------
1 | Edit User
2 |
3 | <%= render 'form', user: @user %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/users/new.html.erb:
--------------------------------------------------------------------------------
1 | New User
2 |
3 | <%= render 'form', user: @user %>
4 |
5 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path('../spring', __FILE__)
4 | rescue LoadError => e
5 | raise unless e.message.include?('spring')
6 | end
7 | APP_PATH = File.expand_path('../config/application', __dir__)
8 | require_relative '../config/boot'
9 | require 'rails/commands'
10 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path('../spring', __FILE__)
4 | rescue LoadError => e
5 | raise unless e.message.include?('spring')
6 | end
7 | require_relative '../config/boot'
8 | require 'rake'
9 | Rake.application.run
10 |
--------------------------------------------------------------------------------
/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'fileutils'
3 | include FileUtils
4 |
5 | # path to your application root.
6 | APP_ROOT = File.expand_path('..', __dir__)
7 |
8 | def system!(*args)
9 | system(*args) || abort("\n== Command #{args} failed ==")
10 | end
11 |
12 | chdir APP_ROOT do
13 | # This script is a starting point to setup your application.
14 | # Add necessary setup steps to this file.
15 |
16 | puts '== Installing dependencies =='
17 | system! 'gem install bundler --conservative'
18 | system('bundle check') || system!('bundle install')
19 |
20 | # Install JavaScript dependencies if using Yarn
21 | # system('bin/yarn')
22 |
23 | # puts "\n== Copying sample files =="
24 | # unless File.exist?('config/database.yml')
25 | # cp 'config/database.yml.sample', 'config/database.yml'
26 | # end
27 |
28 | puts "\n== Preparing database =="
29 | system! 'bin/rails db:setup'
30 |
31 | puts "\n== Removing old logs and tempfiles =="
32 | system! 'bin/rails log:clear tmp:clear'
33 |
34 | puts "\n== Restarting application server =="
35 | system! 'bin/rails restart'
36 | end
37 |
--------------------------------------------------------------------------------
/bin/spring:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | # This file loads spring without using Bundler, in order to be fast.
4 | # It gets overwritten when you run the `spring binstub` command.
5 |
6 | unless defined?(Spring)
7 | require 'rubygems'
8 | require 'bundler'
9 |
10 | lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11 | spring = lockfile.specs.detect { |spec| spec.name == "spring" }
12 | if spring
13 | Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
14 | gem 'spring', spring.version
15 | require 'spring/binstub'
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/bin/update:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'fileutils'
3 | include FileUtils
4 |
5 | # path to your application root.
6 | APP_ROOT = File.expand_path('..', __dir__)
7 |
8 | def system!(*args)
9 | system(*args) || abort("\n== Command #{args} failed ==")
10 | end
11 |
12 | chdir APP_ROOT do
13 | # This script is a way to update your development environment automatically.
14 | # Add necessary update steps to this file.
15 |
16 | puts '== Installing dependencies =='
17 | system! 'gem install bundler --conservative'
18 | system('bundle check') || system!('bundle install')
19 |
20 | # Install JavaScript dependencies if using Yarn
21 | # system('bin/yarn')
22 |
23 | puts "\n== Updating database =="
24 | system! 'bin/rails db:migrate'
25 |
26 | puts "\n== Removing old logs and tempfiles =="
27 | system! 'bin/rails log:clear tmp:clear'
28 |
29 | puts "\n== Restarting application server =="
30 | system! 'bin/rails restart'
31 | end
32 |
--------------------------------------------------------------------------------
/bin/yarn:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_ROOT = File.expand_path('..', __dir__)
3 | Dir.chdir(APP_ROOT) do
4 | begin
5 | exec "yarnpkg", *ARGV
6 | rescue Errno::ENOENT
7 | $stderr.puts "Yarn executable was not detected in the system."
8 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9 | exit 1
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative 'config/environment'
4 |
5 | run Rails.application
6 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative 'boot'
2 |
3 | require "rails"
4 | # Pick the frameworks you want:
5 | require "active_model/railtie"
6 | require "active_job/railtie"
7 | require "active_record/railtie"
8 | require "active_storage/engine"
9 | require "action_controller/railtie"
10 | require "action_mailer/railtie"
11 | require "action_view/railtie"
12 | require "action_cable/engine"
13 | require "sprockets/railtie"
14 | # require "rails/test_unit/railtie"
15 |
16 | # Require the gems listed in Gemfile, including any gems
17 | # you've limited to :test, :development, or :production.
18 | Bundler.require(*Rails.groups)
19 |
20 | module Pubqrator
21 | class Application < Rails::Application
22 | # Initialize configuration defaults for originally generated Rails version.
23 | config.load_defaults 5.2
24 |
25 | # Settings in config/environments/* take precedence over those specified here.
26 | # Application configuration can go into files in config/initializers
27 | # -- all .rb files in that directory are automatically loaded after loading
28 | # the framework and any gems in your application.
29 |
30 | # Don't generate system test files.
31 | config.generators.system_tests = nil
32 |
33 | Raven.configure do |config|
34 | config.dsn = 'https://6b5877e9ca0b402f99f0ef4552caded3:33a416e4240e4ed2a589af1c66553cbe@sentry.io/1495779'
35 | end
36 |
37 | end
38 | end
39 |
40 |
41 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2 |
3 | require 'bundler/setup' # Set up gems listed in the Gemfile.
4 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
5 |
--------------------------------------------------------------------------------
/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: async
6 |
7 | production:
8 | adapter: redis
9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10 | channel_prefix: pubqrator_production
11 |
--------------------------------------------------------------------------------
/config/credentials.yml.enc:
--------------------------------------------------------------------------------
1 | B2i0mbzAY0tCvjmxzn8nNE/710oh8XB3qdHkuI7XopmzMldkJbxUL7QXvaTaXYIhdHUEKB9Flyei5tC1pWTIm5/lah2AF1VIlEBChC4/p05LvLsCj3BPa8wooJtcMmBHpP01J5/+fNRFu3Yo2DHW8m/f8wtNYSYQqTLVxjEuD8LxG/Y3n/khMMv/Wh5zChDj/0q1Pwoudch1wg4WTgyiflTKZfgcSfVde7ucoByQf2QrKiwoVpHH7Y/lANEC8Qm8uzyVABfuP8mfG4UGxyqkz7u8Am9etSv2fpCXt7ga9FYGYQKjOrue+nlwzWNkjauQDu1JDxrIcvUKVZcMAo1T5OAUF656WTl37z3gvRzEoMh6s0BNlokTFAxohouoZAaGC7JT5134nbB0gs9Fq/qeH1os1oLg6IPFuoKeq9VB0ji0jNM9ykltHmbvzahIwWFh8DebcjvANNerNOrB2/vd78LvCsOf+zGSp1hjOZiy7prkKOjbjVKDEW89lyQvOEXLklcdmQhwsDyMhSew5ILLqoEUqHanhcSXKth4lb1QOtUOMuc5a8AoaxmDfSH9fGGIO6QAtzGWXLfZVMu67luTdVKmMzG0CkRCci7a09BLazQ/ZkgYsdvWFhs4Zpc449gSZy8EVVMmTwlgbCg1cRFGwxztJjSVscRJVOpRtBrL4A5NdBNyne40sPFdU/ycVkBpRVrtVFDC4f2lFSNOkWqLFsdU5rR9RCXlCCBx7zj2bdfxFfyb/KQZkvrFvZRcv2JpFkZkaCqLy+1Bc/iLFZbyOMFNqT8jFHfDT6vku4aiKg==--mX//qZw00EjC9art--k2YImZ2Hz2dCYq1425zSYQ==
--------------------------------------------------------------------------------
/config/credentials.yml.enc.sample:
--------------------------------------------------------------------------------
1 | t1UzLvpWRyuiozOLSAJJFMXo8+12WWoVPSRfZqs7y9HPa77+TYHiK2WP/pyxh7tuX0GtTstk835w8nDPILuQzyz6Zwthc2NjzoeMXHh8GnGd96V4KLqKJ6IXS13hVl6uE50X3k9iXcw20/IxnqO48rNJLBF1Y5nyfI7lM7x856JT1r1q3IMCYAYJJ52xThGl+S/3bYyCcr3nO52hi6zOHRye3UGrxmANPtOoHsXOQXx+hkA9H/7JuT9K3rvDxFuXLBCjMIN/dduvYhEFLTyW5kQXTwfvHrIYAWnXBGJNu58LChTOpFnUTQwZMPlFjkwr6IVlPp3p1U34+uoSH1Fcjdb2TXEt/vZAx7UlHPpcnMfVe6cKtvhe23Ib/Ibq78kikyP1zXtb0kss2607trAdoTyRjgf8UXrdqhVA--NxqogfZZsqCqaJGt--5nMbWFX/jfZeFrHDZCBM8w==
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative 'application'
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ActiveSupport::Reloader.to_prepare do
4 | # ApplicationController.renderer.defaults.merge!(
5 | # http_host: 'example.org',
6 | # https: false
7 | # )
8 | # end
9 |
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = '1.0'
5 |
6 | # Add additional assets to the asset load path.
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 | # Add Yarn node_modules folder to the asset load path.
9 | Rails.application.config.assets.paths << Rails.root.join('node_modules')
10 | Rails.application.config.assets.precompile += %w( svg.js )
11 | # Precompile additional assets.
12 | # application.js, application.css, and all non-JS/CSS in the app/assets
13 | # folder are already added.
14 | # Rails.application.config.assets.precompile += %w( admin.js admin.css )
15 |
--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/config/initializers/content_security_policy.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Define an application-wide content security policy
4 | # For further information see the following documentation
5 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6 |
7 | # Rails.application.config.content_security_policy do |policy|
8 | # policy.default_src :self, :https
9 | # policy.font_src :self, :https, :data
10 | # policy.img_src :self, :https, :data
11 | # policy.object_src :none
12 | # policy.script_src :self, :https
13 | # policy.style_src :self, :https
14 |
15 | # # Specify URI for violation reports
16 | # # policy.report_uri "/csp-violation-report-endpoint"
17 | # end
18 |
19 | # If you are using UJS then enable automatic nonce generation
20 | # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21 |
22 | # Report CSP violations to a specified URI
23 | # For further information see the following documentation:
24 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
25 | # Rails.application.config.content_security_policy_report_only = true
26 |
--------------------------------------------------------------------------------
/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :json
6 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password, :password_confirmation]
5 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/config/initializers/recaptcha.rb:
--------------------------------------------------------------------------------
1 | # config/initializers/recaptcha.rb
2 | if Rails.application.credentials.recaptcha.present?
3 | Recaptcha.configure do |config|
4 | config.site_key = Rails.application.credentials.recaptcha[:site_key]
5 | config.secret_key = Rails.application.credentials.recaptcha[:secret]
6 | # Uncomment the following line if you are using a proxy server:
7 | # config.proxy = 'http://myproxy.com.au:8080'
8 | end
9 | Rails.configuration.use_recaptcha = true
10 | else
11 | Rails.configuration.use_recaptcha = false
12 | end
13 |
--------------------------------------------------------------------------------
/config/initializers/senty.rb:
--------------------------------------------------------------------------------
1 | Raven.configure do |config|
2 | # Raven reports on the following environments
3 | config.environments = %w(staging production)
4 | # Sentry respects the sanitized fields specified in:
5 | # config/initializers/filter_parameter_logging.rb
6 | config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s)
7 | # Raven sends events asynchronous to sentry, using the jobs/sentry_job.rb
8 | # config.async = lambda { |event| SentryJob.perform_later(event) }
9 | # Overwrite excluded exceptions
10 | # config.excluded_exceptions = []
11 | end
--------------------------------------------------------------------------------
/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json]
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t 'hello'
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t('hello') %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # The following keys must be escaped otherwise they will not be retrieved by
20 | # the default I18n backend:
21 | #
22 | # true, false, on, off, yes, no
23 | #
24 | # Instead, surround them with single quotes.
25 | #
26 | # en:
27 | # 'true': 'foo'
28 | #
29 | # To learn more, please read the Rails Internationalization guide
30 | # available at http://guides.rubyonrails.org/i18n.html.
31 |
32 | en:
33 | hello: "Hello world"
34 | breadcrumbs:
35 | application:
36 | index: 'Home'
37 | projects:
38 | index: Projects
39 | project_role:
40 | project_manager: 'Project Manager'
41 | annotator: 'Annotator'
42 |
--------------------------------------------------------------------------------
/config/master.key.sample:
--------------------------------------------------------------------------------
1 | d172af0e0cfacca100a547fc52bb7722
--------------------------------------------------------------------------------
/config/nginx.conf:
--------------------------------------------------------------------------------
1 | upstream puma {
2 | server unix:///home/deploy/apps/pubqrator/shared/tmp/sockets/pubqrator-puma.sock;
3 | }
4 |
5 | server {
6 | listen 80 default_server deferred;
7 |
8 | # If you're planning on using SSL (which you should), you can also go ahead and fill out the following server_name variable:
9 | # server_name example.com;
10 |
11 | # Don't forget to update these, too
12 | root /home/deploy/apps/pubqrator/current/public;
13 | access_log /home/deploy/apps/pubqrator/current/log/nginx.access.log;
14 | error_log /home/deploy/apps/pubqrator/current/log/nginx.error.log info;
15 |
16 | location ^~ /assets/ {
17 | gzip_static on;
18 | expires max;
19 | add_header Cache-Control public;
20 | }
21 |
22 | try_files $uri/index.html $uri @puma;
23 | location @puma {
24 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
25 | proxy_set_header Host $http_host;
26 | proxy_redirect off;
27 |
28 | proxy_pass http://puma;
29 | }
30 |
31 | error_page 500 502 503 504 /500.html;
32 | client_max_body_size 10M;
33 | keepalive_timeout 10;
34 | }
--------------------------------------------------------------------------------
/config/sitemap.rb:
--------------------------------------------------------------------------------
1 | # Set the host name for URL creation
2 | SitemapGenerator::Sitemap.default_host = "https://teamtat.org"
3 |
4 | SitemapGenerator::Sitemap.create do
5 | # Put links creation logic here.
6 | #
7 | # The root path '/' and sitemap index file are added automatically for you.
8 | # Links are added to the Sitemap in the order they are specified.
9 | #
10 | # Usage: add(path, options={})
11 | # (default options are used if you don't specify)
12 | #
13 | # Defaults: :priority => 0.5, :changefreq => 'weekly',
14 | # :lastmod => Time.now, :host => default_host
15 | #
16 | # Examples:
17 | #
18 | # Add '/articles'
19 | #
20 | add "/account/new"
21 | add "/about"
22 | #
23 | # Add all articles:
24 | #
25 | # Article.find_each do |article|
26 | # add article_path(article), :lastmod => article.updated_at
27 | # end
28 | end
29 |
--------------------------------------------------------------------------------
/config/spring.rb:
--------------------------------------------------------------------------------
1 | %w[
2 | .ruby-version
3 | .rbenv-vars
4 | tmp/restart.txt
5 | tmp/caching-dev.txt
6 | ].each { |path| Spring.watch(path) }
7 |
--------------------------------------------------------------------------------
/config/storage.yml:
--------------------------------------------------------------------------------
1 | test:
2 | service: Disk
3 | root: <%= Rails.root.join("tmp/storage") %>
4 |
5 | local:
6 | service: Disk
7 | root: <%= Rails.root.join("storage") %>
8 |
9 | # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10 | # amazon:
11 | # service: S3
12 | # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13 | # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14 | # region: us-east-1
15 | # bucket: your_own_bucket
16 |
17 | # Remember not to checkin your GCS keyfile to a repository
18 | # google:
19 | # service: GCS
20 | # project: your_project
21 | # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22 | # bucket: your_own_bucket
23 |
24 | # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25 | # microsoft:
26 | # service: AzureStorage
27 | # storage_account_name: your_account_name
28 | # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29 | # container: your_container_name
30 |
31 | # mirror:
32 | # service: Mirror
33 | # primary: local
34 | # mirrors: [ amazon, google, microsoft ]
35 |
--------------------------------------------------------------------------------
/db/migrate/20190603132409_add_omniauth_to_users.rb:
--------------------------------------------------------------------------------
1 | class AddOmniauthToUsers < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :users, :provider, :string
4 | add_column :users, :uid, :string
5 | add_column :users, :token, :string
6 | add_column :users, :expires_at, :integer
7 | add_column :users, :expires, :boolean
8 | add_column :users, :refresh_token, :string
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20190610111421_create_projects.rb:
--------------------------------------------------------------------------------
1 | class CreateProjects < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :projects do |t|
4 | t.string :name, null: false, default: ""
5 | t.string :desc
6 | t.integer :round, default: 0
7 | t.integer :total_rounds, default: 3
8 | t.integer :documents_count, default: 0
9 | t.string :cdate
10 | t.string :key
11 | t.string :source
12 | t.string :xml_url
13 | t.integer :annotations_count, default: 0
14 | t.integer :status
15 |
16 | t.timestamps
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/db/migrate/20190610111644_create_documents.rb:
--------------------------------------------------------------------------------
1 | class CreateDocuments < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :documents do |t|
4 | t.references :project, foreign_key: true
5 | t.string :did
6 | t.datetime :user_updated_at
7 | t.datetime :tool_updated_at
8 | t.text :xml
9 | t.text :title
10 | t.string :key
11 | t.integer :did_no
12 | t.integer :batch_id
13 | t.integer :batch_no
14 | t.integer :order_no
15 |
16 | t.timestamps
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/db/migrate/20190610111733_create_entity_types.rb:
--------------------------------------------------------------------------------
1 | class CreateEntityTypes < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :entity_types do |t|
4 | t.references :project, foreign_key: true
5 | t.string :name, null: false, default: ""
6 | t.string :color
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20190610112015_create_lexicon_groups.rb:
--------------------------------------------------------------------------------
1 | class CreateLexiconGroups < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :lexicon_groups do |t|
4 | t.string :name, null: false, default: ""
5 | t.references :project, foreign_key: true
6 | t.string :key
7 | t.integer :lexicons_count, default: 0
8 |
9 | t.timestamps
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20190610112037_create_lexicons.rb:
--------------------------------------------------------------------------------
1 | class CreateLexicons < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :lexicons do |t|
4 | t.string :ltype
5 | t.string :lexicon_id
6 | t.string :name
7 | t.references :lexicon_group, foreign_key: true
8 |
9 | t.timestamps
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20190610112216_create_models.rb:
--------------------------------------------------------------------------------
1 | class CreateModels < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :models do |t|
4 | t.string :url
5 | t.references :project, foreign_key: true
6 | t.string :name
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20190610112558_create_upload_batches.rb:
--------------------------------------------------------------------------------
1 | class CreateUploadBatches < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :upload_batches do |t|
4 |
5 | t.timestamps
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20190610112726_create_tasks.rb:
--------------------------------------------------------------------------------
1 | class CreateTasks < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :tasks do |t|
4 | t.references :user, foreign_key: true
5 | t.references :project, foreign_key: true
6 | t.string :tagger
7 | t.integer :task_type
8 | t.string :pre_trained_model
9 | t.string :status
10 | t.string :tool_begin_at
11 | t.string :tool_end_at
12 | t.string :canceled_at
13 | t.references :model, foreign_key: true
14 | t.references :lexicon_group, foreign_key: true
15 | t.boolean :has_model, default: false
16 | t.boolean :has_lexicon_group, default: false
17 |
18 | t.timestamps
19 | end
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/db/migrate/20190610113324_create_project_users.rb:
--------------------------------------------------------------------------------
1 | class CreateProjectUsers < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :project_users do |t|
4 | t.references :project, foreign_key: true
5 | t.references :user, foreign_key: true
6 | t.integer :role, default: 0
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20190610113454_create_assigns.rb:
--------------------------------------------------------------------------------
1 | class CreateAssigns < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :assigns do |t|
4 | t.references :project, foreign_key: true
5 | t.references :document, foreign_key: true
6 | t.references :user, foreign_key: true
7 | t.integer :round, default: 0
8 | t.boolean :done, default: false
9 | t.boolean :curatable, default: false
10 | t.datetime :begin_at
11 | t.datetime :end_at
12 | t.timestamps
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/db/migrate/20190610114418_create_annotations.rb:
--------------------------------------------------------------------------------
1 | class CreateAnnotations < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :annotations do |t|
4 | t.string :a_id
5 | t.string :a_type
6 | t.string :concept
7 | t.references :user, foreign_key: true
8 | t.string :content
9 | t.string :note
10 | t.integer :offset, default: 0
11 | t.string :passage
12 | t.references :assign, foreign_key: true
13 | t.integer :source
14 |
15 | t.timestamps
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/db/migrate/20190610114703_create_api_keys.rb:
--------------------------------------------------------------------------------
1 | class CreateApiKeys < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :api_keys do |t|
4 | t.string :key
5 | t.references :user, foreign_key: true
6 | t.datetime :last_access_at
7 | t.string :last_access_ip
8 | t.integer :access_cpount
9 |
10 | t.timestamps
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20190624104832_add_image_to_user.rb:
--------------------------------------------------------------------------------
1 | class AddImageToUser < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :users, :image, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190624115428_add_devise_trackable_columns_to_users.rb:
--------------------------------------------------------------------------------
1 | class AddDeviseTrackableColumnsToUsers < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :users, :sign_in_count, :integer, default: 0, null: false
4 | add_column :users, :current_sign_in_at, :datetime
5 | add_column :users, :last_sign_in_at, :datetime
6 | add_column :users, :current_sign_in_ip, :string
7 | add_column :users, :last_sign_in_ip, :string
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20190701065407_add_round_to_annotation.rb:
--------------------------------------------------------------------------------
1 | class AddRoundToAnnotation < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :annotations, :document_id, :bigint
4 | add_column :annotations, :round, :integer, default: 0
5 | add_column :annotations, :change_type, :integer, default: 0
6 | rename_column :annotations, :source, :parent_id
7 | add_column :annotations, :annotator, :string
8 | add_column :annotations, :infons, :text
9 | add_column :documents, :round, :integer, default: 0
10 | add_index :annotations, [:document_id, :round, :assign_id]
11 | remove_column :projects, :status
12 | add_column :projects, :status, :integer, default: 0
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/db/migrate/20190702083409_add_project_user_id_to_assign.rb:
--------------------------------------------------------------------------------
1 | class AddProjectUserIdToAssign < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :assigns, :project_user_id, :bigint
4 | add_index :assigns, :project_user_id
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20190702110738_delete_total_round_from_project.rb:
--------------------------------------------------------------------------------
1 | class DeleteTotalRoundFromProject < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :projects, :entity_types_count, :integer, default: 0
4 | add_column :projects, :project_users_count, :integer, default: 0
5 | add_column :projects, :assigns_count, :integer, default: 0
6 | remove_column :projects, :total_rounds
7 | remove_index :annotations, [:document_id, :round, :assign_id]
8 | add_index :annotations, [:document_id, :user_id]
9 | remove_column :annotations, :round
10 | remove_column :assigns, :round
11 | remove_column :documents, :round
12 |
13 | execute <<-SQL.squish
14 | UPDATE projects
15 | SET
16 | entity_types_count = (SELECT count(1) FROM entity_types WHERE entity_types.project_id = projects.id),
17 | project_users_count = (SELECT count(1) FROM project_users WHERE project_users.project_id = projects.id),
18 | assigns_count = (SELECT count(1) FROM assigns WHERE assigns.project_id = projects.id);
19 | SQL
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/db/migrate/20190702115746_add_assigns_count_to_document.rb:
--------------------------------------------------------------------------------
1 | class AddAssignsCountToDocument < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :documents, :assigns_count, :integer, default: 0
4 |
5 | execute <<-SQL.squish
6 | UPDATE documents
7 | SET
8 | assigns_count = (SELECT count(1) FROM assigns WHERE assigns.document_id = documents.id);
9 | SQL
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20190702224238_add_lexicon_groups_count_to_project.rb:
--------------------------------------------------------------------------------
1 | class AddLexiconGroupsCountToProject < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :projects, :lexicon_groups_count, :integer, default: 0
4 | add_column :projects, :models_count, :integer, default: 0
5 | add_column :projects, :tasks_count, :integer, default: 0
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20190702232438_change_type_for_l_exicon_name.rb:
--------------------------------------------------------------------------------
1 | class ChangeTypeForLExiconName < ActiveRecord::Migration[5.2]
2 | def change
3 | change_column :lexicons, :name, :text
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190703092302_rename_status_in_project.rb:
--------------------------------------------------------------------------------
1 | class RenameStatusInProject < ActiveRecord::Migration[5.2]
2 | def change
3 | rename_column :projects, :status, :round_state
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190703144016_change_xml_in_document.rb:
--------------------------------------------------------------------------------
1 | class ChangeXmlInDocument < ActiveRecord::Migration[5.2]
2 | def change
3 | change_column :documents, :xml, :MEDIUMTEXT
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190706050029_add_detached_to_assign.rb:
--------------------------------------------------------------------------------
1 | class AddDetachedToAssign < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :assigns, :detached, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190707221246_change_content_in_annotations.rb:
--------------------------------------------------------------------------------
1 | class ChangeContentInAnnotations < ActiveRecord::Migration[5.2]
2 | def change
3 | change_column :annotations, :content, :text
4 | add_column :annotations, :passage_id, :string
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20190708033230_add_update_time_to_annotations.rb:
--------------------------------------------------------------------------------
1 | class AddUpdateTimeToAnnotations < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :annotations, :update_time, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190708104730_add_a_id_no_to_annotation.rb:
--------------------------------------------------------------------------------
1 | class AddAIdNoToAnnotation < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :annotations, :a_id_no, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190715050346_add_annotations_count_to_assign.rb:
--------------------------------------------------------------------------------
1 | class AddAnnotationsCountToAssign < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :assigns, :annotations_count, :integer, default: 0
4 |
5 | execute <<-SQL.squish
6 | UPDATE assigns
7 | SET
8 | annotations_count = (SELECT count(1) FROM annotations WHERE annotations.assign_id = assigns.id);
9 | SQL
10 |
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20190716191610_make_annotator_longer.rb:
--------------------------------------------------------------------------------
1 | class MakeAnnotatorLonger < ActiveRecord::Migration[5.2]
2 | def change
3 | change_column :annotations, :annotator, :string, :limit => 10000
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190718173126_add_prefix_to_entity_type.rb:
--------------------------------------------------------------------------------
1 | class AddPrefixToEntityType < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :entity_types, :prefix, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190718203242_add_version_to_annotation.rb:
--------------------------------------------------------------------------------
1 | class AddVersionToAnnotation < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :annotations, :version, :integer, default: 0
4 | add_column :documents, :version, :integer, default: 0
5 | add_column :documents, :xml_at, :datetime
6 |
7 | remove_column :annotations, :passage_id
8 | remove_column :annotations, :update_time
9 | remove_column :annotations, :change_type
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20190721043153_add_locked_to_project.rb:
--------------------------------------------------------------------------------
1 | class AddLockedToProject < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :projects, :locked, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190722155228_add_done_to_project.rb:
--------------------------------------------------------------------------------
1 | class AddDoneToProject < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :projects, :done, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190725191023_create_relation_types.rb:
--------------------------------------------------------------------------------
1 | class CreateRelationTypes < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :relation_types do |t|
4 | t.string :name
5 | t.string :color
6 | t.integer :num_nodes, default: 2
7 | t.string :entity_type
8 | t.references :project, foreign_key: true
9 |
10 | t.timestamps
11 | end
12 |
13 | add_column :projects, :relation_types_count, :integer, default: 0
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/db/migrate/20190725201359_create_relations.rb:
--------------------------------------------------------------------------------
1 | class CreateRelations < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :relations do |t|
4 | t.string :r_id
5 | t.string :r_type
6 | t.references :user, foreign_key: true
7 | t.string :note, default: ""
8 | t.text :infons
9 | t.string :annotator, limit: 10000
10 | t.references :document, foreign_key: true
11 | t.references :assign, foreign_key: true
12 | t.string :passage
13 | t.integer :r_id_no
14 | t.integer :version, default: 0
15 |
16 | t.timestamps
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/db/migrate/20190725201503_create_nodes.rb:
--------------------------------------------------------------------------------
1 | class CreateNodes < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :nodes do |t|
4 | t.references :relation, foreign_key: true
5 | t.integer :order_no
6 | t.string :role
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20190726143910_add_ref_id_to_node.rb:
--------------------------------------------------------------------------------
1 | class AddRefIdToNode < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :nodes, :ref_id, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190729192949_add_sig1_sig2_to_relation.rb:
--------------------------------------------------------------------------------
1 | class AddSig1Sig2ToRelation < ActiveRecord::Migration[5.2]
2 | def change
3 | change_column :annotations, :annotator, :string, limit: 3000
4 | change_column :relations, :annotator, :string, limit: 3000
5 | add_column :relations, :sig1, :string, limit: 5000
6 | add_column :relations, :sig2, :string, limit: 5000
7 |
8 | Relation.all.each do |r|
9 | r.update_signature
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20190730153024_add_document_version_to_node.rb:
--------------------------------------------------------------------------------
1 | class AddDocumentVersionToNode < ActiveRecord::Migration[5.2]
2 | def change
3 | add_reference :nodes, :document, foreign_key: true
4 | add_column :nodes, :version, :integer
5 |
6 | Node.all.each do |n|
7 | n.version = n.relation.version
8 | n.document_id = n.relation.document_id
9 | n.save
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20190801143837_add_agree_to_annotation.rb:
--------------------------------------------------------------------------------
1 | class AddAgreeToAnnotation < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :annotations, :review_result, :integer, default: 0
4 | add_column :relations, :review_result, :integer, default: 0
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20190813171427_add_finalized_to_project.rb:
--------------------------------------------------------------------------------
1 | class AddFinalizedToProject < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :projects, :finalized, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20190916045155_change_access_cpount_to_access_count.rb:
--------------------------------------------------------------------------------
1 | class ChangeAccessCpountToAccessCount < ActiveRecord::Migration[5.2]
2 | def change
3 | rename_column :api_keys, :access_cpount, :access_count
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20191103204624_add_done_count_to_document.rb:
--------------------------------------------------------------------------------
1 | class AddDoneCountToDocument < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :documents, :done_count, :integer, default: 0
4 | Document.all.each do |d|
5 | d.update_done_count
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20191119235655_create_audits.rb:
--------------------------------------------------------------------------------
1 | class CreateAudits < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :audits do |t|
4 | t.references :user, foreign_key: true
5 | t.references :project, foreign_key: true
6 | t.references :document, foreign_key: true
7 | t.references :annotation, foreign_key: true
8 | t.references :relation, foreign_key: true
9 | t.string :message
10 |
11 | t.timestamps
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/db/migrate/20191119235922_add_enable_audit_to_project.rb:
--------------------------------------------------------------------------------
1 | class AddEnableAuditToProject < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :projects, :enable_audit, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20191123035908_add_requests_to_audit.rb:
--------------------------------------------------------------------------------
1 | class AddRequestsToAudit < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :audits, :request, :text
4 | add_column :audits, :result, :text
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20191214135432_add_collaborate_round_to_project.rb:
--------------------------------------------------------------------------------
1 | class AddCollaborateRoundToProject < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :projects, :collaborate_round, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20191214143443_add_rounds_to_project.rb:
--------------------------------------------------------------------------------
1 | class AddRoundsToProject < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :projects, :collaborates, :text
4 |
5 | Project.all.each do |p|
6 | p.collaborates = [false] * (p.round + 1)
7 | p.save
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20200220023849_add_curatable_count_to_document.rb:
--------------------------------------------------------------------------------
1 | class AddCuratableCountToDocument < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :documents, :curatable_count, :integer, default: 0
4 | Document.all.each do |d|
5 | d.update_curatable_count
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20200405053933_add_infons_to_document.rb:
--------------------------------------------------------------------------------
1 | class AddInfonsToDocument < ActiveRecord::Migration[5.2]
2 | def change
3 | add_column :documents, :infons, :text
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20200427162815_add_project_id_to_annotation.rb:
--------------------------------------------------------------------------------
1 | class AddProjectIdToAnnotation < ActiveRecord::Migration[5.2]
2 | def change
3 | add_reference :annotations, :project, foreign_key: true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20210410090218_use_longer_xml.rb:
--------------------------------------------------------------------------------
1 | class UseLongerXml < ActiveRecord::Migration[5.2]
2 | def change
3 | change_column :documents, :xml, :longtext
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20221112134136_change_did_to_big_int.rb:
--------------------------------------------------------------------------------
1 | class ChangeDidToBigInt < ActiveRecord::Migration[5.2]
2 | def change
3 | change_column :documents, :did_no, :bigint
4 | change_column :documents, :batch_id, :bigint
5 | change_column :documents, :batch_no, :bigint
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
7 | # Character.create(name: 'Luke', movie: movies.first)
8 |
--------------------------------------------------------------------------------
/docker-entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | # # Remove a potentially pre-existing server.pid for Rails.
6 | rm -f /app/tmp/pids/server.pid
7 |
8 | bundle exec rake db:migrate
9 |
10 |
11 | # Then exec the container's main process (what's set as CMD in the Dockerfile).
12 | exec "$@"
--------------------------------------------------------------------------------
/lib/assets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/lib/assets/.keep
--------------------------------------------------------------------------------
/lib/tasks/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/lib/tasks/.keep
--------------------------------------------------------------------------------
/log/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/log/.keep
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pubqrator",
3 | "private": true,
4 | "dependencies": {}
5 | }
6 |
--------------------------------------------------------------------------------
/public/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/public/android-chrome-192x192.png
--------------------------------------------------------------------------------
/public/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/public/android-chrome-512x512.png
--------------------------------------------------------------------------------
/public/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/public/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/public/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/public/favicon-16x16.png
--------------------------------------------------------------------------------
/public/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/public/favicon-32x32.png
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/public/favicon.ico
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 |
--------------------------------------------------------------------------------
/public/site.webmanifest:
--------------------------------------------------------------------------------
1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
--------------------------------------------------------------------------------
/public/sitemap.xml.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/public/sitemap.xml.gz
--------------------------------------------------------------------------------
/scripts/apikey:
--------------------------------------------------------------------------------
1 | << REPLACE YOUR OWN API KEY >>
--------------------------------------------------------------------------------
/tmp/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/tmp/.keep
--------------------------------------------------------------------------------
/vendor/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ncbi-nlp/TeamTat/b6133f19fbf9fdb28b5dc1d2a3da87b774220d51/vendor/.keep
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015"]
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "date-fns",
3 | "version": "1.30.1",
4 | "homepage": "https://github.com/date-fns/date-fns",
5 | "authors": [
6 | "Sasha Koss "
7 | ],
8 | "description": "Modern JavaScript date utility library",
9 | "main": "dist/date_fns.js",
10 | "license": "MIT",
11 | "ignore": [
12 | "config",
13 | "docs",
14 | "node_modules",
15 | "scripts",
16 | "src",
17 | "tmp",
18 | "index.js",
19 | "package.json",
20 | "test.js",
21 | "VERSION"
22 | ],
23 | "_release": "1.30.1",
24 | "_resolution": {
25 | "type": "version",
26 | "tag": "v1.30.1",
27 | "commit": "f46a33d5052d5aa24322c00603eb69fe6989cf5e"
28 | },
29 | "_source": "https://github.com/date-fns/date-fns.git",
30 | "_target": "^1.30.1",
31 | "_originalSource": "date-fns",
32 | "_direct": true
33 | }
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | insert_final_newline = true
5 | charset = utf-8
6 | trim_trailing_whitespace = true
7 | end_of_line = lf
8 |
9 | [*.{js,json}]
10 | indent_style = space
11 | indent_size = 2
12 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | .*node_modules*
3 | [options]
4 | suppress_comment= \\(.\\|\n\\)*\\$ExpectedMistake
5 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | npm-debug.log
3 | tmp
4 | dist/compressed
5 | test.espowered.js
6 | .envrc
7 | .idea/
8 | .vscode
9 | examples/*/dist
10 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/LICENSE.md:
--------------------------------------------------------------------------------
1 | # License
2 |
3 | date-fns is licensed under the [MIT license](http://kossnocorp.mit-license.org).
4 | Read more about MIT at [TLDRLegal](https://tldrlegal.com/license/mit-license).
5 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/benchmark.js:
--------------------------------------------------------------------------------
1 | var testsContext = require.context('./src/', true, /\/benchmark\.js$/)
2 | testsContext.keys().forEach(testsContext)
3 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/flow-typed/benchmark.js.flow:
--------------------------------------------------------------------------------
1 | // @flow
2 | declare var suite: (description: string, spec: () => void, options?: Object) => void
3 | declare var benchmark: (description: string, spec: () => any) => void
4 | declare module 'moment' {
5 | declare module.exports: (value: any, message?: string) => void
6 | }
7 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/flow-typed/mocha.js.flow:
--------------------------------------------------------------------------------
1 | // @flow
2 | declare var describe: (description: string, spec: () => void) => void
3 | declare var it: (description: string, spec: () => void) => void
4 | declare var context: (description: string, spec: () => void) => void
5 | declare var beforeEach: (action: () => void) => void
6 | declare var afterEach: (action: () => void) => void
7 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/flow-typed/power-assert.js.flow:
--------------------------------------------------------------------------------
1 | declare module 'power-assert' {
2 | declare module.exports: (value: any, message?: string) => void
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/flow-typed/sinon.js.flow:
--------------------------------------------------------------------------------
1 | // @flow
2 | declare var sinon: any
3 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/date-fns/testWithoutLocales.js:
--------------------------------------------------------------------------------
1 | var testsContext = require.context('./src/', true, /\/test\.js$/)
2 | testsContext
3 | .keys()
4 | .filter(function (test) {
5 | return !test.match(/\.\/locale\//)
6 | })
7 | .forEach(testsContext)
8 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/handlebars/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "handlebars",
3 | "version": "4.1.2",
4 | "main": "handlebars.js",
5 | "license": "MIT",
6 | "dependencies": {},
7 | "homepage": "https://github.com/components/handlebars.js",
8 | "_release": "4.1.2",
9 | "_resolution": {
10 | "type": "version",
11 | "tag": "v4.1.2",
12 | "commit": "3aa343ec5ef92534b4de8b5db585d2e60b720a3e"
13 | },
14 | "_source": "https://github.com/components/handlebars.js.git",
15 | "_target": "^4.1.2",
16 | "_originalSource": "handlebars"
17 | }
--------------------------------------------------------------------------------
/vendor/assets/bower_components/handlebars/.gitignore:
--------------------------------------------------------------------------------
1 | vendor
2 | composer.lock
3 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/handlebars/README.md:
--------------------------------------------------------------------------------
1 | Handlebars.js
2 | =============
3 |
4 | Shim repository for [Handlebars.js](http://handlebarsjs.com).
5 |
6 | Package Managers
7 | ----------------
8 |
9 | * [Bower](http://twitter.github.com/bower/): `handlebars`
10 | * [Component](http://github.com/component/component): `components/handlebars.js`
11 | * [Composer](http://packagist.org/packages/components/handlebars.js): `components/handlebars.js`
12 | * [jspm](http://jspm.io): `github:components/handlebars.js`
13 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/handlebars/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "handlebars",
3 | "repo": "components/handlebars.js",
4 | "version": "1.0.0",
5 | "main": "handlebars.js",
6 | "scripts": [
7 | "handlebars.js"
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/handlebars/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "components/handlebars.js",
3 | "description": "Handlebars.js and Mustache are both logicless templating languages that keep the view and the code separated like we all know they should be.",
4 | "homepage": "http://handlebarsjs.com",
5 | "license": "MIT",
6 | "type": "component",
7 | "keywords": [
8 | "handlebars",
9 | "mustache",
10 | "html"
11 | ],
12 | "authors": [
13 | {
14 | "name": "Chris Wanstrath",
15 | "homepage": "http://chriswanstrath.com"
16 | }
17 | ],
18 | "require": {
19 | "robloach/component-installer": "*"
20 | },
21 | "extra": {
22 | "component": {
23 | "name": "handlebars",
24 | "scripts": [
25 | "handlebars.js"
26 | ],
27 | "files": [
28 | "handlebars.runtime.js"
29 | ],
30 | "shim": {
31 | "exports": "Handlebars"
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/handlebars/handlebars-source.gemspec:
--------------------------------------------------------------------------------
1 | # -*- encoding: utf-8 -*-
2 | require 'json'
3 |
4 | package = JSON.parse(File.read('bower.json'))
5 |
6 | Gem::Specification.new do |gem|
7 | gem.name = "handlebars-source"
8 | gem.authors = ["Yehuda Katz"]
9 | gem.email = ["wycats@gmail.com"]
10 | gem.date = Time.now.strftime("%Y-%m-%d")
11 | gem.description = %q{Handlebars.js source code wrapper for (pre)compilation gems.}
12 | gem.summary = %q{Handlebars.js source code wrapper}
13 | gem.homepage = "https://github.com/wycats/handlebars.js/"
14 | gem.version = package["version"].sub "-", "."
15 | gem.license = "MIT"
16 |
17 | gem.files = [
18 | 'handlebars.js',
19 | 'handlebars.runtime.js',
20 | 'lib/handlebars/source.rb'
21 | ]
22 | end
23 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/handlebars/handlebars.js.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | handlebars.js
5 | 4.1.2
6 | handlebars.js Authors
7 | https://github.com/wycats/handlebars.js/blob/master/LICENSE
8 | https://github.com/wycats/handlebars.js/
9 | false
10 | Extension of the Mustache logicless template language
11 |
12 | handlebars mustache template html
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/handlebars/lib/handlebars/source.rb:
--------------------------------------------------------------------------------
1 | module Handlebars
2 | module Source
3 | def self.bundled_path
4 | File.expand_path("../../../handlebars.js", __FILE__)
5 | end
6 |
7 | def self.runtime_bundled_path
8 | File.expand_path("../../../handlebars.runtime.js", __FILE__)
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/handlebars/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "handlebars",
3 | "version": "4.1.2",
4 | "license": "MIT",
5 | "jspm": {
6 | "main": "handlebars",
7 | "shim": {
8 | "handlebars": {
9 | "exports": "Handlebars"
10 | }
11 | },
12 | "files": [
13 | "handlebars.js",
14 | "handlebars.runtime.js"
15 | ],
16 | "buildConfig": {
17 | "minify": true
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "moment",
3 | "license": "MIT",
4 | "main": "moment.js",
5 | "ignore": [
6 | "**/.*",
7 | "benchmarks",
8 | "bower_components",
9 | "meteor",
10 | "node_modules",
11 | "scripts",
12 | "tasks",
13 | "test",
14 | "component.json",
15 | "composer.json",
16 | "CONTRIBUTING.md",
17 | "ender.js",
18 | "Gruntfile.js",
19 | "Moment.js.nuspec",
20 | "package.js",
21 | "package.json",
22 | "ISSUE_TEMPLATE.md",
23 | "typing-tests",
24 | "min/tests.js"
25 | ],
26 | "homepage": "https://github.com/moment/moment",
27 | "version": "2.24.0",
28 | "_release": "2.24.0",
29 | "_resolution": {
30 | "type": "version",
31 | "tag": "2.24.0",
32 | "commit": "8a6b2e11207a3856bd858d4d65d4b0822571e6c3"
33 | },
34 | "_source": "https://github.com/moment/moment.git",
35 | "_target": "^2.24.0",
36 | "_originalSource": "moment",
37 | "_direct": true
38 | }
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) JS Foundation and other contributors
2 |
3 | Permission is hereby granted, free of charge, to any person
4 | obtaining a copy of this software and associated documentation
5 | files (the "Software"), to deal in the Software without
6 | restriction, including without limitation the rights to use,
7 | copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the
9 | Software is furnished to do so, subject to the following
10 | conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/create/date-from-array.js:
--------------------------------------------------------------------------------
1 | export function createDate (y, m, d, h, M, s, ms) {
2 | // can't just apply() to create a date:
3 | // https://stackoverflow.com/q/181348
4 | var date;
5 | // the date constructor remaps years 0-99 to 1900-1999
6 | if (y < 100 && y >= 0) {
7 | // preserve leap years using a full 400 year cycle, then reset
8 | date = new Date(y + 400, m, d, h, M, s, ms);
9 | if (isFinite(date.getFullYear())) {
10 | date.setFullYear(y);
11 | }
12 | } else {
13 | date = new Date(y, m, d, h, M, s, ms);
14 | }
15 |
16 | return date;
17 | }
18 |
19 | export function createUTCDate (y) {
20 | var date;
21 | // the Date.UTC function remaps years 0-99 to 1900-1999
22 | if (y < 100 && y >= 0) {
23 | var args = Array.prototype.slice.call(arguments);
24 | // preserve leap years using a full 400 year cycle, then reset
25 | args[0] = y + 400;
26 | date = new Date(Date.UTC.apply(null, args));
27 | if (isFinite(date.getUTCFullYear())) {
28 | date.setUTCFullYear(y);
29 | }
30 | } else {
31 | date = new Date(Date.UTC.apply(null, arguments));
32 | }
33 |
34 | return date;
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/create/from-object.js:
--------------------------------------------------------------------------------
1 | import { normalizeObjectUnits } from '../units/aliases';
2 | import { configFromArray } from './from-array';
3 | import map from '../utils/map';
4 |
5 | export function configFromObject(config) {
6 | if (config._d) {
7 | return;
8 | }
9 |
10 | var i = normalizeObjectUnits(config._i);
11 | config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
12 | return obj && parseInt(obj, 10);
13 | });
14 |
15 | configFromArray(config);
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/create/local.js:
--------------------------------------------------------------------------------
1 | import { createLocalOrUTC } from './from-anything';
2 |
3 | export function createLocal (input, format, locale, strict) {
4 | return createLocalOrUTC(input, format, locale, strict, false);
5 | }
6 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/create/parsing-flags.js:
--------------------------------------------------------------------------------
1 | function defaultParsingFlags() {
2 | // We need to deep clone this object.
3 | return {
4 | empty : false,
5 | unusedTokens : [],
6 | unusedInput : [],
7 | overflow : -2,
8 | charsLeftOver : 0,
9 | nullInput : false,
10 | invalidMonth : null,
11 | invalidFormat : false,
12 | userInvalidated : false,
13 | iso : false,
14 | parsedDateParts : [],
15 | meridiem : null,
16 | rfc2822 : false,
17 | weekdayMismatch : false
18 | };
19 | }
20 |
21 | export default function getParsingFlags(m) {
22 | if (m._pf == null) {
23 | m._pf = defaultParsingFlags();
24 | }
25 | return m._pf;
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/create/utc.js:
--------------------------------------------------------------------------------
1 | import { createLocalOrUTC } from './from-anything';
2 |
3 | export function createUTC (input, format, locale, strict) {
4 | return createLocalOrUTC(input, format, locale, strict, true).utc();
5 | }
6 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/duration/abs.js:
--------------------------------------------------------------------------------
1 | var mathAbs = Math.abs;
2 |
3 | export function abs () {
4 | var data = this._data;
5 |
6 | this._milliseconds = mathAbs(this._milliseconds);
7 | this._days = mathAbs(this._days);
8 | this._months = mathAbs(this._months);
9 |
10 | data.milliseconds = mathAbs(data.milliseconds);
11 | data.seconds = mathAbs(data.seconds);
12 | data.minutes = mathAbs(data.minutes);
13 | data.hours = mathAbs(data.hours);
14 | data.months = mathAbs(data.months);
15 | data.years = mathAbs(data.years);
16 |
17 | return this;
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/duration/add-subtract.js:
--------------------------------------------------------------------------------
1 | import { createDuration } from './create';
2 |
3 | function addSubtract (duration, input, value, direction) {
4 | var other = createDuration(input, value);
5 |
6 | duration._milliseconds += direction * other._milliseconds;
7 | duration._days += direction * other._days;
8 | duration._months += direction * other._months;
9 |
10 | return duration._bubble();
11 | }
12 |
13 | // supports only 2.0-style add(1, 's') or add(duration)
14 | export function add (input, value) {
15 | return addSubtract(this, input, value, 1);
16 | }
17 |
18 | // supports only 2.0-style subtract(1, 's') or subtract(duration)
19 | export function subtract (input, value) {
20 | return addSubtract(this, input, value, -1);
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/duration/clone.js:
--------------------------------------------------------------------------------
1 | import { createDuration } from './create';
2 |
3 | export function clone () {
4 | return createDuration(this);
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/duration/duration.js:
--------------------------------------------------------------------------------
1 | // Side effect imports
2 | import './prototype';
3 |
4 | import { createDuration } from './create';
5 | import { isDuration } from './constructor';
6 | import {
7 | getSetRelativeTimeRounding,
8 | getSetRelativeTimeThreshold
9 | } from './humanize';
10 |
11 | export {
12 | createDuration,
13 | isDuration,
14 | getSetRelativeTimeRounding,
15 | getSetRelativeTimeThreshold
16 | };
17 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/duration/get.js:
--------------------------------------------------------------------------------
1 | import { normalizeUnits } from '../units/aliases';
2 | import absFloor from '../utils/abs-floor';
3 |
4 | export function get (units) {
5 | units = normalizeUnits(units);
6 | return this.isValid() ? this[units + 's']() : NaN;
7 | }
8 |
9 | function makeGetter(name) {
10 | return function () {
11 | return this.isValid() ? this._data[name] : NaN;
12 | };
13 | }
14 |
15 | export var milliseconds = makeGetter('milliseconds');
16 | export var seconds = makeGetter('seconds');
17 | export var minutes = makeGetter('minutes');
18 | export var hours = makeGetter('hours');
19 | export var days = makeGetter('days');
20 | export var months = makeGetter('months');
21 | export var years = makeGetter('years');
22 |
23 | export function weeks () {
24 | return absFloor(this.days() / 7);
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/duration/valid.js:
--------------------------------------------------------------------------------
1 | import toInt from '../utils/to-int';
2 | import indexOf from '../utils/index-of';
3 | import {Duration} from './constructor';
4 | import {createDuration} from './create';
5 |
6 | var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
7 |
8 | export default function isDurationValid(m) {
9 | for (var key in m) {
10 | if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
11 | return false;
12 | }
13 | }
14 |
15 | var unitHasDecimal = false;
16 | for (var i = 0; i < ordering.length; ++i) {
17 | if (m[ordering[i]]) {
18 | if (unitHasDecimal) {
19 | return false; // only allow non-integers for smallest unit
20 | }
21 | if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
22 | unitHasDecimal = true;
23 | }
24 | }
25 | }
26 |
27 | return true;
28 | }
29 |
30 | export function isValid() {
31 | return this._isValid;
32 | }
33 |
34 | export function createInvalid() {
35 | return createDuration(NaN);
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/locale/base-config.js:
--------------------------------------------------------------------------------
1 | import { defaultCalendar } from './calendar';
2 | import { defaultLongDateFormat } from './formats';
3 | import { defaultInvalidDate } from './invalid';
4 | import { defaultOrdinal, defaultDayOfMonthOrdinalParse } from './ordinal';
5 | import { defaultRelativeTime } from './relative';
6 |
7 | // months
8 | import {
9 | defaultLocaleMonths,
10 | defaultLocaleMonthsShort,
11 | } from '../units/month';
12 |
13 | // week
14 | import { defaultLocaleWeek } from '../units/week';
15 |
16 | // weekdays
17 | import {
18 | defaultLocaleWeekdays,
19 | defaultLocaleWeekdaysMin,
20 | defaultLocaleWeekdaysShort,
21 | } from '../units/day-of-week';
22 |
23 | // meridiem
24 | import { defaultLocaleMeridiemParse } from '../units/hour';
25 |
26 | export var baseConfig = {
27 | calendar: defaultCalendar,
28 | longDateFormat: defaultLongDateFormat,
29 | invalidDate: defaultInvalidDate,
30 | ordinal: defaultOrdinal,
31 | dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
32 | relativeTime: defaultRelativeTime,
33 |
34 | months: defaultLocaleMonths,
35 | monthsShort: defaultLocaleMonthsShort,
36 |
37 | week: defaultLocaleWeek,
38 |
39 | weekdays: defaultLocaleWeekdays,
40 | weekdaysMin: defaultLocaleWeekdaysMin,
41 | weekdaysShort: defaultLocaleWeekdaysShort,
42 |
43 | meridiemParse: defaultLocaleMeridiemParse
44 | };
45 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/locale/calendar.js:
--------------------------------------------------------------------------------
1 | export var defaultCalendar = {
2 | sameDay : '[Today at] LT',
3 | nextDay : '[Tomorrow at] LT',
4 | nextWeek : 'dddd [at] LT',
5 | lastDay : '[Yesterday at] LT',
6 | lastWeek : '[Last] dddd [at] LT',
7 | sameElse : 'L'
8 | };
9 |
10 | import isFunction from '../utils/is-function';
11 |
12 | export function calendar (key, mom, now) {
13 | var output = this._calendar[key] || this._calendar['sameElse'];
14 | return isFunction(output) ? output.call(mom, now) : output;
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/locale/constructor.js:
--------------------------------------------------------------------------------
1 | export function Locale(config) {
2 | if (config != null) {
3 | this.set(config);
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/locale/en.js:
--------------------------------------------------------------------------------
1 | import './prototype';
2 | import { getSetGlobalLocale } from './locales';
3 | import toInt from '../utils/to-int';
4 |
5 | getSetGlobalLocale('en', {
6 | dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
7 | ordinal : function (number) {
8 | var b = number % 10,
9 | output = (toInt(number % 100 / 10) === 1) ? 'th' :
10 | (b === 1) ? 'st' :
11 | (b === 2) ? 'nd' :
12 | (b === 3) ? 'rd' : 'th';
13 | return number + output;
14 | }
15 | });
16 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/locale/formats.js:
--------------------------------------------------------------------------------
1 | export var defaultLongDateFormat = {
2 | LTS : 'h:mm:ss A',
3 | LT : 'h:mm A',
4 | L : 'MM/DD/YYYY',
5 | LL : 'MMMM D, YYYY',
6 | LLL : 'MMMM D, YYYY h:mm A',
7 | LLLL : 'dddd, MMMM D, YYYY h:mm A'
8 | };
9 |
10 | export function longDateFormat (key) {
11 | var format = this._longDateFormat[key],
12 | formatUpper = this._longDateFormat[key.toUpperCase()];
13 |
14 | if (format || !formatUpper) {
15 | return format;
16 | }
17 |
18 | this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
19 | return val.slice(1);
20 | });
21 |
22 | return this._longDateFormat[key];
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/locale/invalid.js:
--------------------------------------------------------------------------------
1 | export var defaultInvalidDate = 'Invalid date';
2 |
3 | export function invalidDate () {
4 | return this._invalidDate;
5 | }
6 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/locale/locale.js:
--------------------------------------------------------------------------------
1 | // Side effect imports
2 | import './prototype';
3 |
4 | import {
5 | getSetGlobalLocale,
6 | defineLocale,
7 | updateLocale,
8 | getLocale,
9 | listLocales
10 | } from './locales';
11 |
12 | import {
13 | listMonths,
14 | listMonthsShort,
15 | listWeekdays,
16 | listWeekdaysShort,
17 | listWeekdaysMin
18 | } from './lists';
19 |
20 | export {
21 | getSetGlobalLocale,
22 | defineLocale,
23 | updateLocale,
24 | getLocale,
25 | listLocales,
26 | listMonths,
27 | listMonthsShort,
28 | listWeekdays,
29 | listWeekdaysShort,
30 | listWeekdaysMin
31 | };
32 |
33 | import { deprecate } from '../utils/deprecate';
34 | import { hooks } from '../utils/hooks';
35 |
36 | hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
37 | hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
38 |
39 | import './en';
40 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/locale/ordinal.js:
--------------------------------------------------------------------------------
1 | export var defaultOrdinal = '%d';
2 | export var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
3 |
4 | export function ordinal (number) {
5 | return this._ordinal.replace('%d', number);
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/locale/pre-post-format.js:
--------------------------------------------------------------------------------
1 | export function preParsePostFormat (string) {
2 | return string;
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/locale/relative.js:
--------------------------------------------------------------------------------
1 | export var defaultRelativeTime = {
2 | future : 'in %s',
3 | past : '%s ago',
4 | s : 'a few seconds',
5 | ss : '%d seconds',
6 | m : 'a minute',
7 | mm : '%d minutes',
8 | h : 'an hour',
9 | hh : '%d hours',
10 | d : 'a day',
11 | dd : '%d days',
12 | M : 'a month',
13 | MM : '%d months',
14 | y : 'a year',
15 | yy : '%d years'
16 | };
17 |
18 | import isFunction from '../utils/is-function';
19 |
20 | export function relativeTime (number, withoutSuffix, string, isFuture) {
21 | var output = this._relativeTime[string];
22 | return (isFunction(output)) ?
23 | output(number, withoutSuffix, string, isFuture) :
24 | output.replace(/%d/i, number);
25 | }
26 |
27 | export function pastFuture (diff, output) {
28 | var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
29 | return isFunction(format) ? format(output) : format.replace(/%s/i, output);
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/moment/calendar.js:
--------------------------------------------------------------------------------
1 | import { createLocal } from '../create/local';
2 | import { cloneWithOffset } from '../units/offset';
3 | import isFunction from '../utils/is-function';
4 | import { hooks } from '../utils/hooks';
5 |
6 | export function getCalendarFormat(myMoment, now) {
7 | var diff = myMoment.diff(now, 'days', true);
8 | return diff < -6 ? 'sameElse' :
9 | diff < -1 ? 'lastWeek' :
10 | diff < 0 ? 'lastDay' :
11 | diff < 1 ? 'sameDay' :
12 | diff < 2 ? 'nextDay' :
13 | diff < 7 ? 'nextWeek' : 'sameElse';
14 | }
15 |
16 | export function calendar (time, formats) {
17 | // We want to compare the start of today, vs this.
18 | // Getting start-of-today depends on whether we're local/utc/offset or not.
19 | var now = time || createLocal(),
20 | sod = cloneWithOffset(now, this).startOf('day'),
21 | format = hooks.calendarFormat(this, sod) || 'sameElse';
22 |
23 | var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
24 |
25 | return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/moment/clone.js:
--------------------------------------------------------------------------------
1 | import { Moment } from './constructor';
2 |
3 | export function clone () {
4 | return new Moment(this);
5 | }
6 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/moment/creation-data.js:
--------------------------------------------------------------------------------
1 | export function creationData() {
2 | return {
3 | input: this._i,
4 | format: this._f,
5 | locale: this._locale,
6 | isUTC: this._isUTC,
7 | strict: this._strict
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/moment/from.js:
--------------------------------------------------------------------------------
1 | import { createDuration } from '../duration/create';
2 | import { createLocal } from '../create/local';
3 | import { isMoment } from '../moment/constructor';
4 |
5 | export function from (time, withoutSuffix) {
6 | if (this.isValid() &&
7 | ((isMoment(time) && time.isValid()) ||
8 | createLocal(time).isValid())) {
9 | return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
10 | } else {
11 | return this.localeData().invalidDate();
12 | }
13 | }
14 |
15 | export function fromNow (withoutSuffix) {
16 | return this.from(createLocal(), withoutSuffix);
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/moment/locale.js:
--------------------------------------------------------------------------------
1 | import { getLocale } from '../locale/locales';
2 | import { deprecate } from '../utils/deprecate';
3 |
4 | // If passed a locale key, it will set the locale for this
5 | // instance. Otherwise, it will return the locale configuration
6 | // variables for this instance.
7 | export function locale (key) {
8 | var newLocaleData;
9 |
10 | if (key === undefined) {
11 | return this._locale._abbr;
12 | } else {
13 | newLocaleData = getLocale(key);
14 | if (newLocaleData != null) {
15 | this._locale = newLocaleData;
16 | }
17 | return this;
18 | }
19 | }
20 |
21 | export var lang = deprecate(
22 | 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
23 | function (key) {
24 | if (key === undefined) {
25 | return this.localeData();
26 | } else {
27 | return this.locale(key);
28 | }
29 | }
30 | );
31 |
32 | export function localeData () {
33 | return this._locale;
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/moment/moment.js:
--------------------------------------------------------------------------------
1 | import { createLocal } from '../create/local';
2 | import { createUTC } from '../create/utc';
3 | import { createInvalid } from '../create/valid';
4 | import { isMoment } from './constructor';
5 | import { min, max } from './min-max';
6 | import { now } from './now';
7 | import momentPrototype from './prototype';
8 |
9 | function createUnix (input) {
10 | return createLocal(input * 1000);
11 | }
12 |
13 | function createInZone () {
14 | return createLocal.apply(null, arguments).parseZone();
15 | }
16 |
17 | export {
18 | now,
19 | min,
20 | max,
21 | isMoment,
22 | createUTC,
23 | createUnix,
24 | createLocal,
25 | createInZone,
26 | createInvalid,
27 | momentPrototype
28 | };
29 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/moment/now.js:
--------------------------------------------------------------------------------
1 | export var now = function () {
2 | return Date.now ? Date.now() : +(new Date());
3 | };
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/moment/to-type.js:
--------------------------------------------------------------------------------
1 | export function valueOf () {
2 | return this._d.valueOf() - ((this._offset || 0) * 60000);
3 | }
4 |
5 | export function unix () {
6 | return Math.floor(this.valueOf() / 1000);
7 | }
8 |
9 | export function toDate () {
10 | return new Date(this.valueOf());
11 | }
12 |
13 | export function toArray () {
14 | var m = this;
15 | return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
16 | }
17 |
18 | export function toObject () {
19 | var m = this;
20 | return {
21 | years: m.year(),
22 | months: m.month(),
23 | date: m.date(),
24 | hours: m.hours(),
25 | minutes: m.minutes(),
26 | seconds: m.seconds(),
27 | milliseconds: m.milliseconds()
28 | };
29 | }
30 |
31 | export function toJSON () {
32 | // new Date(NaN).toJSON() === null
33 | return this.isValid() ? this.toISOString() : null;
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/moment/to.js:
--------------------------------------------------------------------------------
1 | import { createDuration } from '../duration/create';
2 | import { createLocal } from '../create/local';
3 | import { isMoment } from '../moment/constructor';
4 |
5 | export function to (time, withoutSuffix) {
6 | if (this.isValid() &&
7 | ((isMoment(time) && time.isValid()) ||
8 | createLocal(time).isValid())) {
9 | return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
10 | } else {
11 | return this.localeData().invalidDate();
12 | }
13 | }
14 |
15 | export function toNow (withoutSuffix) {
16 | return this.to(createLocal(), withoutSuffix);
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/moment/valid.js:
--------------------------------------------------------------------------------
1 | import { isValid as _isValid } from '../create/valid';
2 | import extend from '../utils/extend';
3 | import getParsingFlags from '../create/parsing-flags';
4 |
5 | export function isValid () {
6 | return _isValid(this);
7 | }
8 |
9 | export function parsingFlags () {
10 | return extend({}, getParsingFlags(this));
11 | }
12 |
13 | export function invalidAt () {
14 | return getParsingFlags(this).overflow;
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/parse/token.js:
--------------------------------------------------------------------------------
1 | import hasOwnProp from '../utils/has-own-prop';
2 | import isNumber from '../utils/is-number';
3 | import toInt from '../utils/to-int';
4 |
5 | var tokens = {};
6 |
7 | export function addParseToken (token, callback) {
8 | var i, func = callback;
9 | if (typeof token === 'string') {
10 | token = [token];
11 | }
12 | if (isNumber(callback)) {
13 | func = function (input, array) {
14 | array[callback] = toInt(input);
15 | };
16 | }
17 | for (i = 0; i < token.length; i++) {
18 | tokens[token[i]] = func;
19 | }
20 | }
21 |
22 | export function addWeekParseToken (token, callback) {
23 | addParseToken(token, function (input, array, config, token) {
24 | config._w = config._w || {};
25 | callback(input, config._w, config, token);
26 | });
27 | }
28 |
29 | export function addTimeToArrayFromToken(token, input, config) {
30 | if (input != null && hasOwnProp(tokens, token)) {
31 | tokens[token](input, config._a, config, token);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/aliases.js:
--------------------------------------------------------------------------------
1 | import hasOwnProp from '../utils/has-own-prop';
2 |
3 | var aliases = {};
4 |
5 | export function addUnitAlias (unit, shorthand) {
6 | var lowerCase = unit.toLowerCase();
7 | aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
8 | }
9 |
10 | export function normalizeUnits(units) {
11 | return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
12 | }
13 |
14 | export function normalizeObjectUnits(inputObject) {
15 | var normalizedInput = {},
16 | normalizedProp,
17 | prop;
18 |
19 | for (prop in inputObject) {
20 | if (hasOwnProp(inputObject, prop)) {
21 | normalizedProp = normalizeUnits(prop);
22 | if (normalizedProp) {
23 | normalizedInput[normalizedProp] = inputObject[prop];
24 | }
25 | }
26 | }
27 |
28 | return normalizedInput;
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/constants.js:
--------------------------------------------------------------------------------
1 | export var YEAR = 0;
2 | export var MONTH = 1;
3 | export var DATE = 2;
4 | export var HOUR = 3;
5 | export var MINUTE = 4;
6 | export var SECOND = 5;
7 | export var MILLISECOND = 6;
8 | export var WEEK = 7;
9 | export var WEEKDAY = 8;
10 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/day-of-month.js:
--------------------------------------------------------------------------------
1 | import { makeGetSet } from '../moment/get-set';
2 | import { addFormatToken } from '../format/format';
3 | import { addUnitAlias } from './aliases';
4 | import { addUnitPriority } from './priorities';
5 | import { addRegexToken, match1to2, match2 } from '../parse/regex';
6 | import { addParseToken } from '../parse/token';
7 | import { DATE } from './constants';
8 | import toInt from '../utils/to-int';
9 |
10 | // FORMATTING
11 |
12 | addFormatToken('D', ['DD', 2], 'Do', 'date');
13 |
14 | // ALIASES
15 |
16 | addUnitAlias('date', 'D');
17 |
18 | // PRIORITY
19 | addUnitPriority('date', 9);
20 |
21 | // PARSING
22 |
23 | addRegexToken('D', match1to2);
24 | addRegexToken('DD', match1to2, match2);
25 | addRegexToken('Do', function (isStrict, locale) {
26 | // TODO: Remove "ordinalParse" fallback in next major release.
27 | return isStrict ?
28 | (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
29 | locale._dayOfMonthOrdinalParseLenient;
30 | });
31 |
32 | addParseToken(['D', 'DD'], DATE);
33 | addParseToken('Do', function (input, array) {
34 | array[DATE] = toInt(input.match(match1to2)[0]);
35 | });
36 |
37 | // MOMENTS
38 |
39 | export var getSetDayOfMonth = makeGetSet('Date', true);
40 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/day-of-year.js:
--------------------------------------------------------------------------------
1 | import { addFormatToken } from '../format/format';
2 | import { addUnitAlias } from './aliases';
3 | import { addUnitPriority } from './priorities';
4 | import { addRegexToken, match3, match1to3 } from '../parse/regex';
5 | import { daysInYear } from './year';
6 | import { createUTCDate } from '../create/date-from-array';
7 | import { addParseToken } from '../parse/token';
8 | import toInt from '../utils/to-int';
9 |
10 | // FORMATTING
11 |
12 | addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
13 |
14 | // ALIASES
15 |
16 | addUnitAlias('dayOfYear', 'DDD');
17 |
18 | // PRIORITY
19 | addUnitPriority('dayOfYear', 4);
20 |
21 | // PARSING
22 |
23 | addRegexToken('DDD', match1to3);
24 | addRegexToken('DDDD', match3);
25 | addParseToken(['DDD', 'DDDD'], function (input, array, config) {
26 | config._dayOfYear = toInt(input);
27 | });
28 |
29 | // HELPERS
30 |
31 | // MOMENTS
32 |
33 | export function getSetDayOfYear (input) {
34 | var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
35 | return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/minute.js:
--------------------------------------------------------------------------------
1 | import { makeGetSet } from '../moment/get-set';
2 | import { addFormatToken } from '../format/format';
3 | import { addUnitAlias } from './aliases';
4 | import { addUnitPriority } from './priorities';
5 | import { addRegexToken, match1to2, match2 } from '../parse/regex';
6 | import { addParseToken } from '../parse/token';
7 | import { MINUTE } from './constants';
8 |
9 | // FORMATTING
10 |
11 | addFormatToken('m', ['mm', 2], 0, 'minute');
12 |
13 | // ALIASES
14 |
15 | addUnitAlias('minute', 'm');
16 |
17 | // PRIORITY
18 |
19 | addUnitPriority('minute', 14);
20 |
21 | // PARSING
22 |
23 | addRegexToken('m', match1to2);
24 | addRegexToken('mm', match1to2, match2);
25 | addParseToken(['m', 'mm'], MINUTE);
26 |
27 | // MOMENTS
28 |
29 | export var getSetMinute = makeGetSet('Minutes', false);
30 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/priorities.js:
--------------------------------------------------------------------------------
1 | var priorities = {};
2 |
3 | export function addUnitPriority(unit, priority) {
4 | priorities[unit] = priority;
5 | }
6 |
7 | export function getPrioritizedUnits(unitsObj) {
8 | var units = [];
9 | for (var u in unitsObj) {
10 | units.push({unit: u, priority: priorities[u]});
11 | }
12 | units.sort(function (a, b) {
13 | return a.priority - b.priority;
14 | });
15 | return units;
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/quarter.js:
--------------------------------------------------------------------------------
1 | import { addFormatToken } from '../format/format';
2 | import { addUnitAlias } from './aliases';
3 | import { addUnitPriority } from './priorities';
4 | import { addRegexToken, match1 } from '../parse/regex';
5 | import { addParseToken } from '../parse/token';
6 | import { MONTH } from './constants';
7 | import toInt from '../utils/to-int';
8 |
9 | // FORMATTING
10 |
11 | addFormatToken('Q', 0, 'Qo', 'quarter');
12 |
13 | // ALIASES
14 |
15 | addUnitAlias('quarter', 'Q');
16 |
17 | // PRIORITY
18 |
19 | addUnitPriority('quarter', 7);
20 |
21 | // PARSING
22 |
23 | addRegexToken('Q', match1);
24 | addParseToken('Q', function (input, array) {
25 | array[MONTH] = (toInt(input) - 1) * 3;
26 | });
27 |
28 | // MOMENTS
29 |
30 | export function getSetQuarter (input) {
31 | return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/second.js:
--------------------------------------------------------------------------------
1 | import { makeGetSet } from '../moment/get-set';
2 | import { addFormatToken } from '../format/format';
3 | import { addUnitAlias } from './aliases';
4 | import { addUnitPriority } from './priorities';
5 | import { addRegexToken, match1to2, match2 } from '../parse/regex';
6 | import { addParseToken } from '../parse/token';
7 | import { SECOND } from './constants';
8 |
9 | // FORMATTING
10 |
11 | addFormatToken('s', ['ss', 2], 0, 'second');
12 |
13 | // ALIASES
14 |
15 | addUnitAlias('second', 's');
16 |
17 | // PRIORITY
18 |
19 | addUnitPriority('second', 15);
20 |
21 | // PARSING
22 |
23 | addRegexToken('s', match1to2);
24 | addRegexToken('ss', match1to2, match2);
25 | addParseToken(['s', 'ss'], SECOND);
26 |
27 | // MOMENTS
28 |
29 | export var getSetSecond = makeGetSet('Seconds', false);
30 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/timestamp.js:
--------------------------------------------------------------------------------
1 | import { addFormatToken } from '../format/format';
2 | import { addRegexToken, matchTimestamp, matchSigned } from '../parse/regex';
3 | import { addParseToken } from '../parse/token';
4 | import toInt from '../utils/to-int';
5 |
6 | // FORMATTING
7 |
8 | addFormatToken('X', 0, 0, 'unix');
9 | addFormatToken('x', 0, 0, 'valueOf');
10 |
11 | // PARSING
12 |
13 | addRegexToken('x', matchSigned);
14 | addRegexToken('X', matchTimestamp);
15 | addParseToken('X', function (input, array, config) {
16 | config._d = new Date(parseFloat(input, 10) * 1000);
17 | });
18 | addParseToken('x', function (input, array, config) {
19 | config._d = new Date(toInt(input));
20 | });
21 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/timezone.js:
--------------------------------------------------------------------------------
1 | import { addFormatToken } from '../format/format';
2 |
3 | // FORMATTING
4 |
5 | addFormatToken('z', 0, 0, 'zoneAbbr');
6 | addFormatToken('zz', 0, 0, 'zoneName');
7 |
8 | // MOMENTS
9 |
10 | export function getZoneAbbr () {
11 | return this._isUTC ? 'UTC' : '';
12 | }
13 |
14 | export function getZoneName () {
15 | return this._isUTC ? 'Coordinated Universal Time' : '';
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/units/units.js:
--------------------------------------------------------------------------------
1 | // Side effect imports
2 | import './day-of-month';
3 | import './day-of-week';
4 | import './day-of-year';
5 | import './hour';
6 | import './millisecond';
7 | import './minute';
8 | import './month';
9 | import './offset';
10 | import './quarter';
11 | import './second';
12 | import './timestamp';
13 | import './timezone';
14 | import './week-year';
15 | import './week';
16 | import './year';
17 |
18 | import { normalizeUnits } from './aliases';
19 |
20 | export { normalizeUnits };
21 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/abs-ceil.js:
--------------------------------------------------------------------------------
1 | export default function absCeil (number) {
2 | if (number < 0) {
3 | return Math.floor(number);
4 | } else {
5 | return Math.ceil(number);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/abs-floor.js:
--------------------------------------------------------------------------------
1 | export default function absFloor (number) {
2 | if (number < 0) {
3 | // -0 -> 0
4 | return Math.ceil(number) || 0;
5 | } else {
6 | return Math.floor(number);
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/abs-round.js:
--------------------------------------------------------------------------------
1 | export default function absRound (number) {
2 | if (number < 0) {
3 | return Math.round(-1 * number) * -1;
4 | } else {
5 | return Math.round(number);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/compare-arrays.js:
--------------------------------------------------------------------------------
1 | import toInt from './to-int';
2 |
3 | // compare two arrays, return the number of differences
4 | export default function compareArrays(array1, array2, dontConvert) {
5 | var len = Math.min(array1.length, array2.length),
6 | lengthDiff = Math.abs(array1.length - array2.length),
7 | diffs = 0,
8 | i;
9 | for (i = 0; i < len; i++) {
10 | if ((dontConvert && array1[i] !== array2[i]) ||
11 | (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
12 | diffs++;
13 | }
14 | }
15 | return diffs + lengthDiff;
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/defaults.js:
--------------------------------------------------------------------------------
1 | // Pick the first defined of two or three arguments.
2 | export default function defaults(a, b, c) {
3 | if (a != null) {
4 | return a;
5 | }
6 | if (b != null) {
7 | return b;
8 | }
9 | return c;
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/extend.js:
--------------------------------------------------------------------------------
1 | import hasOwnProp from './has-own-prop';
2 |
3 | export default function extend(a, b) {
4 | for (var i in b) {
5 | if (hasOwnProp(b, i)) {
6 | a[i] = b[i];
7 | }
8 | }
9 |
10 | if (hasOwnProp(b, 'toString')) {
11 | a.toString = b.toString;
12 | }
13 |
14 | if (hasOwnProp(b, 'valueOf')) {
15 | a.valueOf = b.valueOf;
16 | }
17 |
18 | return a;
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/has-own-prop.js:
--------------------------------------------------------------------------------
1 | export default function hasOwnProp(a, b) {
2 | return Object.prototype.hasOwnProperty.call(a, b);
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/hooks.js:
--------------------------------------------------------------------------------
1 | export { hooks, setHookCallback };
2 |
3 | var hookCallback;
4 |
5 | function hooks () {
6 | return hookCallback.apply(null, arguments);
7 | }
8 |
9 | // This is done to register the method called with moment()
10 | // without creating circular dependencies.
11 | function setHookCallback (callback) {
12 | hookCallback = callback;
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/index-of.js:
--------------------------------------------------------------------------------
1 | var indexOf;
2 |
3 | if (Array.prototype.indexOf) {
4 | indexOf = Array.prototype.indexOf;
5 | } else {
6 | indexOf = function (o) {
7 | // I know
8 | var i;
9 | for (i = 0; i < this.length; ++i) {
10 | if (this[i] === o) {
11 | return i;
12 | }
13 | }
14 | return -1;
15 | };
16 | }
17 |
18 | export { indexOf as default };
19 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/is-array.js:
--------------------------------------------------------------------------------
1 | export default function isArray(input) {
2 | return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/is-date.js:
--------------------------------------------------------------------------------
1 | export default function isDate(input) {
2 | return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/is-function.js:
--------------------------------------------------------------------------------
1 | export default function isFunction(input) {
2 | return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/is-number.js:
--------------------------------------------------------------------------------
1 | export default function isNumber(input) {
2 | return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/is-object-empty.js:
--------------------------------------------------------------------------------
1 | export default function isObjectEmpty(obj) {
2 | if (Object.getOwnPropertyNames) {
3 | return (Object.getOwnPropertyNames(obj).length === 0);
4 | } else {
5 | var k;
6 | for (k in obj) {
7 | if (obj.hasOwnProperty(k)) {
8 | return false;
9 | }
10 | }
11 | return true;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/is-object.js:
--------------------------------------------------------------------------------
1 | export default function isObject(input) {
2 | // IE8 will treat undefined and null as object if it wasn't for
3 | // input != null
4 | return input != null && Object.prototype.toString.call(input) === '[object Object]';
5 | }
6 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/is-undefined.js:
--------------------------------------------------------------------------------
1 | export default function isUndefined(input) {
2 | return input === void 0;
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/keys.js:
--------------------------------------------------------------------------------
1 | import hasOwnProp from './has-own-prop';
2 |
3 | var keys;
4 |
5 | if (Object.keys) {
6 | keys = Object.keys;
7 | } else {
8 | keys = function (obj) {
9 | var i, res = [];
10 | for (i in obj) {
11 | if (hasOwnProp(obj, i)) {
12 | res.push(i);
13 | }
14 | }
15 | return res;
16 | };
17 | }
18 |
19 | export { keys as default };
20 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/map.js:
--------------------------------------------------------------------------------
1 | export default function map(arr, fn) {
2 | var res = [], i;
3 | for (i = 0; i < arr.length; ++i) {
4 | res.push(fn(arr[i], i));
5 | }
6 | return res;
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/mod.js:
--------------------------------------------------------------------------------
1 | export default function mod(n, x) {
2 | return ((n % x) + x) % x;
3 | }
4 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/some.js:
--------------------------------------------------------------------------------
1 | var some;
2 | if (Array.prototype.some) {
3 | some = Array.prototype.some;
4 | } else {
5 | some = function (fun) {
6 | var t = Object(this);
7 | var len = t.length >>> 0;
8 |
9 | for (var i = 0; i < len; i++) {
10 | if (i in t && fun.call(this, t[i], i, t)) {
11 | return true;
12 | }
13 | }
14 |
15 | return false;
16 | };
17 | }
18 |
19 | export { some as default };
20 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/to-int.js:
--------------------------------------------------------------------------------
1 | import absFloor from './abs-floor';
2 |
3 | export default function toInt(argumentForCoercion) {
4 | var coercedNumber = +argumentForCoercion,
5 | value = 0;
6 |
7 | if (coercedNumber !== 0 && isFinite(coercedNumber)) {
8 | value = absFloor(coercedNumber);
9 | }
10 |
11 | return value;
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/src/lib/utils/zero-fill.js:
--------------------------------------------------------------------------------
1 | export default function zeroFill(number, targetLength, forceSign) {
2 | var absNumber = '' + Math.abs(number),
3 | zerosToFill = targetLength - absNumber.length,
4 | sign = number >= 0;
5 | return (sign ? (forceSign ? '+' : '') : '-') +
6 | Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/templates/default.js:
--------------------------------------------------------------------------------
1 | ;(function (global, factory) {
2 | typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3 | typeof define === 'function' && define.amd ? define(factory) :
4 | global.moment = factory()
5 | }(this, (function () { 'use strict';
6 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/templates/locale-header.js:
--------------------------------------------------------------------------------
1 | ;(function (global, factory) {
2 | typeof exports === 'object' && typeof module !== 'undefined'
3 | && typeof require === 'function' ? factory(require('../moment')) :
4 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
5 | factory(global.moment)
6 | }(this, (function (moment) { 'use strict';
7 |
--------------------------------------------------------------------------------
/vendor/assets/bower_components/moment/templates/test-header.js:
--------------------------------------------------------------------------------
1 | ;(function (global, factory) {
2 | typeof exports === 'object' && typeof module !== 'undefined'
3 | && typeof require === 'function' ? factory(require('../../moment')) :
4 | typeof define === 'function' && define.amd ? define(['../../moment'], factory) :
5 | factory(global.moment)
6 | }(this, (function (moment) { 'use strict';
7 |
--------------------------------------------------------------------------------