Fixed up the <title>/<h2> mess in trace/edit and trace/view

* @title was never set on trace editing, and thus <h2></h2> was produced
 * Changed split 'trace.view.viewing_trace' into 'trace.view.title' and 'trace.view.heading'
 * Introduced corresponding 'trace.edit.title' and 'trace.edit.heading'
This commit is contained in:
Ævar Arnfjörð Bjarmason 2009-06-22 23:43:53 +00:00
parent 17e9016373
commit dfadcc797c
20 changed files with 24 additions and 20 deletions

View file

@ -111,7 +111,7 @@ class TraceController < ApplicationController
if @trace and @trace.visible? and
(@trace.public? or @trace.user == @user)
@title = t 'trace.view.viewing_trace', :name => @trace.name
@title = t 'trace.view.title', :name => @trace.name
else
flash[:notice] = t 'trace.view.trace_not_found'
redirect_to :controller => 'trace', :action => 'list'
@ -168,6 +168,7 @@ class TraceController < ApplicationController
@trace = Trace.find(params[:id])
if @user and @trace.user == @user
@title = t 'trace.edit.title', :name => @trace.name
if params[:trace]
@trace.description = params[:trace][:description]
@trace.tagstring = params[:trace][:tagstring]

View file

@ -1,4 +1,4 @@
<h2><%= h(@title) %></h2>
<h2><%= t 'trace.edit.heading', :name => @trace.name %></h2>
<img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :display_name => @trace.user.display_name %>">

View file

@ -1,4 +1,4 @@
<h2><%= h(@title) %></h2>
<h2><%= t 'trace.view.heading', :name => @trace.name %></h2>
<% if @trace.inserted %>
<img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :display_name => @trace.user.display_name %>">