Removed feature: comments on wiki
This commit is contained in:
parent
df03275eaa
commit
a0aa0212a9
|
@ -19,8 +19,6 @@ module Notes
|
|||
when "wall"
|
||||
# this is the only case, where the order is DESC
|
||||
project.common_notes.order("created_at DESC, id DESC").limit(50)
|
||||
when "wiki"
|
||||
project.wiki_notes.limit(20)
|
||||
end
|
||||
|
||||
@notes = if after_id
|
||||
|
|
|
@ -89,14 +89,6 @@ class Notify < ActionMailer::Base
|
|||
mail(to: recipient(recipient_id), subject: subject)
|
||||
end
|
||||
|
||||
def note_wiki_email(recipient_id, note_id)
|
||||
@note = Note.find(note_id)
|
||||
@wiki = @note.noteable
|
||||
@project = @note.project
|
||||
mail(to: recipient(recipient_id), subject: subject("note for wiki"))
|
||||
end
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Project
|
||||
|
|
|
@ -216,10 +216,6 @@ class Project < ActiveRecord::Base
|
|||
last_event.try(:created_at) || updated_at
|
||||
end
|
||||
|
||||
def wiki_notes
|
||||
Note.where(noteable_id: wikis.pluck(:id), noteable_type: 'Wiki', project_id: self.id)
|
||||
end
|
||||
|
||||
def project_id
|
||||
self.id
|
||||
end
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
|
||||
%table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
|
||||
%tr
|
||||
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}
|
||||
%td{align: "left", style: "padding: 20px 0 0;"}
|
||||
%h2{style: "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
|
||||
New comment for Wiki page
|
||||
= link_to_gfm @wiki.title, project_wiki_url(@wiki.project, @wiki, anchor: "note_#{@note.id}")
|
||||
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}
|
||||
%tr
|
||||
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}
|
||||
%td{style: "padding: 15px 0 15px;", valign: "top"}
|
||||
%p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
|
||||
%a{href: "#", style: "color: #0eb6ce; text-decoration: none;"} #{@note.author_name}
|
||||
commented on Wiki page:
|
||||
%br
|
||||
%table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"}
|
||||
%tr
|
||||
%td{valign: "top"}
|
||||
%div{ style: "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
|
||||
= markdown(@note.note)
|
||||
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}
|
||||
|
|
@ -19,6 +19,3 @@
|
|||
- if can? current_user, :admin_wiki, @project
|
||||
= link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete do
|
||||
Delete this page
|
||||
|
||||
%hr
|
||||
.wiki_notes#notes= render "notes/notes_with_form", tid: @wiki.id, tt: "wiki"
|
||||
|
|
|
@ -7,9 +7,3 @@ Feature: Project Wiki
|
|||
Scenario: Add new page
|
||||
Given I create Wiki page
|
||||
Then I should see newly created wiki page
|
||||
|
||||
@javascript
|
||||
Scenario: I comment wiki page
|
||||
Given I create Wiki page
|
||||
And I leave a comment like "XML attached"
|
||||
Then I should see comment "XML attached"
|
||||
|
|
|
@ -197,18 +197,6 @@ describe "Gitlab Flavored Markdown" do
|
|||
|
||||
page.should have_link("##{issue.id}")
|
||||
end
|
||||
|
||||
it "should render in wikis#index", js: true do
|
||||
visit project_wiki_path(project, :index)
|
||||
fill_in "Title", with: 'Test title'
|
||||
fill_in "Content", with: '[link test](test)'
|
||||
click_on "Save"
|
||||
|
||||
fill_in "note_note", with: "see ##{issue.id}"
|
||||
click_button "Add Comment"
|
||||
|
||||
page.should have_link("##{issue.id}")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue