Custom fields in US detail

stable
Xavier Julián 2015-02-02 11:34:29 +01:00 committed by David Barragán Merino
parent f8929c3470
commit 05a89bdf32
4 changed files with 101 additions and 0 deletions

View File

@ -0,0 +1,21 @@
section.duty-custom-fields
div.custom-fields-header
span Custom Fields
// Remove .open class on click on this button in both .icon and .custom-fields-body to close
a.icon.icon-arrow-bottom.open
div.custom-fields-body.open
div.custom-field-single
div.custom-field-data
span.custom-field-name Name
span.custom-field-description This is the description
div.custom-field-value
span Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec.
div.custom-field-options
a.icon.icon-edit(href="", title="Edit Custom Field")
form.custom-field-single
div.custom-field-data
label.custom-field-name(for="custom-field-description") Name
div.custom-field-value
input#custom-field-description(type="text", placeholder="This is the description")
div.custom-field-options
a.icon.icon-floppy(href="", title="Save Custom Field")

View File

@ -39,6 +39,9 @@ div.wrapper(ng-controller="UserStoryDetailController as ctrl",
section.duty-content(tg-editable-description, ng-model="us", required-perm="modify_us")
// IF Custom Fields
include ../includes/modules/common/custom-fields
include ../includes/modules/related-tasks
tg-attachments(ng-model="us", type="us")

View File

@ -0,0 +1,76 @@
.duty-custom-fields {
margin-bottom: 2rem;
.custom-fields-header {
@extend %bold;
align-content: space-between;
align-items: center;
background: $whitish;
display: flex;
justify-content: space-between;
padding: .5rem 1rem;
.icon-arrow-bottom {
@extend %large;
cursor: pointer;
transform: rotate(-90deg);
transition: transform .2s linear;
&.open {
transform: rotate(0);
transition: transform .2s linear;
}
}
}
.custom-fields-body {
@include slide(1000px, hidden, $min: 0);
}
.custom-field-single {
align-content: center;
align-items: center;
border-bottom: 1px solid $whitish;
display: flex;
padding: 1rem;
&:last-child {
border-bottom: 0;
}
&:hover {
.custom-field-options {
opacity: 1;
}
}
.custom-field-options {
opacity: 0;
transition: opacity .2s linear;
a {
color: $gray-light;
}
a:hover {
color: $green-taiga;
}
}
}
.custom-field-data {
flex: 0;
flex-basis: 200px;
.custom-field-name {
@extend %bold;
display: block;
}
.custom-field-description {
@extend %small;
color: $gray-light;
display: block;
line-height: .9rem;
}
}
.custom-field-value {
flex: 1;
padding-right: 2rem;
}
form {
label {
cursor: pointer;
}
input {
width: 100%;
}
}
}

View File

@ -75,6 +75,7 @@ exports.files = function () {
'modules/common/history',
'modules/common/wizard',
'modules/common/external-reference',
'modules/common/custom-fields',
//Project modules
'modules/home-projects-list',