Sha256: 5bdae95df705c902b9f02783da2909864c68ddae8217205a9d258b07474ad22e

Contents?: true

Size: 1.01 KB

Versions: 17

Compression:

Stored size: 1.01 KB

Contents

<%= content_for :html_head do %>
<script type="text/javascript">
jQuery(function($){
  $("#page_name").keyup(function(){
    var section = { name: <%= @page.section.name.to_json.html_safe %>, path: <%= @page.section.path.to_json.html_safe %> };
    var page_name = $.trim($("#page_name").val())
    if (page_name == section.name || page_name == 'Overview') {
      $("#page_path").val(section.path)
    } else {
      $("#page_path").val(
        section.path.replace(/\/$/, '') + "/" + $.cms.slug(page_name)
      )
    }
  });
});
</script>
<% end %>

<% page_title "New Page" %>
<%= content_for :functions do %>
<%= "<h1>#{ @page_title }</h1>" %> 
<%= link_to(span_tag("list all"), cms.sitemap_path, :class => "button") %>
<br clear="all"/>
<% end %>
<%= form_for(@page) do |f| %>
  <%= hidden_field_tag :section_id, @page.section_id %>
  
  <%= render :partial => 'form', :locals => {:f => f} %>
  <div class="buttons">
  <%= lt_button_wrapper(f.submit("Save", :class => "submit", :tabindex => next_tabindex)) %>
  </div>
<% end %>

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
browsercms-3.5.7 app/views/cms/pages/new.html.erb
browsercms-3.5.6 app/views/cms/pages/new.html.erb
browsercms-3.5.5 app/views/cms/pages/new.html.erb
browsercms-3.5.4 app/views/cms/pages/new.html.erb
browsercms-3.5.3 app/views/cms/pages/new.html.erb
browsercms-3.5.2 app/views/cms/pages/new.html.erb
browsercms-3.5.1 app/views/cms/pages/new.html.erb
browsercms-3.5.0 app/views/cms/pages/new.html.erb
browsercms-3.5.0.rc3 app/views/cms/pages/new.html.erb
browsercms-3.5.0.rc2 app/views/cms/pages/new.html.erb
browsercms-3.5.0.rc1 app/views/cms/pages/new.html.erb
browsercms-3.4.2 app/views/cms/pages/new.html.erb
browsercms-3.4.2.rc1 app/views/cms/pages/new.html.erb
browsercms-3.4.1 app/views/cms/pages/new.html.erb
browsercms-3.4.0 app/views/cms/pages/new.html.erb
browsercms-3.4.0.rc2 app/views/cms/pages/new.html.erb
browsercms-3.4.0.rc1 app/views/cms/pages/new.html.erb