Commit 2681a01bcf1230cc54764db4c40d12befb4c48a7

Authored by Dmitriy Zaporozhets
1 parent a685624d

add resize button for better wiki reading

app/assets/javascripts/main.js.coffee
@@ -53,6 +53,12 @@ $ -> @@ -53,6 +53,12 @@ $ ->
53 $('.trigger-submit').on 'change', -> 53 $('.trigger-submit').on 'change', ->
54 $(@).parents('form').submit() 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 # Flash 62 # Flash
57 if (flash = $(".flash-container")).length > 0 63 if (flash = $(".flash-container")).length > 0
58 flash.click -> $(@).fadeOut() 64 flash.click -> $(@).fadeOut()
app/views/commits/_diffs.html.haml
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 %span= diff.old_path 25 %span= diff.old_path
26 26
27 - if @commit.prev_commit 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 View file @ 29 View file @
30 %span.commit-short-id= @commit.short_id(6) 30 %span.commit-short-id= @commit.short_id(6)
31 - else 31 - else
app/views/wikis/edit.html.haml
1 %h3.page_title Editing page 1 %h3.page_title Editing page
2 -%hr  
3 = render 'form' 2 = render 'form'
4 3
5 .pull-right 4 .pull-right
app/views/wikis/show.html.haml
1 .row 1 .row
2 - .span3 2 + .span3.writeboards-menu
3 = render 'writeboards/nav' 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 - if @wiki != @most_recent_wiki 5 - if @wiki != @most_recent_wiki
18 - .warning_message 6 + .alert
19 This is an old version of this page. 7 This is an old version of this page.
20 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)}. 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 .file_holder 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 .file_content.wiki 25 .file_content.wiki
24 = preserve do 26 = preserve do
25 = markdown @wiki.content 27 = markdown @wiki.content