Sha256: 87cb2c8edc5ab818a02aa38a5fea40ba25238b5439b5007d303e588bdae59d92
Contents?: true
Size: 1.54 KB
Versions: 1
Compression:
Stored size: 1.54 KB
Contents
<h2> Edit a node</h2> <% if @node %> <ul> <%= form_for @node, :url => { :action => :update } do |f| %> <%= f.label :name, "Name:" %> <%= f.text_field :name %> <br /> <p><%= f.label :description, "Description:" %> <div verticalalign="top"> <p><%= f.text_area :description, :rows => 5, :cols => 50 %><p/> </div> </p> <p><%= f.submit "Submit", :disable_with => 'Submitting...' %></p> <% end %> </ul> <%= link_to "Delete #{@node.name}.", controller: :taxonomite, action: :destroy, id: @node.id %> <ul> </ul> <% if @node.parent %> <h3>Parent:</h3> <ul> <li><%= link_to @node.parent.name, taxonomite_path(@node.parent) %> <%= link_to 'break', ['node', :breakparent, :id => @node] %></li> </ul> <% end %> <% if @node.children.length > 0 %> <h3>Children:</h3> <ul> <% for child in @node.children do %> <li><%= link_to child.name, taxonomite_path(child.id) %> <%= link_to 'Remove', ['node', :remchild, :node => child] %></li> <% end %> </ul> <% end %> <h3>Add children:</h3> <ul> <% for p in Taxonomite::Taxon.all.each do %> <% unless p == @node || @node.children.find(p) %> <li><%= p.name %> (<%= p.entity_type %>) -- <%= link_to 'Add', ['node', :addchild, :node => p] %></li> <% end %> <% end %> </ul> <% else %> <p>Unable to find a node.</p> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
taxonomite-0.1.0 | spec/dummy/app/views/taxonomite/edit.html.erb |