72 lines
1.2 KiB
Plaintext
72 lines
1.2 KiB
Plaintext
.qi_header
|
|
%h1
|
|
Blog
|
|
%span
|
|
Liste des articles
|
|
|
|
|
|
|
|
|
|
|
|
.qi_row
|
|
.col-xs-9
|
|
|
|
.qi_pannel.qi_plain.padding
|
|
.header
|
|
.right= link_to 'Ajouter un article', new_admin_article_path(), :class => "btn btn-primary", :remote => true
|
|
%h2
|
|
Liste des articles
|
|
="(#{@lang.slug})"
|
|
|
|
#articles_index=render :partial => "index_block"
|
|
|
|
.col-xs-3
|
|
|
|
.qi_pannel.qi_plain.padding
|
|
%h3 Tags
|
|
=render :partial => "tags"
|
|
|
|
|
|
:coffeescript
|
|
root = exports ? this
|
|
root.tag_id = []
|
|
|
|
|
|
$(document.body).on "click", "#tags .tag_label", ->
|
|
|
|
if $(this).hasClass("active")
|
|
$(this).removeClass "active"
|
|
|
|
else
|
|
$(this).addClass "active"
|
|
|
|
root.tag_id = []
|
|
|
|
$("#tags .tag_label.active").each ->
|
|
root.tag_id.push $(this).data "tag_id"
|
|
|
|
if root.tag_id.length > 0
|
|
$(".set_tag").show()
|
|
else
|
|
$(".set_tag").hide()
|
|
|
|
|
|
$(document.body).on "click", ".set_tag", ->
|
|
|
|
$.ajax({
|
|
url:$(this).attr("href"),
|
|
type: "PUT",
|
|
data: {
|
|
tag_id : tag_id
|
|
}
|
|
|
|
})
|
|
|
|
return false
|
|
|
|
|
|
|
|
|
|
|
|
|