BigW Consortium Gitlab

Removed Delete, Replace and New dir modals

parent d8433217
...@@ -50,9 +50,5 @@ export default RepoFileButtons; ...@@ -50,9 +50,5 @@ export default RepoFileButtons;
</div> </div>
<a href="#" v-if="canPreview" @click.prevent="rawPreviewToggle" class="btn btn-default preview">{{activeFileLabel}}</a> <a href="#" v-if="canPreview" @click.prevent="rawPreviewToggle" class="btn btn-default preview">{{activeFileLabel}}</a>
<button type="button" class="btn btn-default replace" data-target="#modal-upload-blob" data-toggle="modal">Replace</button>
<a href="#" class="btn btn-danger delete">Delete</a>
</div> </div>
</template> </template>
#repo{ data: { url: repo_url(@project), 'project-name' => @project.name, refs_url: refs_namespace_project_path(@project.namespace, @project, format: "json"), project_url: namespace_project_path(@project.namespace, @project), project_id: @project.id, temp_token: @current_user.private_token } } #repo{ data: { url: repo_url(@project), 'project-name' => @project.name, refs_url: refs_namespace_project_path(@project.namespace, @project, format: "json"), project_url: namespace_project_path(@project.namespace, @project), project_id: @project.id, temp_token: @current_user.private_token } }
- if can_edit_tree?
= render 'projects/blob/upload', title: _('Upload New File'), placeholder: _('Upload New File'), button_title: _('Upload file'), form_path: project_create_blob_path(@project, @id), method: :post
= render 'projects/blob/new_dir'
:javascript :javascript
// Load last commit log for each file in tree // Load last commit log for each file in tree
$('#tree-slider').waitForImages(function() { $('#tree-slider').waitForImages(function() {
......
...@@ -9,7 +9,7 @@ describe('RepoFileButtons', () => { ...@@ -9,7 +9,7 @@ describe('RepoFileButtons', () => {
return new RepoFileButtons().$mount(); return new RepoFileButtons().$mount();
} }
it('renders Raw, Blame, History, Permalink, Lock, Preview toggle, Replace and Delete', () => { it('renders Raw, Blame, History, Permalink, Lock and Preview toggle', () => {
const activeFile = { const activeFile = {
extension: 'md', extension: 'md',
url: 'url', url: 'url',
...@@ -24,7 +24,6 @@ describe('RepoFileButtons', () => { ...@@ -24,7 +24,6 @@ describe('RepoFileButtons', () => {
const raw = vm.$el.querySelector('.raw'); const raw = vm.$el.querySelector('.raw');
const blame = vm.$el.querySelector('.blame'); const blame = vm.$el.querySelector('.blame');
const history = vm.$el.querySelector('.history'); const history = vm.$el.querySelector('.history');
const replace = vm.$el.querySelector('.replace');
expect(vm.$el.id).toEqual('repo-file-buttons'); expect(vm.$el.id).toEqual('repo-file-buttons');
expect(vm.$el.style.borderBottom).toEqual('1px solid rgb(31, 120, 209)'); expect(vm.$el.style.borderBottom).toEqual('1px solid rgb(31, 120, 209)');
...@@ -37,10 +36,6 @@ describe('RepoFileButtons', () => { ...@@ -37,10 +36,6 @@ describe('RepoFileButtons', () => {
expect(vm.$el.querySelector('.permalink').textContent).toEqual('Permalink'); expect(vm.$el.querySelector('.permalink').textContent).toEqual('Permalink');
expect(vm.$el.querySelector('.lock').textContent).toEqual('Lock'); expect(vm.$el.querySelector('.lock').textContent).toEqual('Lock');
expect(vm.$el.querySelector('.preview').textContent).toEqual(activeFileLabel); expect(vm.$el.querySelector('.preview').textContent).toEqual(activeFileLabel);
expect(replace.dataset.target).toEqual('#modal-upload-blob');
expect(replace.dataset.toggle).toEqual('modal');
expect(replace.textContent).toEqual('Replace');
expect(vm.$el.querySelector('.delete').textContent).toEqual('Delete');
}); });
it('renders a white border if not editMode', () => { it('renders a white border if not editMode', () => {
......
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