diff --git a/app/contexts/notes/load_context.rb b/app/contexts/notes/load_context.rb index f3949149..9f8299f5 100644 --- a/app/contexts/notes/load_context.rb +++ b/app/contexts/notes/load_context.rb @@ -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 diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb index 7f3862ad..29cebada 100644 --- a/app/mailers/notify.rb +++ b/app/mailers/notify.rb @@ -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 @@ -105,7 +97,7 @@ class Notify < ActionMailer::Base def project_access_granted_email(user_project_id) @users_project = UsersProject.find user_project_id @project = @users_project.project - mail(to: @users_project.user.email, + mail(to: @users_project.user.email, subject: subject("access to project was granted")) end diff --git a/app/models/project.rb b/app/models/project.rb index 176c731f..0c74c0bd 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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 diff --git a/app/views/notify/note_wiki_email.html.haml b/app/views/notify/note_wiki_email.html.haml deleted file mode 100644 index 41a237fc..00000000 --- a/app/views/notify/note_wiki_email.html.haml +++ /dev/null @@ -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"} - diff --git a/app/views/wikis/show.html.haml b/app/views/wikis/show.html.haml index 579ea1b3..c3074539 100644 --- a/app/views/wikis/show.html.haml +++ b/app/views/wikis/show.html.haml @@ -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" diff --git a/features/project/wiki.feature b/features/project/wiki.feature index 51370565..f052e2f2 100644 --- a/features/project/wiki.feature +++ b/features/project/wiki.feature @@ -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" diff --git a/spec/requests/gitlab_flavored_markdown_spec.rb b/spec/requests/gitlab_flavored_markdown_spec.rb index aedd435e..ad5d7cd7 100644 --- a/spec/requests/gitlab_flavored_markdown_spec.rb +++ b/spec/requests/gitlab_flavored_markdown_spec.rb @@ -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