-
Notifications
You must be signed in to change notification settings - Fork 53
/
index.html.haml
57 lines (54 loc) · 2.07 KB
/
index.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
=h1 "Le suivi"
- feed "Flux Atom du suivi"
- feed "Flux Atom des commentaires", "/suivi/comments.atom"
%nav.toolbox
%h2 <strong>#{Tracker.opened.count}</strong> entrées ouvertes sur un total de #{Tracker.count}
.new_content
= link_to "Proposer une entrée", "/suivi/nouveau"
= form_for @tracker, :url => trackers_path, :html => { :method => :get } do |f|
%h2 Filtrer les entrées du suivi
%p
= f.label :state, "État : "
= f.select :state, Tracker::States.invert, :include_blank => true
%p
= f.label :category_id, "Catégorie : "
= f.collection_select :category_id, Category.all, :id, :title, :include_blank => true
%p
= f.label :assigned_to_user_id, "Assigné à : "
= f.collection_select :assigned_to_user_id, Account.admin, :id, :name, :include_blank => true
%p
= label_tag :order, "Trier par : "
= select_tag :order, options_for_select({ "Date d'ouverture" => "created_at", "Note" => "score", "Nombre de commentaires" => "comments_count", "Dernier commentaire" => "last_commented_at" }, @order)
%p
= submit_tag "Filtrer"
#contents
- if @trackers.empty?
%p
Pas d'entrées dans le suivi
- else
%table#tracker
%tr
%th N°
%th Titre
%th Date d'ouverture
%th Assigné à
%th Envoyé par
%th Catégorie
%th État
%th Note
%th Commentaires
- if current_account && current_account.can_update?(@trackers.first)
%th Actions
- @trackers.each do |tracker|
%tr{:class => tracker.state}
%td= link_to tracker.id, tracker
%td= link_to tracker.title, tracker
%td= tracker.created_at.to_s(:posted)
%td= tracker.assigned_to
%td= tracker.user ? link_to(tracker.user.name, tracker.user) : "Anonyme"
%td= tracker.category_title
%td= tracker.state_name
%td.number= tracker.score
%td.number= tracker.comments.count
- if current_account && current_account.can_update?(tracker)
%td= link_to "Modifier", "/suivi/#{tracker.to_param}/modifier"