fix commit comments
This commit is contained in:
parent
0d0489ea21
commit
4b73baad1e
|
@ -3,7 +3,7 @@ tabset
|
||||||
.offset10
|
.offset10
|
||||||
- if defined?(ang_model)
|
- if defined?(ang_model)
|
||||||
= f.input :body, label: false, as: :text,
|
= f.input :body, label: false, as: :text,
|
||||||
input_html: { rows: 10, id: "#{id}-body",
|
input_html: { rows: 10, id: "#{id}-body", style: 'resize: vertical',
|
||||||
'ng-model' => "#{ctrl}.#{ang_model}", 'ng-value' => "#{ctrl}.#{ang_model}" }
|
'ng-model' => "#{ctrl}.#{ang_model}", 'ng-value' => "#{ctrl}.#{ang_model}" }
|
||||||
- else
|
- else
|
||||||
= f.input :body, label: false, as: :text,
|
= f.input :body, label: false, as: :text,
|
||||||
|
|
|
@ -8,7 +8,10 @@
|
||||||
|
|
||||||
== render 'submenu'
|
== render 'submenu'
|
||||||
|
|
||||||
.col-xs-12.col-md-10.col-md-offset-1
|
- ctrl_params = "{ kind: 'commit', id: '#{@commit.id}' }"
|
||||||
|
.col-xs-12.col-md-10.col-md-offset-1[ ng-controller= 'CommentsController as commentsCtrl'
|
||||||
|
ng-init= "commentsCtrl.init('#{@project.name_with_owner}', #{ctrl_params})" ]
|
||||||
|
|
||||||
- GitPresenters::CommitAsMessagePresenter.present(@commit, project: @project) do |presenter|
|
- GitPresenters::CommitAsMessagePresenter.present(@commit, project: @project) do |presenter|
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
.panel-body
|
.panel-body
|
||||||
|
@ -18,11 +21,12 @@
|
||||||
#repo-wrapper
|
#repo-wrapper
|
||||||
== render 'show'
|
== render 'show'
|
||||||
|
|
||||||
- ctrl_params = "{ kind: 'commit', id: '#{@commit.id}' }"
|
|
||||||
- comments = @comments.select {|c| c.data.blank? } # dont work @comments.where(data: nil)
|
- comments = @comments.select {|c| c.data.blank? } # dont work @comments.where(data: nil)
|
||||||
div[ ng-controller = 'CommentsController as commentsCtrl'
|
div
|
||||||
ng-init = "commentsCtrl.init('#{@project.name_with_owner}', #{ctrl_params})" ]
|
|
||||||
== render "projects/comments/list", list: comments, project: @project, commentable: @commit
|
== render "projects/comments/list", list: comments, project: @project, commentable: @commit
|
||||||
== render "projects/comments/add", project: @project, commentable: @commit if current_user
|
== render "projects/comments/add", project: @project, commentable: @commit if current_user
|
||||||
|
|
||||||
= hidden_field_tag :preview_url, project_md_preview_path(@project)
|
= hidden_field_tag :preview_url, project_md_preview_path(@project)
|
||||||
|
|
||||||
|
div ng-non-bindable = true
|
||||||
|
== render 'projects/comments/new_line'
|
||||||
|
|
Loading…
Reference in New Issue