Feature: Adds a button to print a topic

This commit is contained in:
Rafael dos Santos Silva
2016-08-01 01:45:05 -03:00
parent 999f52954f
commit c12e533273
8 changed files with 38 additions and 2 deletions

View File

@@ -1459,6 +1459,10 @@ en:
title: 'Share'
help: 'share a link to this topic'
print:
title: 'Print'
help: 'Open a printer friendly version of this topic'
flag_topic:
title: 'Flag'
help: 'privately flag this topic for attention or send a private notification about it'

View File

@@ -554,6 +554,7 @@ Discourse::Application.routes.draw do
# Topic routes
get "t/id_for/:slug" => "topics#id_for_slug"
get "t/:slug/:topic_id/print" => "topics#show", format: :html, print: true, constraints: {topic_id: /\d+/}
get "t/:slug/:topic_id/wordpress" => "topics#wordpress", constraints: {topic_id: /\d+/}
get "t/:topic_id/wordpress" => "topics#wordpress", constraints: {topic_id: /\d+/}
get "t/:slug/:topic_id/moderator-liked" => "topics#moderator_liked", constraints: {topic_id: /\d+/}