Skip to content

Commit

Permalink
Merge pull request pkp#35 from NateWr/i2072_versioning
Browse files Browse the repository at this point in the history
pkp/pkp-lib#2072 Add components for versioning based on new publication entity
  • Loading branch information
NateWr committed Sep 5, 2019
2 parents 1bbd67b + ddf3fd4 commit 5386732
Show file tree
Hide file tree
Showing 100 changed files with 4,641 additions and 737 deletions.
16 changes: 11 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"tinymce": "^4.9.4",
"v-tooltip": "^2.0.2",
"vue": "^2.6.10",
"vue-autosuggest": "^2.0.1",
"vue-color": "^2.7.0",
"vue-router": "^3.0.6",
"vue-scrollto": "^2.15.0",
"vue-slider-component": "^2.8.16",
"vue-tabs-component": "^1.5.0",
"vue2-dropzone": "^3.5.9",
"vuedraggable": "^2.20.0"
},
Expand All @@ -33,6 +33,7 @@
"@vue/cli-service": "^3.7.0",
"@vue/eslint-config-prettier": "^4.0.1",
"babel-eslint": "^10.0.1",
"element-resize-event": "^3.0.3",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.2.2",
"less": "^3.9.0",
Expand Down
44 changes: 24 additions & 20 deletions public/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@ window.pkp = {
* Dummy constants required by components
*/
const: {
ASSOC_TYPE_PRESS: 512,
ASSOC_TYPE_CATEGORY: 525,
ASSOC_TYPE_SECTION: 530,
ASSOC_TYPE_SERIES: 530, // OMP - always matches ASSOC_TYPE_SECTION
REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE: 0,
REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE: 4,
REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE: 6,
REVIEW_ASSIGNMENT_STATUS_ACCEPTED: 5,
REVIEW_ASSIGNMENT_STATUS_RECEIVED: 7,
REVIEW_ASSIGNMENT_STATUS_COMPLETE: 8,
REVIEW_ASSIGNMENT_STATUS_THANKED: 9,
REVIEW_ASSIGNMENT_STATUS_CANCELLED: 10,
REVIEW_ROUND_STATUS_PENDING_REVIEWERS: 6,
REVIEW_ROUND_STATUS_REVIEWS_READY: 8,
REVIEW_ROUND_STATUS_REVIEWS_COMPLETED: 9,
REVIEW_ROUND_STATUS_REVIEWS_OVERDUE: 10,
REVIEW_ROUND_STATUS_REVISIONS_SUBMITTED: 11,
REVIEW_ROUND_STATUS_REVISIONS_REQUESTED: 1,
ROLE_ID_MANAGER: 16,
ROLE_ID_SITE_ADMIN: 1,
ROLE_ID_AUTHOR: 65536,
Expand All @@ -28,30 +46,16 @@ window.pkp = {
ROLE_ID_READER: 1048576,
ROLE_ID_SUB_EDITOR: 17,
ROLE_ID_SUBSCRIPTION_MANAGER: 2097152,
STAGE_STATUS_SUBMISSION_UNASSIGNED: 1,
STATUS_QUEUED: 1,
STATUS_PUBLISHED: 3,
STATUS_DECLINED: 4,
STATUS_SCHEDULED: 5,
WORKFLOW_STAGE_ID_SUBMISSION: 1,
WORKFLOW_STAGE_ID_INTERNAL_REVIEW: 2,
WORKFLOW_STAGE_ID_EXTERNAL_REVIEW: 3,
WORKFLOW_STAGE_ID_EDITING: 4,
WORKFLOW_STAGE_ID_PRODUCTION: 5,
STAGE_STATUS_SUBMISSION_UNASSIGNED: 1,
REVIEW_ROUND_STATUS_PENDING_REVIEWERS: 6,
REVIEW_ROUND_STATUS_REVIEWS_READY: 8,
REVIEW_ROUND_STATUS_REVIEWS_COMPLETED: 9,
REVIEW_ROUND_STATUS_REVIEWS_OVERDUE: 10,
REVIEW_ROUND_STATUS_REVISIONS_SUBMITTED: 11,
REVIEW_ROUND_STATUS_REVISIONS_REQUESTED: 1,
REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE: 0,
REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE: 4,
REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE: 6,
REVIEW_ASSIGNMENT_STATUS_ACCEPTED: 5,
REVIEW_ASSIGNMENT_STATUS_RECEIVED: 7,
REVIEW_ASSIGNMENT_STATUS_COMPLETE: 8,
REVIEW_ASSIGNMENT_STATUS_THANKED: 9,
REVIEW_ASSIGNMENT_STATUS_CANCELLED: 10,
ASSOC_TYPE_PRESS: 512,
ASSOC_TYPE_CATEGORY: 525,
ASSOC_TYPE_SECTION: 530,
ASSOC_TYPE_SERIES: 530 // OMP - always matches ASSOC_TYPE_SECTION
WORKFLOW_STAGE_ID_PRODUCTION: 5
}
};

Expand Down
23 changes: 22 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
StatsContainer
</router-link>
</li>
<li>
<router-link to="/component/WorkflowContainer">
WorkflowContainer
</router-link>
</li>
</nav-group>
<nav-group>
<template slot="heading">
Expand All @@ -47,6 +52,7 @@
<li><router-link to="/component/Button">Button</router-link></li>
<li><router-link to="/component/Chart">Chart</router-link></li>
<li><router-link to="/component/DateRange">DateRange</router-link></li>
<li><router-link to="/component/Dropdown">Dropdown</router-link></li>
<li><router-link to="/component/Filter">Filter</router-link></li>
<li :class="{'-submenuOpen': displaySubmenu('Form')}">
<router-link to="/component/Form">Form</router-link>
Expand All @@ -66,6 +72,11 @@
</li>
</ul>
<ul v-if="displaySubmenu('Form')">
<li>
<router-link to="/component/Form/fields/FieldAutosuggest">
FieldAutosuggest
</router-link>
</li>
<li>
<router-link to="/component/Form/fields/FieldHtml">
FieldHtml
Expand Down Expand Up @@ -123,11 +134,21 @@
FieldColor
</router-link>
</li>
<li>
<router-link to="/component/Form/fields/FieldControlledVocab">
FieldControlledVocab
</router-link>
</li>
<li>
<router-link to="/component/Form/fields/FieldMetadataSetting">
FieldMetadataSetting
</router-link>
</li>
<li>
<router-link to="/component/Form/fields/FieldSelectIssue">
FieldSelectIssue
</router-link>
</li>
<li>
<router-link to="/component/Form/fields/FieldShowEnsuringLink">
FieldShowEnsuringLink
Expand Down Expand Up @@ -156,8 +177,8 @@
</li>
<li><router-link to="/component/Search">Search</router-link></li>
<li><router-link to="/component/Spinner">Spinner</router-link></li>
<li><router-link to="/component/Tab">Tab</router-link></li>
<li><router-link to="/component/Table">Table</router-link></li>
<li><router-link to="/component/Tabs">Tabs</router-link></li>
<li><router-link to="/component/Tooltip">Tooltip</router-link></li>
</nav-group>
</nav>
Expand Down
36 changes: 35 additions & 1 deletion src/components/Badge/Badge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,24 @@
<script>
export default {
name: 'Badge',
props: ['label', 'isPrimary', 'isWarnable', 'isButton', 'hasDot', 'stage'],
props: [
'label',
'isPrimary',
'isSuccess',
'isWarnable',
'isButton',
'hasDot',
'stage'
],
computed: {
classes() {
let classes = [];
if (this.isPrimary) {
classes.push('pkpBadge--isPrimary');
}
if (this.isSuccess) {
classes.push('pkpBadge--isSuccess');
}
if (this.isWarnable) {
classes.push('pkpBadge--isWarnable');
}
Expand Down Expand Up @@ -80,6 +91,29 @@ export default {
}
}
.pkpBadge--isSuccess {
border-color: @yes;
background-color: @yes;
color: #fff;
&:before {
border-color: #fff;
}
&.pkpBadge--button {
&:hover,
&:focus {
background: transparent;
border-color: @yes;
color: @yes;
&:before {
border-color: @yes;
}
}
}
}
.pkpBadge--isWarnable {
border-color: @no;
background-color: @no;
Expand Down
8 changes: 3 additions & 5 deletions src/components/Button/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
:class="classes"
:href="element === 'a' ? href : false"
:icon="icon"
:isPrimary="isPrimary"
:isWarnable="isWarnable"
:isActive="isActive"
:isLink="isLink"
:disabled="isDisabled"
@click="click"
@focus="focus"
@blur="blur"
Expand Down Expand Up @@ -37,7 +34,8 @@ export default {
isPrimary: Boolean,
isWarnable: Boolean,
isActive: Boolean,
isLink: Boolean
isLink: Boolean,
isDisabled: Boolean
},
computed: {
classes() {
Expand Down
6 changes: 5 additions & 1 deletion src/components/Container/Container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import ListPanel from '@/components/ListPanel/ListPanel.vue';
import SelectReviewerListPanel from '@/components/ListPanel/users/SelectReviewerListPanel.vue';
import SelectSubmissionsListPanel from '@/components/ListPanel/submissions/SelectSubmissionsListPanel.vue';
import SubmissionsListPanel from '@/components/ListPanel/submissions/SubmissionsListPanel.vue';
import Tab from '@/components/Tabs/Tab.vue';
import Tabs from '@/components/Tabs/Tabs.vue';
export default {
name: 'Container',
Expand All @@ -12,7 +14,9 @@ export default {
ListPanel,
SelectReviewerListPanel,
SelectSubmissionsListPanel,
SubmissionsListPanel
SubmissionsListPanel,
Tab,
Tabs
},
data() {
return {
Expand Down
4 changes: 4 additions & 0 deletions src/components/Container/SettingsContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import AddContextForm from '@/components/Form/context/AddContextForm.vue';
import EmailTemplatesListPanel from '@/components/ListPanel/emailTemplates/EmailTemplatesListPanel.vue';
import LicenseForm from '@/components/Form/context/LicenseForm.vue';
import PkpForm from '@/components/Form/Form.vue';
import Tab from '@/components/Tabs/Tab.vue';
import Tabs from '@/components/Tabs/Tabs.vue';
import ThemeForm from '@/components/Form/context/ThemeForm.vue';
export default {
Expand All @@ -14,6 +16,8 @@ export default {
EmailTemplatesListPanel,
LicenseForm,
PkpForm,
Tab,
Tabs,
ThemeForm
}
};
Expand Down
Loading

0 comments on commit 5386732

Please sign in to comment.