Платформа ЦРНП "Мирокод" для разработки проектов https://git.mirocod.ru
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

84 lines
1.9 KiB

{{template "base/head" .}}
<div class="page-content repository">
{{template "repo/header" .}}
<div class="ui container">
{{template "repo/issue/nav_search_and_new" .}}
<div class="ui divider"></div>
{{template "repo/issue/issue_filters" .}}
{{template "repo/issue/issue_actions" .}}
<div hidden>
{{template "shared/issuelistfortree" mergeinto . "listType" "repo"}}
<div id="repo_title" class="comment"></div>
</div>
<script>
var source = document.getElementById("repo-title-in-header"),
destination = document.getElementById("repo_title");
destination.innerHTML = source.innerHTML
var task_post = [];
var config = {
container: "#TaskTreeChart",
levelSeparation: 60,
siblingSeparation: 60,
nodeAlign: "BOTTOM",
connectors: {
type: "step",
style: {
"stroke-width": 4,
"stroke": "#ccc",
"stroke-dasharray": "-", //"", "-", ".", "-.", "-..", ". ", "- ", "--", "- .", "--.", "--.."
"arrow-end": "classic-wide-long"
}
},
},
task_post0 = {
innerHTML: "#repo_title"
};
{{range .Issues}}
task_post[{{.ID}}] = {
parent: task_post0,
innerHTML: "#task{{.ID}}"
};
{{end}}
{{range .Issues}}
{{if .BlockedByParents}}
{{ $cur_id := .ID}}
{{ $cur_repo_id := .RepoID}}
{{range .BlockedByParents}}
{{if eq $cur_repo_id .Issue.RepoID}}
if( task_post[{{.Issue.ID}}] )
{
task_post[{{$cur_id}}].parent = task_post[{{.Issue.ID}}];
}
{{end}}
{{end}}
{{end}}
{{end}}
tree_structure = [
config, task_post0,
{{range .Issues}}
task_post[{{.ID}}],
{{end}}
];
</script>
<div class="chart Treant loaded" id="TaskTreeChart"></div>
{{template "repo/issue/treant_config" .}}
<script>
new Treant( tree_structure );
</script>
</div>
</div>
{{template "base/footer" .}}