Sha256: ebc3f35d1337ec501f1b9166c610fe963c0f575ae145433f4d65e76ac105e85f

Contents?: true

Size: 1.72 KB

Versions: 2

Compression:

Stored size: 1.72 KB

Contents

<!-- page content -->
<div class="right_col" role="main">
  <div class="">
    <div class="page-title">
      <div class="title_left">
        <h3>Update Category</h3>
      </div>

    </div>
    <div class="clearfix"></div>

    <div class="row">

      <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel" style="height:600px;">
          <div class="x_title">

		    <%= form_for(:category, url: admin_update_category_path(id: @category.id)) do |f| %>

		    	<div class="field form-group">
		      		<%= f.label :name %>
		      		<%= f.text_field :name, class: 'form-control', value: @category.name %>
		      	</div>

		      	<div class="field form-group">
		      		<%= f.label :description %>
		      		<%= f.text_area :description, class: 'form-control', value: @category.description %>
		      	</div>

		      	<div class="field form-group">
			      <%= f.label :parent_id %>
            <select name="category[parent_id]">
              <option value="">Root</option>
              <% RailsMarketplace::Category.walk_tree do |cat, level| level += 1%>
                <option value="<%=cat.id%>" <% if cat.id == @category.parent_id %>selected<% end %>><%="#{'-' * level} #{cat.name}"%></option>
              <% end %>
            </select>
			      
            </div>

		      <br><br>
		      <%= f.submit "Submit", class: "btn btn-primary" %>
		    <% end %>

            <div class="clearfix"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- /page content -->


<script type="text/javascript">
  $(document).ready(function(){

    $('.wysihtml5').each(function(i, elem) {
      $(elem).wysihtml5();
    });

  })
</script>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_marketplace-0.0.2 app/views/rails_marketplace/admin/edit_category.html.erb
rails_marketplace-0.0.1 app/views/rails_marketplace/admin/edit_category.html.erb