Commit 2681a01bcf1230cc54764db4c40d12befb4c48a7
1 parent
a685624d
Exists in
master
and in
4 other branches
add resize button for better wiki reading
Showing
4 changed files
with
24 additions
and
17 deletions
Show diff stats
app/assets/javascripts/main.js.coffee
... | ... | @@ -53,6 +53,12 @@ $ -> |
53 | 53 | $('.trigger-submit').on 'change', -> |
54 | 54 | $(@).parents('form').submit() |
55 | 55 | |
56 | + # Wiki resizer | |
57 | + $('.wiki-fullscreen').on 'click', -> | |
58 | + $('.writeboards-menu').toggleClass('hide') | |
59 | + $('.writeboards-content').toggleClass('span9').toggleClass('span12') | |
60 | + | |
61 | + | |
56 | 62 | # Flash |
57 | 63 | if (flash = $(".flash-container")).length > 0 |
58 | 64 | flash.click -> $(@).fadeOut() | ... | ... |
app/views/commits/_diffs.html.haml
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | %span= diff.old_path |
26 | 26 | |
27 | 27 | - if @commit.prev_commit |
28 | - = link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn pull-right view-file'} do | |
28 | + = link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn btn-tiny pull-right view-file'} do | |
29 | 29 | View file @ |
30 | 30 | %span.commit-short-id= @commit.short_id(6) |
31 | 31 | - else | ... | ... |
app/views/wikis/edit.html.haml
app/views/wikis/show.html.haml
1 | 1 | .row |
2 | - .span3 | |
2 | + .span3.writeboards-menu | |
3 | 3 | = render 'writeboards/nav' |
4 | - .span9 | |
5 | - %h3.page_title | |
6 | - = @wiki.title | |
7 | - %span.pull-right | |
8 | - = link_to pages_project_wikis_path(@project), class: "btn btn-small grouped" do | |
9 | - Pages | |
10 | - - if can? current_user, :write_wiki, @project | |
11 | - = link_to history_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do | |
12 | - History | |
13 | - = link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do | |
14 | - %i.icon-edit | |
15 | - Edit | |
16 | - %br | |
4 | + .span9.writeboards-content | |
17 | 5 | - if @wiki != @most_recent_wiki |
18 | - .warning_message | |
6 | + .alert | |
19 | 7 | This is an old version of this page. |
20 | 8 | You can view the #{link_to "most recent version", project_wiki_path(@project, @wiki)} or browse the #{link_to "history", history_project_wiki_path(@project, @wiki)}. |
21 | 9 | |
22 | 10 | .file_holder |
11 | + .file_title | |
12 | + = link_to '#', class: 'wiki-fullscreen' do | |
13 | + %i.icon-resize-horizontal | |
14 | + = @wiki.title | |
15 | + %span.options | |
16 | + = link_to pages_project_wikis_path(@project), class: "btn btn-tiny grouped" do | |
17 | + Pages | |
18 | + - if can? current_user, :write_wiki, @project | |
19 | + = link_to history_project_wiki_path(@project, @wiki), class: "btn btn-tiny grouped" do | |
20 | + History | |
21 | + = link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-tiny grouped" do | |
22 | + %i.icon-edit | |
23 | + Edit | |
24 | + | |
23 | 25 | .file_content.wiki |
24 | 26 | = preserve do |
25 | 27 | = markdown @wiki.content | ... | ... |