summaryrefslogtreecommitdiffstats
path: root/templates/issue/create.tmpl
blob: 6d08f6991316f2c349bb857ee4e37367cd15df5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{{template "base/head" .}}
{{template "base/navbar" .}}
{{template "repo/nav" .}}
{{template "repo/toolbar" .}}
<div id="body" class="container">
    <div id="issue">
        <form class="form" action="{{.RepoLink}}/issues/new" method="post" id="issue-create-form">
            {{.CsrfTokenHtml}}
            {{template "base/alert" .}}
            <div class="col-md-1">
                <img class="avatar" src="{{.SignedUser.AvatarLink}}" alt=""/>
            </div>
            <div class="col-md-8 panel panel-default">
                <div class="form-group panel-body">
                    <input class="form-control input-lg" type="text" name="title" required="required" placeholder="Title" value="{{.title}}" />
                </div>
                <div class="form-group panel-body">
                    <span><strong id="assigned" data-no-assigned="No one">No one</strong> will be assigned</span>
                    <input type="hidden" name="assigneeid" value="0" id="assignee"/>&nbsp;&nbsp;
                    <div style="display: inline-block;position: relative">
                        <button type="button" class="dropdown-toggle btn btn-default btn-sm" data-toggle="dropdown">
                            <i class="fa fa-group"></i>
                            <span class="caret"></span>
                        </button>
                        <div class="dropdown-menu assignee">
                            <ul class="list-unstyled">
                                <li data-uid="0" class="clear-assignee hidden"><i class="fa fa-times-circle-o"></i> Clear assignee</li>
                                {{range .Collaborators}}
                                <li data-uid="{{.Id}}"><img src="{{.AvatarLink}}"><strong>{{.Name}}</strong> {{.FullName}}</li>
                                {{end}}
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="form-group panel-body">
                    <div class="md-help pull-right"><!-- todo help link -->
                        Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a>
                    </div>
                    <ul class="nav nav-tabs" data-init="tabs">
                        <li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
                        <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="issue-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane" id="issue-textarea">
                            <div class="form-group">
                                <textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="text">{{.content}}</textarea>
                            </div>
                        </div>
                        <div class="tab-pane issue-preview-content" id="issue-preview">loading...</div>
                    </div>
                </div>
                <div class="text-right panel-body">
                    <div class="form-group">
                        <input type="hidden" value="id" name="repo-id"/>
                        <button class="btn-success btn">Create new issue</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
{{template "base/footer" .}}