diff --git a/app/controllers/themen_controller.rb b/app/controllers/themen_controller.rb index 66a10eb..1b5a875 100644 --- a/app/controllers/themen_controller.rb +++ b/app/controllers/themen_controller.rb @@ -92,7 +92,13 @@ class ThemenController < ApplicationController end end end - def fragen + def is_updated + @thema = Thema.find(params[:id]) + @thema.translation.touch + + redirect_to @thema + end + def fragen @thema = Thema.find(params[:id]) @fragen=@thema.fragen respond_to do |format| diff --git a/app/views/themen/_small.html.erb b/app/views/themen/_small.html.erb index 2e4b269..7fa22c6 100644 --- a/app/views/themen/_small.html.erb +++ b/app/views/themen/_small.html.erb @@ -3,7 +3,7 @@

<%= small.title %> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %>

<% if small.is_outdated? %> -
<%= I18n.t("thema.outdated") %>
+
<%= I18n.t("thema.outdated") %> <%= link_to"Als aktuell markieren",is_updated_thema_path(small), :class=>:btn %>
<% end %> <% if small.isdraft %>
<%= I18n.t("thema.isdraft") %>
diff --git a/config/routes.rb b/config/routes.rb index ec9e760..a7c5835 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -155,6 +155,7 @@ Fetsite::Application.routes.draw do get :fragen get :verwalten get :sanitize + get :is_updated end resources :attachments end