tg-bo-bind
parent
b614a6258a
commit
98f90f91cf
|
@ -21,6 +21,14 @@
|
|||
|
||||
bindOnce = @.taiga.bindOnce
|
||||
|
||||
# Escape Html bind once directive
|
||||
BindOnceBindDirective = ->
|
||||
link = ($scope, $el, $attrs) ->
|
||||
bindOnce $scope, $attrs.tgBoBind, (val) ->
|
||||
$el.text(val)
|
||||
|
||||
return {link:link}
|
||||
|
||||
# Html bind once directive
|
||||
BindOnceHtmlDirective = ->
|
||||
link = ($scope, $el, $attrs) ->
|
||||
|
@ -79,6 +87,7 @@ BindHtmlDirective = ->
|
|||
return {link:link}
|
||||
|
||||
module = angular.module("taigaBase")
|
||||
module.directive("tgBoBind", BindOnceBindDirective)
|
||||
module.directive("tgBoHtml", BindOnceHtmlDirective)
|
||||
module.directive("tgBoRef", BindOnceRefDirective)
|
||||
module.directive("tgBoSrc", BindOnceSrcDirective)
|
||||
|
|
|
@ -13,7 +13,7 @@ block content
|
|||
alt="{{ invitation.invited_by.full_name_display }}")
|
||||
| {{ invitation.invited_by.full_name_display }}
|
||||
p.invitation-text has sent you an invitation to join to the taiga project
|
||||
span.project-name(tg-bo-html="invitation.project_name")
|
||||
span.project-name(tg-bo-bind="invitation.project_name")
|
||||
|
||||
div.invitation-form
|
||||
include views/modules/invitation-login-form
|
||||
|
|
|
@ -14,7 +14,7 @@ block content
|
|||
section.us-story-main-data
|
||||
div.us-title(ng-class="{blocked: issue.is_blocked}")
|
||||
h2.us-title-text
|
||||
span.us-number(tg-bo-html="issue.ref")
|
||||
span.us-number(tg-bo-bind="issue.ref")
|
||||
span.us-name(ng-bind="issue.subject")
|
||||
p.block-desc-container(ng-show="issue.is_blocked")
|
||||
span.block-description-title Blocked
|
||||
|
|
|
@ -9,8 +9,8 @@ block content
|
|||
section.main.kanban
|
||||
div.kanban-detail-header
|
||||
h1
|
||||
span(tg-bo-html="project.name")
|
||||
span.green(tg-bo-html="sectionName")
|
||||
span(tg-bo-bind="project.name")
|
||||
span.green(tg-bo-bind="sectionName")
|
||||
div.kanban-settings
|
||||
// a.button.button-trans(href="", title="Filter")
|
||||
// span.icon.icon-filter
|
||||
|
|
|
@ -7,23 +7,23 @@ block content
|
|||
div.wrapper(ng-controller="ProjectController as ctrl")
|
||||
section.main.single-project
|
||||
h1
|
||||
span.green(tg-bo-html="project.name")
|
||||
span.green(tg-bo-bind="project.name")
|
||||
div.summary
|
||||
ul.home-project-info-list
|
||||
li
|
||||
span.info-num(tg-bo-html="stats.total_points")
|
||||
span.info-num(tg-bo-bind="stats.total_points")
|
||||
span.info-text project<br/> points
|
||||
li
|
||||
span.info-num(tg-bo-html="stats.defined_points")
|
||||
span.info-num(tg-bo-bind="stats.defined_points")
|
||||
span.info-text defined<br/> points
|
||||
li
|
||||
span.info-num(tg-bo-html="stats.assigned_points")
|
||||
span.info-num(tg-bo-bind="stats.assigned_points")
|
||||
span.info-text assigned<br/> points
|
||||
li
|
||||
span.info-num(tg-bo-html="stats.closed_points")
|
||||
span.info-num(tg-bo-bind="stats.closed_points")
|
||||
span.info-text closed<br/> points
|
||||
div.project-data-container
|
||||
p.description(tg-bo-html="project.description")
|
||||
p.description(tg-bo-bind="project.description")
|
||||
ul
|
||||
li(ng-repeat="member in project.active_memberships")
|
||||
figure.avatar
|
||||
|
|
|
@ -9,8 +9,8 @@ block content
|
|||
ul.recent-projects
|
||||
li(ng-repeat="project in ctrl.projects.recents")
|
||||
.project-content
|
||||
h2(tg-bo-html="project.name")
|
||||
p(tg-bo-html="project.description")
|
||||
h2(tg-bo-bind="project.name")
|
||||
p(tg-bo-bind="project.description")
|
||||
.project-link
|
||||
a.button.button-gray(href="", tg-nav="project:project=project.slug") Go to project
|
||||
|
||||
|
@ -19,7 +19,7 @@ block content
|
|||
div(tg-projects-pagination, active="ctrl.projects.all.length")
|
||||
ul
|
||||
li(ng-repeat="project in ctrl.projects.all")
|
||||
a.button(href="", tg-bo-html="project.name", tg-nav="project:project=project.slug")
|
||||
a.button(href="", tg-bo-bind="project.name", tg-nav="project:project=project.slug")
|
||||
|
||||
.create-project-button-wrapper
|
||||
a.button.button-green(href="", ng-click="ctrl.newProject()") Create project
|
|
@ -14,7 +14,7 @@ block content
|
|||
section.us-story-main-data
|
||||
div.us-title(ng-class="{blocked: task.is_blocked}")
|
||||
h2.us-title-text
|
||||
span.us-number(tg-bo-html="task.ref")
|
||||
span.us-number(tg-bo-bind="task.ref")
|
||||
span.us-name(ng-bind="task.subject")
|
||||
p.block-desc-container(ng-show="task.is_blocked")
|
||||
span.block-description-title Blocked
|
||||
|
|
|
@ -8,8 +8,8 @@ block content
|
|||
ng-init="section='backlog'")
|
||||
section.main.taskboard
|
||||
h1
|
||||
span(tg-bo-html="project.name")
|
||||
span.green(tg-bo-html="sprint.name")
|
||||
span(tg-bo-bind="project.name")
|
||||
span.green(tg-bo-bind="sprint.name")
|
||||
span.date(tg-date-range="sprint.estimated_start,sprint.estimated_finish")
|
||||
include views/components/sprint-summary
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ block content
|
|||
section.us-story-main-data
|
||||
div.us-title(ng-class="{blocked: us.is_blocked}")
|
||||
h2.us-title-text
|
||||
span.us-number(tg-bo-html="us.ref")
|
||||
span.us-number(tg-bo-bind="us.ref")
|
||||
span.us-name(ng-bind="us.subject")
|
||||
|
||||
p.block-desc-container(ng-show="us.is_blocked")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
header
|
||||
h1
|
||||
span(tg-bo-html="project.name")
|
||||
span.green(tg-bo-html="sectionName")
|
||||
span(tg-bo-bind="project.name")
|
||||
span.green(tg-bo-bind="sectionName")
|
||||
|
|
|
@ -6,19 +6,19 @@ section.us-activity.hidden
|
|||
|
||||
div.activity-content
|
||||
div.activity-username
|
||||
a.username(href="TODO", tg-bo-title="ctrl.getUserFullName(change.user.pk)" tg-bo-html="ctrl.getUserFullName(change.user.pk)")
|
||||
a.username(href="TODO", tg-bo-title="ctrl.getUserFullName(change.user.pk)" tg-bo-bind="ctrl.getUserFullName(change.user.pk)")
|
||||
span.date {{ change.created_at | date:'yyyy-MM-dd HH:mm' }}
|
||||
|
||||
div.activity-inner(ng-repeat="(key, change) in change.values_diff")
|
||||
div.activity-changed
|
||||
span(tg-bo-html="key")
|
||||
span(tg-bo-bind="key")
|
||||
div.activity-fromto
|
||||
p
|
||||
strong from <br />
|
||||
span(tg-bo-html="ctrl.getChangeText(change[0])")
|
||||
span(tg-bo-bind="ctrl.getChangeText(change[0])")
|
||||
p
|
||||
strong to <br />
|
||||
span(tg-bo-html="ctrl.getChangeText(change[1])")
|
||||
span(tg-bo-bind="ctrl.getChangeText(change[1])")
|
||||
|
||||
//a.more-activity(href="", title="show more comments")
|
||||
// span show previous activity
|
||||
|
|
|
@ -19,9 +19,9 @@ section.attachments(tg-attachments, ng-model=attachModel, ng-if="#{attachModel}.
|
|||
|
||||
div.single-attachment(ng-repeat="file in uploadingFiles")
|
||||
div.attachment-name
|
||||
a(href="", tg-bo-title="file.name", tg-bo-html="file.name")
|
||||
a(href="", tg-bo-title="file.name", tg-bo-bind="file.name")
|
||||
div.attachment-size
|
||||
span.attachment-size(tg-bo-html="file.size")
|
||||
span.attachment-size(tg-bo-bind="file.size")
|
||||
div.attachment-comments
|
||||
span(ng-bind="file.progressMessage")
|
||||
div.percentage(ng-style="{'width': file.progressPercent}")
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
div.us-activity
|
||||
|
||||
a.activity-title(ng-show="ctrl.countChanges(comment)", href="", title="Show activity")
|
||||
span(tg-bo-html="ctrl.buildChangesText(comment)")
|
||||
span(tg-bo-bind="ctrl.buildChangesText(comment)")
|
||||
span.icon.icon-arrow-up
|
||||
|
||||
div.activity-inner(ng-repeat="(key, change) in comment.values_diff")
|
||||
div.activity-changed
|
||||
span(tg-bo-html="key")
|
||||
span(tg-bo-bind="key")
|
||||
div.activity-fromto
|
||||
p
|
||||
strong from <br />
|
||||
span(tg-bo-html="ctrl.getChangeText(change[0])")
|
||||
span(tg-bo-bind="ctrl.getChangeText(change[0])")
|
||||
p
|
||||
strong to <br />
|
||||
span(tg-bo-html="ctrl.getChangeText(change[1])")
|
||||
span(tg-bo-bind="ctrl.getChangeText(change[1])")
|
||||
|
|
|
@ -8,7 +8,7 @@ section.us-comments
|
|||
a.avatar(href="", tg-bo-title="ctrl.getUserFullName(comment.user.pk)")
|
||||
img(tg-bo-src="ctrl.getUserAvatar(comment.user.pk)", tg-bo-alt="ctrl.getUserFullName(comment.user.pk)")
|
||||
div.comment-content
|
||||
a.username(href="TODO", tg-bo-title="ctrl.getUserFullName(comment.user.pk)" tg-bo-html="ctrl.getUserFullName(comment.user.pk)")
|
||||
a.username(href="TODO", tg-bo-title="ctrl.getUserFullName(comment.user.pk)" tg-bo-bind="ctrl.getUserFullName(comment.user.pk)")
|
||||
//- includes module activity
|
||||
include comment-activity
|
||||
p.comment {{ comment.comment }}
|
||||
|
|
|
@ -10,6 +10,6 @@ section.issues-table.basic-table
|
|||
div.level-field(tg-listitem-priority="issue")
|
||||
div.subject
|
||||
a(href="", tg-nav="project-issues-detail:project=project.slug,ref=issue.ref",
|
||||
tg-bo-html="issue.subject")
|
||||
tg-bo-bind="issue.subject")
|
||||
div.issue-field(tg-listitem-issue-status="issue")
|
||||
div.assigned-field(tg-listitem-assignedto="issue")
|
||||
|
|
|
@ -3,7 +3,7 @@ div.kanban-table
|
|||
div.kanban-table-inner(tg-kanban-row-size-fixer)
|
||||
h2.task-colum_name(ng-repeat="s in usStatusList track by s.id",
|
||||
ng-style="{'border-top-color':s.color}")
|
||||
span(tg-bo-html="s.name")
|
||||
span(tg-bo-bind="s.name")
|
||||
a.icon.icon-plus(href="", title="Add New task", ng-click="ctrl.addNewUs('standard', s.id)")
|
||||
a.icon.icon-bulk(href="", title="Add New bulk", ng-click="ctrl.addNewUs('bulk', s.id)")
|
||||
|
||||
|
|
|
@ -19,5 +19,5 @@ nav.projects-nav(ng-controller="ProjectNavController as ctrl", tg-projects-nav)
|
|||
div.projects-pagination(tg-projects-pagination, active="projects.length && !projectsSearch.$.length")
|
||||
ul.projects-list
|
||||
li(ng-repeat="project in projects|filter:projectsSearch:strict track by project.id")
|
||||
a(href="", tg-bo-html="project.name", tg-nav="project:project=project.slug")
|
||||
a(href="", tg-bo-bind="project.name", tg-nav="project:project=project.slug")
|
||||
span.icon.icon-arrow-right
|
||||
|
|
|
@ -10,7 +10,7 @@ script(type="text/ng-template", id="search-issues")
|
|||
div.row.table-main(ng-repeat="issue in issues track by issue.id")
|
||||
div.user-stories.width-6
|
||||
div.user-story-name
|
||||
a(href="", tg-bo-html="issue.subject")
|
||||
a(href="", tg-bo-bind="issue.subject")
|
||||
div.status.width-2(tg-listitem-issue-status="issue")
|
||||
div.points.width-1(tg-listitem-assignedto="issue")
|
||||
|
||||
|
@ -24,9 +24,9 @@ script(type="text/ng-template", id="search-userstories")
|
|||
div.row.table-main(ng-repeat="us in userstories track by us.id")
|
||||
div.user-stories.width-4
|
||||
div.user-story-name
|
||||
a(href="", tg-bo-html="us.subject")
|
||||
a(href="", tg-bo-bind="us.subject")
|
||||
div.status.width-2(tg-listitem-us-status="us")
|
||||
div.points.width-1(tg-bo-html="us.total_points")
|
||||
div.points.width-1(tg-bo-bind="us.total_points")
|
||||
|
||||
script(type="text/ng-template", id="search-tasks")
|
||||
div.search-result-table-header
|
||||
|
@ -38,6 +38,6 @@ script(type="text/ng-template", id="search-tasks")
|
|||
div.row.table-main(ng-repeat="task in tasks track by task.id")
|
||||
div.user-stories.width-4
|
||||
div.user-story-name
|
||||
a(href="", tg-bo-html="task.subject")
|
||||
a(href="", tg-bo-bind="task.subject")
|
||||
div.status.width-2(tg-listitem-task-status="task")
|
||||
div.points.width-1(tg-listitem-assignedto="task")
|
||||
|
|
|
@ -33,8 +33,8 @@ section.sprints
|
|||
div.column-us.width-8
|
||||
a.us-name.clickable(tg-nav="project-userstories-detail:project=project.slug,ref=us.ref", title="")
|
||||
span(tg-bo-ref="us.ref")
|
||||
span(tg-bo-html="us.subject")
|
||||
div.column-points.width-1(tg-bo-html="us.total_points")
|
||||
span(tg-bo-bind="us.subject")
|
||||
div.column-points.width-1(tg-bo-bind="us.total_points")
|
||||
a.button.button-gray(href="", tg-nav="project-taskboard:project=project.slug,sprint=sprint.id",
|
||||
title="Current Sprint Taskboard")
|
||||
span Sprint Taskboard
|
||||
|
|
|
@ -4,7 +4,7 @@ div.taskboard-table
|
|||
h2.task-colum_name "User story"
|
||||
h2.task-colum_name(ng-repeat="s in taskStatusList track by s.id",
|
||||
ng-style="{'border-top-color':s.color}")
|
||||
span(tg-bo-html="s.name")
|
||||
span(tg-bo-bind="s.name")
|
||||
|
||||
div.taskboard-table-body
|
||||
div.taskboard-table-inner(tg-taskboard-row-size-fixer)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
div.summary.wiki-summary
|
||||
ul
|
||||
li
|
||||
span.number(tg-bo-html="wiki.editions")
|
||||
span.number(tg-bo-bind="wiki.editions")
|
||||
span.description times <br />edited
|
||||
li
|
||||
span.number(tg-bo-html="wiki.modified_date|date:'dd/MM/yyyy HH:mm'")
|
||||
span.number(tg-bo-bind="wiki.modified_date|date:'dd/MM/yyyy HH:mm'")
|
||||
span.description last <br />edit
|
||||
li.username-edition(tg-wiki-user-info, ng-model='wiki')
|
||||
|
|
|
@ -12,9 +12,9 @@ block content
|
|||
//Include views/components/mainTitle
|
||||
header
|
||||
h1
|
||||
span(tg-bo-html="project.name")
|
||||
span(tg-bo-bind="project.name")
|
||||
span.green Wiki
|
||||
span.wiki-title(tg-bo-html='wikiSlug|unslugify')
|
||||
span.wiki-title(tg-bo-bind='wikiSlug|unslugify')
|
||||
.action-buttons
|
||||
a.button.button-green.save-wiki(href="", title="Save", ng-click="ctrl.save()") Save
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ block content
|
|||
section.main.wiki
|
||||
header
|
||||
h1
|
||||
span(tg-bo-html="project.name")
|
||||
span(tg-bo-bind="project.name")
|
||||
span.green Wiki
|
||||
span.wiki-title(tg-bo-html='wiki.slug|unslugify')
|
||||
span.wiki-title(tg-bo-bind='wiki.slug|unslugify')
|
||||
.action-buttons
|
||||
a.button.button-red.delete-wiki(href="", title="Delete", ng-click="ctrl.delete()") Delete
|
||||
a.button.button-green.edit-wiki(href="", title="Edit", ng-click="ctrl.edit()") Edit
|
||||
|
|
Loading…
Reference in New Issue