Commit 2a13eb52 authored by Kun Qian's avatar Kun Qian Committed by Francisco Javier López

Add blocked content entry

parent d0001477
...@@ -10,6 +10,7 @@ import { ...@@ -10,6 +10,7 @@ import {
import { escape } from 'lodash'; import { escape } from 'lodash';
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { IdState } from 'vendor/vue-virtual-scroller'; import { IdState } from 'vendor/vue-virtual-scroller';
import DiffContent from 'jh_else_ce/diffs/components/diff_content.vue';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { hasDiff } from '~/helpers/diffs_helper'; import { hasDiff } from '~/helpers/diffs_helper';
import { diffViewerErrors } from '~/ide/constants'; import { diffViewerErrors } from '~/ide/constants';
...@@ -28,7 +29,6 @@ import { ...@@ -28,7 +29,6 @@ import {
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import { DIFF_FILE, GENERIC_ERROR, CONFLICT_TEXT } from '../i18n'; import { DIFF_FILE, GENERIC_ERROR, CONFLICT_TEXT } from '../i18n';
import { collapsedType, getShortShaFromFile } from '../utils/diff_file'; import { collapsedType, getShortShaFromFile } from '../utils/diff_file';
import DiffContent from './diff_content.vue';
import DiffFileHeader from './diff_file_header.vue'; import DiffFileHeader from './diff_file_header.vue';
export default { export default {
......
- blob = local_assigns.fetch(:blob, nil)
- simple_viewer = blob.simple_viewer - simple_viewer = blob.simple_viewer
- rich_viewer = blob.rich_viewer - rich_viewer = blob.rich_viewer
- rich_viewer_active = rich_viewer && params[:viewer] != 'simple' - rich_viewer_active = rich_viewer && params[:viewer] != 'simple'
......
- blame = local_assigns.fetch(:blame, false) - blame = local_assigns.fetch(:blame, false)
- blob = local_assigns.fetch(:blob, nil)
.js-file-title.file-title-flex-parent .js-file-title.file-title-flex-parent
= render 'projects/blob/header_content', blob: blob = render 'projects/blob/header_content', blob: blob
......
- diff_file = local_assigns.fetch(:diff_file, nil)
.diff-content .diff-content
= render 'projects/diffs/viewer', viewer: diff_file.viewer = render 'projects/diffs/viewer', viewer: diff_file.viewer
.js-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki_page_content', tracking_context: wiki_page_tracking_context(@page).to_json } }
= render_wiki_content(@page)
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
%div %div
- if can?(current_user, :create_wiki, @wiki.container) && @page.latest? && @valid_encoding - if can?(current_user, :create_wiki, @wiki.container) && @page.latest? && @valid_encoding
= link_to sprite_icon('pencil', css_class: 'gl-icon'), wiki_page_path(@wiki, @page, action: :edit), title: 'Edit', role: "button", class: 'btn gl-button btn-icon btn-default js-wiki-edit', data: { qa_selector: 'edit_page_button', testid: 'wiki_edit_button' } = link_to sprite_icon('pencil', css_class: 'gl-icon'), wiki_page_path(@wiki, @page, action: :edit), title: 'Edit', role: "button", class: 'btn gl-button btn-icon btn-default js-wiki-edit', data: { qa_selector: 'edit_page_button', testid: 'wiki_edit_button' }
.js-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki_page_content', tracking_context: wiki_page_tracking_context(@page).to_json } } = render 'shared/wikis/wiki_content'
= render_wiki_content(@page)
= render 'shared/wikis/sidebar' = render 'shared/wikis/sidebar'
...@@ -11,10 +11,13 @@ module QA ...@@ -11,10 +11,13 @@ module QA
base.view 'app/views/shared/wikis/show.html.haml' do base.view 'app/views/shared/wikis/show.html.haml' do
element :wiki_page_title element :wiki_page_title
element :wiki_page_content
element :edit_page_button element :edit_page_button
end end
base.view 'app/views/shared/wikis/_wiki_content.html.haml' do
element :wiki_page_content
end
base.view 'app/views/shared/wikis/_main_links.html.haml' do base.view 'app/views/shared/wikis/_main_links.html.haml' do
element :new_page_button element :new_page_button
element :page_history_button element :page_history_button
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment