create tags page and made tag filter for projects
This commit is contained in:
parent
1e5aa0efff
commit
6e08b5cc85
10 changed files with 62 additions and 24 deletions
|
@ -57,11 +57,8 @@
|
|||
$(function(){
|
||||
var tag_field = $('#tag_field').tagify();
|
||||
|
||||
|
||||
tag_field.tagify('inputField').autocomplete({
|
||||
source: '/tags/autocomplete.json',
|
||||
position: { of: tag_field.tagify('containerDiv') },
|
||||
close: function(event, ui) { tag_field.tagify('add'); },
|
||||
source: '/tags.json'
|
||||
});
|
||||
|
||||
|
||||
|
@ -70,6 +67,4 @@
|
|||
tag_field.val( tag_field.tagify('serialize') );
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
|
|
|
@ -10,7 +10,12 @@
|
|||
|
||||
- @projects.each do |project|
|
||||
%tr{ :class => "project", :url => project_path(project) }
|
||||
%td= project.name
|
||||
%td
|
||||
= project.name
|
||||
.small-tags
|
||||
- project.tag_list.each do |tag|
|
||||
= link_to tag, "/tags/#{tag}"
|
||||
|
||||
%td= truncate project.url_to_repo
|
||||
%td= project.code
|
||||
%td= check_box_tag "read", 1, project.readers.include?(current_user), :disabled => :disabled
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
%h1 Tags#autocomplete
|
||||
%p Find me in app/views/tags/autocomplete.html.haml
|
|
@ -1,2 +1,11 @@
|
|||
%h1 Tags#index
|
||||
%p Find me in app/views/tags/index.html.haml
|
||||
- content_for(:body_class, "projects-page")
|
||||
- content_for(:page_title) do
|
||||
.grid_4
|
||||
%h2
|
||||
Tags
|
||||
|
||||
|
||||
.tags-list
|
||||
- @tags.all.each do |tag|
|
||||
= link_to "#{tag.name}(#{tag.count})", "/tags/#{tag.name}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue