dropdown in project context, simple button in global context

pull/4904/merge
Jens Ulferts 8 years ago committed by Oliver Günther
parent d7e2bb8de2
commit 0a77d795b2
  1. 5
      frontend/app/components/wp-buttons/wp-create-button/wp-create-button.controller.ts
  2. 10
      frontend/app/components/wp-buttons/wp-create-button/wp-create-button.directive.html

@ -39,8 +39,9 @@ export default class WorkPackageCreateButtonController {
constructor(protected $state, constructor(protected $state,
protected I18n) { protected I18n) {
this.text = { this.text = {
button: I18n.t('js.work_packages.create.button'), createWithDropdown: I18n.t('js.work_packages.create.button'),
create: I18n.t('js.label_create_work_package') createButton: I18n.t('js.label_work_package'),
explanation: I18n.t('js.label_create_work_package')
}; };
} }

@ -6,23 +6,23 @@
ng-init="projectIdentifier = $ctrl.projectIdentifier; stateName = $ctrl.stateName" ng-init="projectIdentifier = $ctrl.projectIdentifier; stateName = $ctrl.stateName"
locals="projectIdentifier, stateName" locals="projectIdentifier, stateName"
ng-disabled="$ctrl.isDisabled()" ng-disabled="$ctrl.isDisabled()"
aria-label="{{ ::$ctrl.text.create }}"> aria-label="{{ ::$ctrl.text.explanation }}">
<i class="button--icon icon-add"></i> <i class="button--icon icon-add"></i>
<span class="button--text" <span class="button--text"
ng-bind="::$ctrl.text.button" ng-bind="::$ctrl.text.createWithDropdown"
aria-hidden="true"></span> aria-hidden="true"></span>
<i class="button--icon icon-pulldown"></i> <i class="button--icon icon-pulldown"></i>
</button> </button>
<button class="button -alt-highlight add-work-package" <button class="button -alt-highlight add-work-package"
ng-if="!$ctrl.projectIdentifier" ng-if="!$ctrl.projectIdentifier"
ng-click="$ctrl.createWorkPackage()"
ng-disabled="$ctrl.isDisabled()" ng-disabled="$ctrl.isDisabled()"
aria-label="{{ ::$ctrl.text.create }}"> aria-label="{{ ::$ctrl.text.explanation }}">
<i class="button--icon icon-add"></i> <i class="button--icon icon-add"></i>
<span class="button--text" <span class="button--text"
ng-bind="::$ctrl.text.button" ng-bind="::$ctrl.text.createButton"
aria-hidden="true"></span> aria-hidden="true"></span>
<i class="button--icon icon-pulldown"></i>
</button> </button>
</div> </div>

Loading…
Cancel
Save