Commit c27105f8c3dc8b0baec0d36f339dbfc943ff155b
1 parent
14c97237
Exists in
master
and in
4 other branches
Fixed dashboard loader, fixed 404 for reporter on empty wiki page.
Styled Wiki edit page
Showing
7 changed files
with
28 additions
and
27 deletions
Show diff stats
app/assets/javascripts/pager.js
app/controllers/wikis_controller.rb
... | ... | @@ -13,18 +13,16 @@ class WikisController < ApplicationController |
13 | 13 | @wiki = @project.wikis.where(:slug => params[:id]).order("created_at").last |
14 | 14 | end |
15 | 15 | |
16 | - unless @wiki | |
17 | - return render_404 unless can?(current_user, :write_wiki, @project) | |
18 | - end | |
19 | - | |
20 | 16 | @note = @project.notes.new(:noteable => @wiki) |
21 | 17 | |
22 | - respond_to do |format| | |
23 | - if @wiki | |
24 | - format.html | |
25 | - else | |
18 | + if @wiki | |
19 | + render 'show' | |
20 | + else | |
21 | + if can?(current_user, :write_wiki, @project) | |
26 | 22 | @wiki = @project.wikis.new(:slug => params[:id]) |
27 | - format.html { render "edit" } | |
23 | + render 'edit' | |
24 | + else | |
25 | + render 'empty' | |
28 | 26 | end |
29 | 27 | end |
30 | 28 | end | ... | ... |
app/views/help/permissions.html.haml
... | ... | @@ -38,7 +38,6 @@ |
38 | 38 | %li Push to non-protected branches |
39 | 39 | %li Remove non-protected branches |
40 | 40 | %li Add tags |
41 | - %li Create new merge request | |
42 | 41 | %li Write a wiki |
43 | 42 | |
44 | 43 | .ui-box.span3 |
... | ... | @@ -55,7 +54,6 @@ |
55 | 54 | %li Push to non-protected branches |
56 | 55 | %li Remove non-protected branches |
57 | 56 | %li Add tags |
58 | - %li Create new merge request | |
59 | 57 | %li Write a wiki |
60 | 58 | %li Add new team members |
61 | 59 | %li Push to protected branches | ... | ... |
app/views/projects/files.html.haml
app/views/wikis/_form.html.haml
... | ... | @@ -6,19 +6,21 @@ |
6 | 6 | - @wiki.errors.full_messages.each do |msg| |
7 | 7 | %li= msg |
8 | 8 | |
9 | - .alert-message.block-message.warning | |
10 | - %p | |
11 | - Wiki content is parsed with #{link_to "Markdown", "http://en.wikipedia.org/wiki/Markdown"}. | |
12 | - %br | |
13 | - To add link to new page you can just type | |
14 | - %code [Link Title](page-slug) | |
15 | - .clearfix | |
16 | - = f.label :title | |
17 | - .input= f.text_field :title, :class => :xxlarge | |
18 | - = f.hidden_field :slug | |
19 | - .clearfix | |
20 | - = f.label :content | |
21 | - .input= f.text_area :content, :class => :xxlarge | |
9 | + .main_box | |
10 | + .top_box_content | |
11 | + = f.label :title | |
12 | + .input= f.text_field :title, :class => 'span8' | |
13 | + = f.hidden_field :slug | |
14 | + .middle_box_content | |
15 | + .input | |
16 | + %span.cgray | |
17 | + Wiki content is parsed with #{link_to "Markdown", "http://en.wikipedia.org/wiki/Markdown"}. | |
18 | + To add link to new page you can just type | |
19 | + %code [Link Title](page-slug) | |
20 | + | |
21 | + .bottom_box_content | |
22 | + = f.label :content | |
23 | + .input= f.text_area :content, :class => 'span8' | |
22 | 24 | .actions |
23 | 25 | = f.submit 'Save', :class => "primary btn" |
24 | 26 | = link_to "Cancel", project_wiki_path(@project, :index), :class => "btn" | ... | ... |
app/views/wikis/edit.html.haml