Skip to content

Commit

Permalink
Added new tempalte button to templates#index
Browse files Browse the repository at this point in the history
  • Loading branch information
brzaik committed Mar 11, 2012
1 parent 56e080d commit a53c784
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/views/templates/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section class="C no">
<header id="browse-header">
<h1>All Templates</h1>
<h1>All Templates <%= link_to 'New Template', new_template_path, :class => "btn" %></h1>
</header>
<div id="browse-body" class="C-cont">
<%= render "list_body" %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/templates/index.js.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$('#browse-header').html("<h1>All Templates</h1>");
$('#browse-header').html("<h1>All Templates <%= escape_javascript(link_to 'New Template', new_template_path, :class => "btn") %></h1>");
$('section.C').addClass('no');
$('#browse-body').html("<%= escape_javascript(render :partial => 'templates/list_body') %>");
14 changes: 9 additions & 5 deletions app/views/templates/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<h1>New template</h1>

<%= render 'form' %>


<section class="C no">
<header id="browse-header">
<%= back_button :back %>
<h1>New Template</h1>
</header>
<div id="browse-body" class="C-cont">
<%= render 'form' %>
</div>
</section>

0 comments on commit a53c784

Please sign in to comment.