diff options
Diffstat (limited to 'app/views/projects/wikis')
-rw-r--r-- | app/views/projects/wikis/_form.html.haml | 46 | ||||
-rw-r--r-- | app/views/projects/wikis/_main_links.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/wikis/_nav.html.haml | 19 | ||||
-rw-r--r-- | app/views/projects/wikis/_new.html.haml | 14 | ||||
-rw-r--r-- | app/views/projects/wikis/edit.html.haml | 13 | ||||
-rw-r--r-- | app/views/projects/wikis/empty.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/wikis/git_access.html.haml | 31 | ||||
-rw-r--r-- | app/views/projects/wikis/history.html.haml | 30 | ||||
-rw-r--r-- | app/views/projects/wikis/pages.html.haml | 12 | ||||
-rw-r--r-- | app/views/projects/wikis/show.html.haml | 20 |
10 files changed, 0 insertions, 197 deletions
diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml deleted file mode 100644 index 9fbfa0b1aeb..00000000000 --- a/app/views/projects/wikis/_form.html.haml +++ /dev/null @@ -1,46 +0,0 @@ -= form_for [@project.namespace.becomes(Namespace), @project, @page], method: @page.persisted? ? :put : :post, html: { class: 'form-horizontal wiki-form gfm-form' } do |f| - -if @page.errors.any? - #error_explanation - .alert.alert-danger - - @page.errors.full_messages.each do |msg| - %p= msg - - = f.hidden_field :title, value: @page.title - .form-group - = f.label :format, class: 'control-label' - .col-sm-10 - = f.select :format, options_for_select(ProjectWiki::MARKUPS, {selected: @page.format}), {}, class: "form-control" - - .row - .col-sm-2 - .col-sm-10 - %p.cgray - To link to a (new) page you can just type - %code [Link Title](page-slug) - \. - - .form-group.wiki-content - = f.label :content, class: 'control-label' - .col-sm-10 - = render layout: 'projects/md_preview', locals: { preview_class: "wiki" } do - = render 'projects/zen', f: f, attr: :content, classes: 'description form-control' - .col-sm-12.hint - .pull-left Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'} - .pull-right Attach files by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }. - - .clearfix - .error-alert - .form-group - = f.label :commit_message, class: 'control-label' - .col-sm-10= f.text_field :message, class: 'form-control', rows: 18 - - .form-actions - - if @page && @page.persisted? - = f.submit 'Save changes', class: "btn-save btn" - = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, @page), class: "btn btn-cancel" - - else - = f.submit 'Create page', class: "btn-create btn" - = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, :home), class: "btn btn-cancel" - -:javascript - window.project_uploads_path = "#{namespace_project_uploads_path @project.namespace, @project}"; diff --git a/app/views/projects/wikis/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml deleted file mode 100644 index 633214a4e86..00000000000 --- a/app/views/projects/wikis/_main_links.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -%span.pull-right - - if (@page && @page.persisted?) - = link_to history_namespace_project_wiki_path(@project.namespace, @project, @page), class: "btn btn-grouped" do - Page History - - if can?(current_user, :write_wiki, @project) - = link_to edit_namespace_project_wiki_path(@project.namespace, @project, @page), class: "btn btn-grouped" do - %i.fa.fa-pencil-square-o - Edit diff --git a/app/views/projects/wikis/_nav.html.haml b/app/views/projects/wikis/_nav.html.haml deleted file mode 100644 index 693c3facb32..00000000000 --- a/app/views/projects/wikis/_nav.html.haml +++ /dev/null @@ -1,19 +0,0 @@ -%ul.nav.nav-tabs - = nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do - = link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home) - - = nav_link(path: 'wikis#pages') do - = link_to 'Pages', pages_namespace_project_wikis_path(@project.namespace, @project) - - = nav_link(path: 'wikis#git_access') do - = link_to git_access_namespace_project_wikis_path(@project.namespace, @project) do - %i.fa.fa-download - Git Access - - - if can?(current_user, :write_wiki, @project) - .pull-right - = link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do - %i.fa.fa-plus - New Page - -= render 'projects/wikis/new' diff --git a/app/views/projects/wikis/_new.html.haml b/app/views/projects/wikis/_new.html.haml deleted file mode 100644 index 6834969de8b..00000000000 --- a/app/views/projects/wikis/_new.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -%div#modal-new-wiki.modal.hide - .modal-dialog - .modal-content - .modal-header - %a.close{href: "#", "data-dismiss" => "modal"} × - %h3.page-title New Wiki Page - .modal-body - = label_tag :new_wiki_path do - %span Page slug - = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'form-control', required: true, :'data-wikis-path' => namespace_project_wikis_path(@project.namespace, @project) - %p.hint - Please don't use spaces. - .modal-footer - = link_to 'Build', '#', class: 'build-new-wiki btn btn-create' diff --git a/app/views/projects/wikis/edit.html.haml b/app/views/projects/wikis/edit.html.haml deleted file mode 100644 index 566850cb78d..00000000000 --- a/app/views/projects/wikis/edit.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -= render 'nav' -.pull-right - = render 'main_links' -%h3.page-title - Editing - - %span.light #{@page.title} -%hr -= render 'form' - -.pull-right - - if @page.persisted? && can?(current_user, :admin_wiki, @project) - = link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-sm btn-remove" do - Delete this page diff --git a/app/views/projects/wikis/empty.html.haml b/app/views/projects/wikis/empty.html.haml deleted file mode 100644 index 48058124f97..00000000000 --- a/app/views/projects/wikis/empty.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -%h3.page-title Empty page -%hr -.error_message - You are not allowed to create wiki pages diff --git a/app/views/projects/wikis/git_access.html.haml b/app/views/projects/wikis/git_access.html.haml deleted file mode 100644 index 365edb524f4..00000000000 --- a/app/views/projects/wikis/git_access.html.haml +++ /dev/null @@ -1,31 +0,0 @@ -= render 'nav' -.row - .col-sm-6 - %h3.page-title - Git access for - %strong= @project_wiki.path_with_namespace - - .col-sm-6 - = render "shared/clone_panel", project: @project_wiki - -.git-empty - %fieldset - %legend Install Gollum: - %pre.dark - :preserve - gem install gollum - - %legend Clone Your Wiki: - %pre.dark - :preserve - git clone #{ content_tag(:span, default_url_to_repo(@project_wiki), class: 'clone')} - cd #{@project_wiki.path} - - %legend Start Gollum And Edit Locally: - %pre.dark - :preserve - gollum - == Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin - >> Thin web server (v1.5.0 codename Knife) - >> Maximum connections set to 1024 - >> Listening on 0.0.0.0:4567, CTRL+C to stop diff --git a/app/views/projects/wikis/history.html.haml b/app/views/projects/wikis/history.html.haml deleted file mode 100644 index 91291f753f7..00000000000 --- a/app/views/projects/wikis/history.html.haml +++ /dev/null @@ -1,30 +0,0 @@ -= render 'nav' -%h3.page-title - %span.light History for - = link_to @page.title, namespace_project_wiki_path(@project.namespace, @project, @page) - -%table.table - %thead - %tr - %th Page version - %th Author - %th Commit Message - %th Last updated - %th Format - %tbody - - @page.versions.each_with_index do |version, index| - - commit = version - %tr - %td - = link_to project_wiki_path_with_version(@project, @page, - commit.id, index == 0) do - = truncate_sha(commit.id) - %td - = commit.author.name - %td - = commit.message - %td - #{time_ago_with_tooltip(version.authored_date)} - %td - %strong - = @page.page.wiki.page(@page.page.name, commit.id).try(:format) diff --git a/app/views/projects/wikis/pages.html.haml b/app/views/projects/wikis/pages.html.haml deleted file mode 100644 index ee233d9086f..00000000000 --- a/app/views/projects/wikis/pages.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -= render 'nav' -%h3.page-title - All Pages -%ul.bordered-list - - @wiki_pages.each do |wiki_page| - %li - %h4 - = link_to wiki_page.title, namespace_project_wiki_path(@project.namespace, @project, wiki_page) - %small (#{wiki_page.format}) - .pull-right - %small Last edited #{time_ago_with_tooltip(wiki_page.commit.authored_date)} -= paginate @wiki_pages, theme: 'gitlab' diff --git a/app/views/projects/wikis/show.html.haml b/app/views/projects/wikis/show.html.haml deleted file mode 100644 index a6263e93f67..00000000000 --- a/app/views/projects/wikis/show.html.haml +++ /dev/null @@ -1,20 +0,0 @@ -= render 'nav' -%h3.page-title - = @page.title - = render 'main_links' -- if @page.historical? - .warning_message - This is an old version of this page. - You can view the #{link_to "most recent version", namespace_project_wiki_path(@project.namespace, @project, @page)} or browse the #{link_to "history", history_namespace_project_wiki_path(@project.namespace, @project, @page)}. - -%hr - -.wiki-holder - .wiki - = preserve do - = render_wiki_content(@page) - -%hr - -.wiki-last-edit-by - Last edited by #{@page.commit.author.name} #{time_ago_with_tooltip(@page.commit.authored_date)} |