drop doc#book endpoint
This is from an old mock-up of the book code. It doesn't actually work (it returns a 500 probably because the database schema has changed). The real endpoint is "/books", so let's redirect there.
This commit is contained in:
Родитель
0740d7bf3e
Коммит
c635f6b477
|
@ -1,35 +0,0 @@
|
|||
<%- @section = 'documentation' %>
|
||||
<%- @subsection = 'book' %>
|
||||
<%- @page_title = "Git - Book" %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'translations' %>
|
||||
<% end %>
|
||||
|
||||
<div id='main'>
|
||||
<h1>Book</h1>
|
||||
<img style="float:right;margin: -20px 40px 0 40px;" src="/images/books/pro-git@2x.jpg" width="118" height="157" />
|
||||
<p>
|
||||
The entire Pro Git book, written by Scott Chacon and Ben Straub and published by Apress, is available here. All content is licensed under the <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution Non Commercial Share Alike 3.0 license</a>. Print versions of the book are available on <a href="http://www.amazon.com/gp/product/1430218339?ie=UTF8&camp=1789&creative=9325&creativeASIN=1430218339&linkCode=as2&tag=git-sfconservancy-20">Amazon.com</a>.</>
|
||||
</p>
|
||||
<ol class='book-toc'>
|
||||
<% @book.chapters.each do |chapter| %>
|
||||
<li class='chapter'>
|
||||
<h2><%= chapter.number %>. <a href="/book/<%= @book.code %>/<%=u chapter.sections.first.slug %>"><%=raw chapter.title %></a></h2>
|
||||
<ol>
|
||||
<% chapter.sections.each do |section| %>
|
||||
<% if !section.title.empty? %>
|
||||
<li>
|
||||
<%= chapter.number %>.<%= section.number %>
|
||||
<a href="/book/<%= @book.code %>/<%= u(section.slug) %>"><%=raw section.title %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ol>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class='chapter'>
|
||||
<h2><a href="/book/commands">Index of Commands</a></h2>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
|
@ -1,14 +0,0 @@
|
|||
<% @section = 'documentation' %>
|
||||
<% @subsection = 'book' %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'translations' %>
|
||||
<%= render 'shared/related' %>
|
||||
<% end %>
|
||||
|
||||
<div id='main' class="book">
|
||||
<% if !@content.title.empty? %>
|
||||
<h1><%= @content.cs_number %> <%=raw @content.chapter.title %> - <%=raw @content.title %></h1>
|
||||
<% end %>
|
||||
<div><%=raw linkify(@content.html, @content) %></div>
|
||||
</div>
|
|
@ -86,7 +86,7 @@ Gitscm::Application.routes.draw do
|
|||
get "/documentation" => "doc#index"
|
||||
get "/documentation/reference" => "doc#ref"
|
||||
get "/documentation/reference/:file.html" => "doc#man"
|
||||
get "/documentation/book" => "doc#book"
|
||||
get "/documentation/book" => redirect("/book")
|
||||
get "/documentation/videos" => "doc#videos"
|
||||
get "/documentation/external-links" => "doc#ext"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче