diff --git a/client/src/app/admin/panel/admin-panel-menu.js b/client/src/app/admin/panel/admin-panel-menu.js
index 3a10570c..aaf8d634 100644
--- a/client/src/app/admin/panel/admin-panel-menu.js
+++ b/client/src/app/admin/panel/admin-panel-menu.js
@@ -137,7 +137,7 @@ class AdminPanelMenu extends React.Component {
level: 2
},
{
- name: 'Customtags i18n',
+ name: i18n('CUSTOM_TAGS'),
path: '/admin/panel/tickets/custom-tags',
level: 1
}
diff --git a/client/src/app/admin/panel/tickets/admin-panel-custom-tags-modal.js b/client/src/app/admin/panel/tickets/admin-panel-custom-tags-modal.js
index e271094f..c3398729 100644
--- a/client/src/app/admin/panel/tickets/admin-panel-custom-tags-modal.js
+++ b/client/src/app/admin/panel/tickets/admin-panel-custom-tags-modal.js
@@ -27,8 +27,8 @@ class AdminPanelCustomTagsModal extends React.Component {
render() {
return (
-
-
+
);
diff --git a/client/src/app/admin/panel/tickets/admin-panel-custom-tags-modal.scss b/client/src/app/admin/panel/tickets/admin-panel-custom-tags-modal.scss
new file mode 100644
index 00000000..1d1d8b89
--- /dev/null
+++ b/client/src/app/admin/panel/tickets/admin-panel-custom-tags-modal.scss
@@ -0,0 +1,7 @@
+.admin-panel-custom-tags-modal {
+
+ &__actions{
+ display: flex;
+ justify-content: space-between;
+ }
+}
diff --git a/client/src/app/admin/panel/tickets/admin-panel-custom-tags.js b/client/src/app/admin/panel/tickets/admin-panel-custom-tags.js
index 1c5eef4b..8f6f2d90 100644
--- a/client/src/app/admin/panel/tickets/admin-panel-custom-tags.js
+++ b/client/src/app/admin/panel/tickets/admin-panel-custom-tags.js
@@ -41,19 +41,27 @@ class AdminPanelCustomTags extends React.Component {
renderContent() {
return (
-
-
-
+
+
+
+
+
+ {this.props.tags.map(this.renderTag.bind(this))}
- {this.props.tags.map((tag) => {
- return(
-
- )
- })}
);
}
+ renderTag(tag, index) {
+ return(
+
+
+
+ )
+ }
+
openTagModal() {
ModalContainer.openModal(
diff --git a/client/src/app/admin/panel/tickets/admin-panel-custom-tags.scss b/client/src/app/admin/panel/tickets/admin-panel-custom-tags.scss
index 7728e33a..d8d8b51c 100644
--- a/client/src/app/admin/panel/tickets/admin-panel-custom-tags.scss
+++ b/client/src/app/admin/panel/tickets/admin-panel-custom-tags.scss
@@ -1,31 +1,18 @@
.admin-panel-custom-tags {
- &__loading {
- height: 300px;
- }
- &__item-flag {
- float: right;
- }
-
- &__actions {
+ &__content {
text-align: left;
}
- &__save-button {
- display: inline-block;
- margin-right: 30px;
+ &__add-button-icon{
+ margin-left: 5px;
}
- &__optional-buttons {
- display: inline;
+ &__tag-list{
+ margin-top: 15px;
}
- &__discard-button {
- display: inline-block;
- }
-
- &__delete-button {
- display: inline-block;
- float: right;
+ &__tag-container{
+ margin-top:5px ;
}
}
diff --git a/client/src/core-components/tag.js b/client/src/core-components/tag.js
index 9974cab1..d9518978 100644
--- a/client/src/core-components/tag.js
+++ b/client/src/core-components/tag.js
@@ -9,7 +9,7 @@ class Tag extends React.Component {
color: React.PropTypes.string,
showDeleteButton: React.PropTypes.bool,
onRemoveClick: React.PropTypes.func,
- size: React.PropTypes.oneOf(['small','medium'])
+ size: React.PropTypes.oneOf(['small','medium','large'])
};
render() {
@@ -33,7 +33,8 @@ class Tag extends React.Component {
let classes = {
'tag': true,
'tag_small': this.props.size === 'small',
- 'tag_medium': this.props.size === 'medium'
+ 'tag_medium': this.props.size === 'medium',
+ 'tag_large': this.props.size === 'large',
};
return classNames(classes);
diff --git a/client/src/core-components/tag.scss b/client/src/core-components/tag.scss
index 81c2fcc3..4075d6b6 100644
--- a/client/src/core-components/tag.scss
+++ b/client/src/core-components/tag.scss
@@ -21,4 +21,11 @@
&_small {
font-size: 11px;
}
-}
\ No newline at end of file
+
+ &_large {
+ width: 220px;
+ display: flex;
+ justify-content: space-between;
+ padding: 3px 8px;
+ }
+}
diff --git a/client/src/data/fixtures/system-fixtures.js b/client/src/data/fixtures/system-fixtures.js
index d12d98b3..12f02503 100755
--- a/client/src/data/fixtures/system-fixtures.js
+++ b/client/src/data/fixtures/system-fixtures.js
@@ -30,7 +30,8 @@ module.exports = [
'allowedLanguages': ['en', 'es', 'de', 'fr', 'pt', 'jp', 'ru', 'cn', 'in', 'tr'],
'supportedLanguages': ['en', 'es', 'de'],
'registration': true,
- 'user-system-enabled': true
+ 'user-system-enabled': true,
+ 'tags': [{id:1,name:'bug', color:'#eb144c'},{id: 2,name:'suggestion',color:'#ff6900'}]
}
};
@@ -51,7 +52,8 @@ module.exports = [
'allowedLanguages': ['en', 'es', 'de', 'fr', 'pt', 'jp', 'ru', 'cn', 'in', 'tr'],
'supportedLanguages': ['en', 'es', 'de'],
'registration': true,
- 'user-system-enabled': true
+ 'user-system-enabled': true,
+ 'tags': [{id:1,name:'bug', color:'#eb144c'},{id: 2,name:'suggestion',color:'#ff6900'}]
}
};
}
diff --git a/client/src/data/fixtures/ticket-fixtures.js b/client/src/data/fixtures/ticket-fixtures.js
index 1c456fea..8acb7d3d 100644
--- a/client/src/data/fixtures/ticket-fixtures.js
+++ b/client/src/data/fixtures/ticket-fixtures.js
@@ -109,6 +109,7 @@ module.exports = [
unreadStaff: true,
closed: false,
priority: 'medium',
+ tags: [],
author: {
id: '3',
name: 'Haskell Curry',
diff --git a/client/src/data/languages/en.js b/client/src/data/languages/en.js
index 9b2a9bc4..70503c62 100644
--- a/client/src/data/languages/en.js
+++ b/client/src/data/languages/en.js
@@ -48,6 +48,7 @@ export default {
'ALL_TICKETS': 'All Tickets',
'CUSTOM_RESPONSES': 'Custom Responses',
'CUSTOM_TAGS': 'Custom Tags',
+ 'CREATE_CUSTOM_TAG': 'Create custom tag',
'LIST_USERS': 'List Users',
'BAN_USERS': 'Ban Users',
'LIST_ARTICLES': 'Article List',
@@ -103,6 +104,7 @@ export default {
'COLOR': 'Color',
'ADD_NEW_ARTICLE': 'Add new article',
'ADD_ARTICLE': 'Add article',
+ 'ADD_CUSTOM_TAG': 'Add custom tag',
'LAST_EDITED_IN': 'Last edited in {date}',
'EDIT': 'Edit',
'NO_RESULTS': 'No results',
@@ -207,6 +209,7 @@ export default {
'OPTION': 'Option {index}',
'OPTIONS': 'Options',
'FIELD_DESCRIPTION': 'Field description (Optional)',
+ 'DESCRIPTION_ADD_CUSTOM_TAG': 'here you can add a new custom tag',
'CUSTOM_FIELDS': 'Custom fields',
'CHART_CREATE_TICKET': 'Tickets created',
diff --git a/tests/system/custom-field-test.rb b/tests/system/custom-field-test.rb
new file mode 100644
index 00000000..bd32071f
--- /dev/null
+++ b/tests/system/custom-field-test.rb
@@ -0,0 +1,9 @@
+describe 'CustomField' do
+ request('/user/logout')
+ Scripts.login($staff[:email], $staff[:password], true)
+
+ describe '/system/add-custom field' do
+ it 'should add custom field with departments' do
+ end
+ end
+end