-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
113 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
...nd/templates/macros/comments/comment.html → ...tend/templates/issues/macros/comment.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
111 changes: 111 additions & 0 deletions
111
vilya/frontend/templates/pullrequests/macros/comment.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
{% macro render_pullrequest_description(project, pullrequest) -%} | ||
{% set issue = pullrequest.issue %} | ||
<div class="timeline-comment-wrapper js-comment-container"> | ||
<a href="/{{issue.creator.name}}"> | ||
<img alt="{{issue.creator.name}}" class="timeline-comment-avatar" | ||
data-user="{{issue.creator.id}}" height="48" src="{{issue.creator.avatar_url}}" width="48"> | ||
</a> | ||
<div id="issue-40807214" class="comment timeline-comment js-comment js-task-list-container current-user is-task-list-enabled" data-body-version="97c6ff07df2110d5a216983dffba336c"> | ||
<div class="timeline-comment-header "> | ||
<div class="timeline-comment-actions"> | ||
<a class="octicon octicon-pencil js-comment-edit-button" data-skip-pjax="" href="#" title="edit comment" aria-label="edit comment"></a> | ||
</div> | ||
<div class="timeline-comment-header-text"> | ||
<strong> | ||
<a href="/{{issue.creator.name}}" class="author">{{issue.creator.name}}</a> | ||
</strong> | ||
commented | ||
<a href="#issue-40807214" class="timestamp"> | ||
<time datetime="2014-08-21t14:01:15z" is="relative-time" title="aug 21, 2014 10:01 pm gmt+08:00">{{issue.updated_at}}</time> | ||
</a> | ||
</div> | ||
</div> | ||
<div class="comment-content"> | ||
<p class="comment-form-stale"> | ||
the content you are editing has changed. reload the page and try again. | ||
</p> | ||
<div class="edit-comment-hide"> | ||
<div class="comment-body markdown-body markdown-format js-comment-body"> | ||
{{issue.description}} | ||
</div> | ||
</div> | ||
<div class="context-loader">sending request…</div> | ||
<div class="form-content js-write-bucket js-suggester-container js-uploadable-container js-upload-markdown-image upload-enabled is-default" data-upload-policy-url="/upload/policies/assets"> | ||
<form accept-charset="utf-8" action="/{{project.full_name}}/issues/{{issue.number}}" | ||
class="js-comment-update" data-remote="" data-type="json" method="post"> | ||
<div style="margin:0;padding:0;display:inline"> | ||
<input name="utf8" type="hidden" value="✓"> | ||
<input name="_method" type="hidden" value="put"> | ||
<input name="authenticity_token" type="hidden" value="quvwgztylt0esgm9vv/71g0gpgvilf6ahohvxi4tigcnmdoof2gi4e2jhxkuob0hr15jvubu+j//r3w70xjbrw=="> | ||
</div> | ||
<textarea class="comment-form-textarea js-comment-field js-quick-submit js-task-list-field js-size-to-fit js-suggester-field" id="issue-40807214-body" name="issue[body]" tabindex="1"> | ||
{{issue.description}} | ||
</textarea> | ||
<div class="form-actions"> | ||
<button type="submit" class="btn btn-sm btn-primary" tabindex="1" data-disable-with="">update comment</button> | ||
<button type="button" tabindex="1" class="btn btn-sm btn-danger comment-cancel-button js-comment-cancel-button" data-confirm-text="are you sure you want to cancel? you have unsaved changes that will be reverted."> | ||
cancel | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="comment-form-error comment-form-bottom js-comment-update-error"></div> | ||
</div> | ||
</div> | ||
</div> | ||
{%- endmacro %} | ||
|
||
{% macro render_pull_new_comment(project, pull, current_user) -%} | ||
{% set issue = pull.issue %} | ||
<div class="timeline-comment-wrapper timeline-new-comment js-comment-container "> | ||
<a href="/{{current_user.name}}"> | ||
<img alt="{{current_user.name}}" class="timeline-comment-avatar" data-user="{{current_user.id}}" height="48" src="{{current_user.avatar_url}}" width="48"> | ||
</a> | ||
<form accept-charset="UTF-8" action="/{{project.full_name}}/issues/{{issue.number}}/comment" class="js-new-comment-form" data-remote="true" data-type="json" method="post"> | ||
<div style="margin:0;padding:0;display:inline"> | ||
<input name="utf8" type="hidden" value="✓"> | ||
<input name="authenticity_token" type="hidden" value="VMx0TGr0Ya8tKEDSjsomA5xfAFFaHS30bt/Jw0/i8j+fI+I1VcrE5AHQ9MpUCjuH7YObGWAzFaMwJcjYhBWpFQ=="> | ||
</div> | ||
<div class="timeline-comment"> | ||
<input type="hidden" name="issue" value="50"> | ||
<div class="js-previewable-comment-form js-suggester-container previewable-comment-form write-selected" data-preview-url="/preview?repository=16504076"> | ||
<div class="comment-form-head tabnav"> | ||
<ul class="nav nav-tabs"> | ||
<li class="active"><a href="#" class="tabnav-tab write-tab js-write-tab selected">Write</a></li> | ||
<li><a href="#" class="tabnav-tab preview-tab js-preview-tab">Preview</a></li> | ||
</ul> | ||
</div> | ||
<div class="comment-form-error js-comment-form-error" style="display:none"> | ||
There was an error creating your PullRequest. | ||
</div> | ||
<div class="write-content js-write-bucket js-uploadable-container js-upload-markdown-image upload-enabled is-default" data-upload-policy-url="/upload/policies/assets"> | ||
<textarea name="comment[body]" tabindex="1" id="new_comment_field" placeholder="Leave a comment" class="input-contrast comment-form-textarea js-comment-field js-quick-submit js-size-to-fit js-quote-selection-target js-session-resumable js-suggester-field"></textarea> | ||
</div> | ||
<div class="preview-content"> | ||
<div class="comment"> | ||
<div class="comment-content"> | ||
<div class="comment-body markdown-body"> | ||
<p>Nothing to preview</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="suggester-container"> | ||
<div class="suggester js-suggester js-navigation-container" data-url="/douban/code/suggestions/pull_request/13610624"> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-actions"> | ||
<div id="partial-new-comment-form-actions" class="js-socket-channel js-updatable-content" data-channel="douban/code:issue:29512662:state" data-url="/douban/code/pull/50/show_partial?partial=form_actions"> | ||
<button type="submit" class="btn btn-primary" tabindex="2" data-disable-with="" data-disable-invalid=""> | ||
Comment | ||
</button> | ||
<button type="submit" name="comment_and_close" value="1" class="btn js-comment-and-button" tabindex="3" data-comment-text="Close and comment" data-disable-with=""> | ||
Close pull request | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
{%- endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters