Sha256: 97618353c4fdb91bc1e3ace7eac9a939f16e53c094885f4baee4fa0d03317502

Contents?: true

Size: 507 Bytes

Versions: 4

Compression:

Stored size: 507 Bytes

Contents

<p>
  <strong>Current tags</strong>
  <br /><% Tag.find( :all ).sort_by { |t| t.tag.upcase }.each do |tag| %>
  <%= link_to_function( h( tag.tag ), "add_tag( '#{ tag.tag }' )" ) %>
  <% end %>
</p>
<script type="text/javascript">
function add_tag( new_tag ) {
  tag_str = $('blog_post_tags').value;
  tags = tag_str.split( ' ' );
  if ( !tags.include( new_tag ) ) { tags.push( new_tag ); }
  tags = tags.reject(function(v) { return (v == '') });
  $('blog_post_tags').value = tags.join( ' ' );
}
</script>

Version data entries

4 entries across 3 versions & 1 rubygems

Version Path
admin_assistant-2.1.0 rails_3_0/app/views/admin/blog_posts2/_after_tags_input.html.erb
admin_assistant-2.0.1 rails_2_test/app/views/admin/blog_posts2/_after_tags_input.html.erb
admin_assistant-2.0.1 rails_3_test/app/views/admin/blog_posts2/_after_tags_input.html.erb
admin_assistant-1.0.1 test_rails_app/app/views/admin/blog_posts2/_after_tags_input.html.erb