repeat by div instead of form in the admin lists

stable
Juanfran 2015-06-22 14:59:21 +02:00
parent 0159d1024b
commit d7deb7ade3
5 changed files with 133 additions and 131 deletions

View File

@ -16,35 +16,35 @@ section.custom-fields-table.basic-table
div.table-body
div.js-sortable
form.js-form(ng-repeat="attr in customAttributes track by attr.id", tg-bind-scope)
div.row.single-custom-field.js-view-custom-field
span.icon.icon-drag-v
div.custom-name
span {{ attr.name }}
div.custom-description
span {{ attr.description }}
div.custom-field-type
span(translate="ADMIN.CUSTOM_FIELDS.FIELD_TYPE_{{ attr.field_type }}")
div.custom-options
div.custom-options-wrapper
a.js-edit-custom-field-button.icon.icon-edit(href="", title="{{'ADMIN.CUSTOM_ATTRIBUTES.EDIT' | translate}}")
a.js-delete-custom-field-button.icon.icon-delete(href="", title="{{'ADMIN.CUSTOM_ATTRIBUTES.DELETE' | translate}}")
div(ng-repeat="attr in customAttributes track by attr.id", tg-bind-scope)
form.js-form(tg-bind-scope)
div.row.single-custom-field.js-view-custom-field
span.icon.icon-drag-v
div.custom-name
span {{ attr.name }}
div.custom-description
span {{ attr.description }}
div.custom-field-type
span(translate="ADMIN.CUSTOM_FIELDS.FIELD_TYPE_{{ attr.field_type }}")
div.custom-options
div.custom-options-wrapper
a.js-edit-custom-field-button.icon.icon-edit(href="", title="{{'ADMIN.CUSTOM_ATTRIBUTES.EDIT' | translate}}")
a.js-delete-custom-field-button.icon.icon-delete(href="", title="{{'ADMIN.CUSTOM_ATTRIBUTES.DELETE' | translate}}")
div.row.single-custom-field.js-edit-custom-field.hidden
fieldset.custom-name
input(type="text", name="name", placeholder="{{'ADMIN.CUSTOM_ATTRIBUTES.SET_FIELD_NAME' | translate}}",
ng-model="attr.name", data-required="true" data-maxlength="64")
fieldset.custom-description
input(type="text", name="description", placeholder="{{'ADMIN.CUSTOM_ATTRIBUTES.SET_FIELD_DESCRIPTION' | translate}}",
ng-model="attr.description")
fieldset.custom-field-type
select(ng-model="attr.field_type",
ng-options="e.id as e.name | translate for e in [{'id':'TEXT', 'name': 'ADMIN.CUSTOM_FIELDS.FIELD_TYPE_TEXT'},{'id':'MULTI', 'name': 'ADMIN.CUSTOM_FIELDS.FIELD_TYPE_MULTI'}]")
fieldset.custom-options
div.custom-options-wrapper
a.js-update-custom-field-button.icon.icon-floppy(href="", title="{{'ADMIN.CUSTOM_ATTRIBUTES.ACTION_UPDATE' | translate}}")
a.js-cancel-edit-custom-field-button.icon.icon-delete(href="", title="{{'ADMIN.CUSTOM_ATTRIBUTES.ACTION_CANCEL_EDITION' | translate}}")
div.row.single-custom-field.js-edit-custom-field.hidden
fieldset.custom-name
input(type="text", name="name", placeholder="{{'ADMIN.CUSTOM_ATTRIBUTES.SET_FIELD_NAME' | translate}}",
ng-model="attr.name", data-required="true" data-maxlength="64")
fieldset.custom-description
input(type="text", name="description", placeholder="{{'ADMIN.CUSTOM_ATTRIBUTES.SET_FIELD_DESCRIPTION' | translate}}",
ng-model="attr.description")
fieldset.custom-field-type
select(ng-model="attr.field_type",
ng-options="e.id as e.name | translate for e in [{'id':'TEXT', 'name': 'ADMIN.CUSTOM_FIELDS.FIELD_TYPE_TEXT'},{'id':'MULTI', 'name': 'ADMIN.CUSTOM_FIELDS.FIELD_TYPE_MULTI'}]")
fieldset.custom-options
div.custom-options-wrapper
a.js-update-custom-field-button.icon.icon-floppy(href="", title="{{'ADMIN.CUSTOM_ATTRIBUTES.ACTION_UPDATE' | translate}}")
a.js-cancel-edit-custom-field-button.icon.icon-delete(href="", title="{{'ADMIN.CUSTOM_ATTRIBUTES.ACTION_CANCEL_EDITION' | translate}}")
form.row.single-custom-field.js-new-custom-field.hidden
fieldset.custom-name

View File

@ -15,32 +15,31 @@ section.project-values-table
div.project-values-body
div.sortable
form(ng-repeat="value in values", tg-bind-scope)
div.project-values-row.row.table-main.visualization
span.icon.icon-drag-v
div(ng-repeat="value in values track by value.id", tg-bind-scope)
form(tg-bind-scope)
div.project-values-row.row.table-main.visualization
span.icon.icon-drag-v
div.project-values-name
span {{ value.name }}
div.project-values-name
span {{ value.name }}
div.project-values-value
span {{ value.value }}
div.project-values-value
span {{ value.value }}
div.project-values-settings
a.edit-value.icon.icon-edit(href="", title="{{'ADMIN.POINTS.TITLE_ACTION_EDIT_VALUE' | translate}}")
a.delete-value.icon.icon-delete(href="", title="{{'ADMIN.POINTS.TITLE_ACTION_DELETE_VALUE' | translate}}")
div.project-values-settings
a.edit-value.icon.icon-edit(href="", title="{{'ADMIN.POINTS.TITLE_ACTION_EDIT_VALUE' | translate}}")
a.delete-value.icon.icon-delete(href="", title="{{'ADMIN.POINTS.TITLE_ACTION_DELETE_VALUE' | translate}}")
div.project-values-row.row.table-main.edition.hidden
div.project-values-name
input(name="name", type="text", placeholder="{{'COMMON.FIELDS.NAME' | translate}}", ng-model="value.name",
data-required="true")
div.project-values-row.row.table-main.edition.hidden
div.project-values-name
input(name="name", type="text", placeholder="{{'COMMON.FIELDS.NAME' | translate}}", ng-model="value.name")
div.project-values-value
input(name="value", type="text", placeholder="{{'COMMON.FIELDS.VALUE' | translate}}", ng-model="value.value",
data-type="number")
div.project-values-value
input(name="value", type="text", placeholder="{{'COMMON.FIELDS.VALUE' | translate}}", ng-model="value.value", data-type="number")
div.project-values-settings
a.save.icon.icon-floppy(href="", title="{{'COMMON.SAVE' | translate}}")
a.cancel.icon.icon-delete(href="", title="{{'COMON.CANCEL' | translate}}")
div.project-values-settings
a.save.icon.icon-floppy(href="", title="{{'COMMON.SAVE' | translate}}")
a.cancel.icon.icon-delete(href="", title="{{'COMON.CANCEL' | translate}}")
form
div.project-values-row.new-value.hidden

View File

@ -14,40 +14,41 @@ section.colors-table.admin-status-table
div.table-main
div.sortable
form(ng-repeat="value in values", tg-bind-scope)
div.row.table-main.visualization
span.icon.icon-drag-v
div.color-column
div.current-color(ng-style="{background: value.color}")
div(ng-repeat="value in values", tg-bind-scope)
form(tg-bind-scope)
div.row.table-main.visualization
span.icon.icon-drag-v
div.color-column
div.current-color(ng-style="{background: value.color}")
div.status-name
span {{ value.name }}
div.status-name
span {{ value.name }}
div.status-slug
span {{ value.slug }}
div.status-slug
span {{ value.slug }}
div.is-closed-column
div.icon.icon-check-square(ng-show="value.is_closed")
div.is-closed-column
div.icon.icon-check-square(ng-show="value.is_closed")
div.options-column
a.edit-value.icon.icon-edit(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_EDIT_VALUE' | translate}}")
a.delete-value.icon.icon-delete(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_DELETE_VALUE' | translate}}")
div.options-column
a.edit-value.icon.icon-edit(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_EDIT_VALUE' | translate}}")
a.delete-value.icon.icon-delete(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_DELETE_VALUE' | translate}}")
div.row.table-main.edition.hidden
div.color-column(tg-color-selection, ng-model="value")
div.current-color(ng-style="{background: value.color}")
include ../../components/select-color
div.row.table-main.edition.hidden
div.color-column(tg-color-selection, ng-model="value")
div.current-color(ng-style="{background: value.color}")
include ../../components/select-color
div.status-name
input(name="name", type="text", placeholder="{{'ADMIN.STATUS.PLACEHOLDER_WRITE_STATUS_NAME' | translate}}",
ng-model="value.name", data-required="true", data-maxlength="255")
div.status-name
input(name="name", type="text", placeholder="{{'ADMIN.STATUS.PLACEHOLDER_WRITE_STATUS_NAME' | translate}}",
ng-model="value.name", data-required="true", data-maxlength="255")
div.is-closed-column
select(name="is_closed", ng-model="value.is_closed", data-required="true",
ng-options="e.id as e.name | translate for e in [{'id':true, 'name':'COMMON.YES'},{'id':false, 'name': 'COMMON.NO'}]")
div.is-closed-column
select(name="is_closed", ng-model="value.is_closed", data-required="true",
ng-options="e.id as e.name | translate for e in [{'id':true, 'name':'COMMON.YES'},{'id':false, 'name': 'COMMON.NO'}]")
div.options-column
a.save.icon.icon-floppy(href="", title="{{'COMMON.SAVE' | translate}}")
div.options-column
a.save.icon.icon-floppy(href="", title="{{'COMMON.SAVE' | translate}}")
a.cancel.icon.icon-delete(href="", title="{{'COMMON.CANCEL' | translate}}")
form

View File

@ -13,32 +13,33 @@ section.colors-table
div.table-main
div.sortable
form(ng-repeat="value in values", tg-bind-scope)
div.row.table-main.visualization
span.icon.icon-drag-v
div(ng-repeat="value in values", tg-bind-scope)
form(tg-bind-scope)
div.row.table-main.visualization
span.icon.icon-drag-v
div.color-column
div.current-color(ng-style="{background: value.color}")
div.color-column
div.current-color(ng-style="{background: value.color}")
div.status-name
span {{ value.name }}
div.status-name
span {{ value.name }}
div.options-column
a.edit-value.icon.icon-edit(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_EDIT_VALUE' | translate}}")
a.delete-value.icon.icon-delete(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_DELETE_VALUE' | translate}}")
div.options-column
a.edit-value.icon.icon-edit(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_EDIT_VALUE' | translate}}")
a.delete-value.icon.icon-delete(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_DELETE_VALUE' | translate}}")
div.row.table-main.edition.hidden
div.color-column(tg-color-selection, ng-model="value")
div.current-color(ng-style="{background: value.color}")
include ../../components/select-color
div.row.table-main.edition.hidden
div.color-column(tg-color-selection, ng-model="value")
div.current-color(ng-style="{background: value.color}")
include ../../components/select-color
div.status-name
input(name="name", type="text", placeholder="{{'ADMIN.TYPES.PLACEHOLDER_WRITE_NAME' | translate}}",
ng-model="value.name", data-required="true", data-maxlength="255")
div.status-name
input(name="name", type="text", placeholder="{{'ADMIN.TYPES.PLACEHOLDER_WRITE_NAME' | translate}}",
ng-model="value.name", data-required="true", data-maxlength="255")
div.options-column
a.save.icon.icon-floppy(href="", title="{{'COMMON.SAVE' | translate}}")
a.cancel.icon.icon-delete(href="", title="{{'COMMON.CANCEL' | translate}}")
div.options-column
a.save.icon.icon-floppy(href="", title="{{'COMMON.SAVE' | translate}}")
a.cancel.icon.icon-delete(href="", title="{{'COMMON.CANCEL' | translate}}")
form
div.row.table-main.new-value.hidden

View File

@ -18,57 +18,58 @@ section.project-us-status
div.table-main
div.sortable
form(ng-repeat="value in values", tg-bind-scope)
div.row.table-main.visualization
span.icon.icon-drag-v
div(ng-repeat="value in values", tg-bind-scope)
form(tg-bind-scope)
div.row.table-main.visualization
span.icon.icon-drag-v
div.color-column
div.current-color(ng-style="{background: value.color}")
div.color-column
div.current-color(ng-style="{background: value.color}")
div.status-name
span {{ value.name }}
div.status-name
span {{ value.name }}
div.status-slug
span {{ value.slug }}
div.status-slug
span {{ value.slug }}
div.is-closed-column
div.icon.icon-check-square(ng-show="value.is_closed")
div.is-closed-column
div.icon.icon-check-square(ng-show="value.is_closed")
div.is-archived-column
div.icon.icon-check-square(ng-show="value.is_archived")
div.is-archived-column
div.icon.icon-check-square(ng-show="value.is_archived")
div.status-wip-limit
span(ng-hide="value.is_archived") {{ value.wip_limit }}
div.status-wip-limit
span(ng-hide="value.is_archived") {{ value.wip_limit }}
div.options-column
a.edit-value.icon.icon-edit(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_EDIT_VALUE' | translate}}")
a.delete-value.icon.icon-delete(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_DELETE_VALUE' | translate}}")
div.options-column
a.edit-value.icon.icon-edit(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_EDIT_VALUE' | translate}}")
a.delete-value.icon.icon-delete(href="", title="{{'ADMIN.COMMON.TITLE_ACTION_DELETE_VALUE' | translate}}")
div.row.table-main.edition.hidden
div.color-column(tg-color-selection, ng-model="value")
div.current-color(ng-style="{background: value.color}")
include ../../components/select-color
div.row.table-main.edition.hidden
div.color-column(tg-color-selection, ng-model="value")
div.current-color(ng-style="{background: value.color}")
include ../../components/select-color
div.status-name
input(name="name", type="text", placeholder="{{'ADMIN.US_STATUS.PLACEHOLDER_WRITE_NAME' | translate}}",
ng-model="value.name", data-required="true", data-maxlength="255")
div.status-name
input(name="name", type="text", placeholder="{{'ADMIN.US_STATUS.PLACEHOLDER_WRITE_NAME' | translate}}",
ng-model="value.name", data-required="true", data-maxlength="255")
div.is-closed-column
select(name="is_closed", ng-model="value.is_closed", data-required="true",
ng-options="e.id as e.name | translate for e in [{'id':true, 'name':'COMMON.YES'},{'id':false, 'name': 'COMMON.NO'}]")
div.is-closed-column
select(name="is_closed", ng-model="value.is_closed", data-required="true",
ng-options="e.id as e.name | translate for e in [{'id':true, 'name':'COMMON.YES'},{'id':false, 'name': 'COMMON.NO'}]")
div.is-archived-column
select(name="is_archived", ng-model="value.is_archived", data-required="true",
ng-options="e.id as e.name | translate for e in [{'id':true, 'name':'COMMON.YES'},{'id':false, 'name': 'COMMON.NO'}]")
div.is-archived-column
select(name="is_archived", ng-model="value.is_archived", data-required="true",
ng-options="e.id as e.name | translate for e in [{'id':true, 'name':'COMMON.YES'},{'id':false, 'name': 'COMMON.NO'}]")
div.status-wip-limit
input(name="wip_limit", type="number", ng-hide="value.is_archived",
ng-model="value.wip_limit", data-type="digits",
placeholder="{{'ADMIN.US_STATUS.WIP_LIMIT_COLUMN' | translate}}")
div.status-wip-limit
input(name="wip_limit", type="number", ng-hide="value.is_archived",
ng-model="value.wip_limit", data-type="digits",
placeholder="{{'ADMIN.US_STATUS.WIP_LIMIT_COLUMN' | translate}}")
div.options-column
a.save.icon.icon-floppy(href="", title="{{'COMMON.SAVE' | translate}}")
div.options-column
a.save.icon.icon-floppy(href="", title="{{'COMMON.SAVE' | translate}}")
a.cancel.icon.icon-delete(href="", title="{{'COMMON.CANCEL' | translate}}")
form