diff options
Diffstat (limited to 'help/app/views')
-rw-r--r-- | help/app/views/tickets/_admin-nav.html.haml | 5 | ||||
-rw-r--r-- | help/app/views/tickets/_order-nav.html.haml | 7 | ||||
-rw-r--r-- | help/app/views/tickets/_status-nav.html.haml | 7 | ||||
-rw-r--r-- | help/app/views/tickets/_table-nav.html.haml | 5 | ||||
-rw-r--r-- | help/app/views/tickets/_ticket.html.haml | 13 | ||||
-rw-r--r-- | help/app/views/tickets/index.html.haml | 37 |
6 files changed, 41 insertions, 33 deletions
diff --git a/help/app/views/tickets/_admin-nav.html.haml b/help/app/views/tickets/_admin-nav.html.haml new file mode 100644 index 0000000..acd45d7 --- /dev/null +++ b/help/app/views/tickets/_admin-nav.html.haml @@ -0,0 +1,5 @@ +%ul.nav.nav-pills.nav-stacked + %li{:class => ("active" if admin == 'mine')} + = link_to 'tickets i admin', {:admin_status => 'mine', :open_status => status} + %li{:class => ("active" if admin_status == 'all')} + = link_to 'all tickets', {:admin_status => 'all', :open_status => status} diff --git a/help/app/views/tickets/_order-nav.html.haml b/help/app/views/tickets/_order-nav.html.haml new file mode 100644 index 0000000..176acdc --- /dev/null +++ b/help/app/views/tickets/_order-nav.html.haml @@ -0,0 +1,7 @@ +%ul.nav.nav-pills.pull-right + %li + = link_to 'created at' + %li{:class=> ("active" if true)} + = link_to do + %i.icon-arrow-up + updated at diff --git a/help/app/views/tickets/_status-nav.html.haml b/help/app/views/tickets/_status-nav.html.haml new file mode 100644 index 0000000..69f4248 --- /dev/null +++ b/help/app/views/tickets/_status-nav.html.haml @@ -0,0 +1,7 @@ +%ul.nav.nav-tabs + %li{:class => ("active" if status == 'open')} + = link_to_status 'open' + %li{:class => ("active" if status == 'closed')} + = link_to_status 'closed' + %li{:class => ("active" if status == 'all')} + = link_to_status 'all' diff --git a/help/app/views/tickets/_table-nav.html.haml b/help/app/views/tickets/_table-nav.html.haml new file mode 100644 index 0000000..635b59b --- /dev/null +++ b/help/app/views/tickets/_table-nav.html.haml @@ -0,0 +1,5 @@ +.row + .span6 + = render 'tickets/status-nav' + .span4 + = render 'tickets/order-nav' diff --git a/help/app/views/tickets/_ticket.html.haml b/help/app/views/tickets/_ticket.html.haml new file mode 100644 index 0000000..3edfa8b --- /dev/null +++ b/help/app/views/tickets/_ticket.html.haml @@ -0,0 +1,13 @@ +%tr + %td + %b + = link_to ticket.title, ticket + %br + %small + created: + = ticket.created_at.to_s(:short) + updated: + = ticket.updated_at.to_s(:short) + %small.pull-right + comments by: + = ticket.commenters diff --git a/help/app/views/tickets/index.html.haml b/help/app/views/tickets/index.html.haml index 7f8fa34..fdbeec5 100644 --- a/help/app/views/tickets/index.html.haml +++ b/help/app/views/tickets/index.html.haml @@ -7,41 +7,12 @@ Create a .row .span2 - if admin? - %h4 whose tickets - %ul.nav.nav-pills.nav-stacked - %li{:class => ("active" if params[:admin_status] == 'mine')} - = link_to 'tickets i admin', {:admin_status => 'mine', :open_status => params[:open_status]} - %li{:class => ("active" if params[:admin_status] != 'mine')} - = link_to 'all tickets', {:admin_status => 'all', :open_status => params[:open_status]} + = render 'tickets/admin-nav' .span10 - .row - .span6 - %ul.nav.nav-tabs - %li{:class => ("active" if params[:open_status] != 'closed' and params[:open_status] != 'all')} - = link_to 'open issues', {:open_status => 'open', :admin_status => params[:admin_status]} - %li{:class => ("active" if params[:open_status] == 'closed')} - = link_to 'closed issues', {:open_status => 'closed', :admin_status => params[:admin_status]} - = #%a{:href => "#"} closed issue - %li{:class => ("active" if params[:open_status] == 'all')} - = link_to 'open & closed issues', {:open_status => 'all', :admin_status => params[:admin_status]} - .span4 - %ul.nav.nav-pills.pull-right - %li - = link_to 'created at' - %li{:class=> ("active" if true)} - = link_to 'updated at' - %table.table-striped.table-bordered.table-hover + = render 'tickets/table-nav' + %table.table-striped.table-bordered.table-hover{:style => "width:100%;"} %tbody - - @tickets.each do |ticket| - %tr - %td - = link_to ticket.title, ticket - created: - = ticket.created_at.to_s(:short) - updated: - = ticket.updated_at.to_s(:short) - comments by: - = ticket.commenters + = render @tickets.all = paginate @tickets %div{"data-pjax-container" => ""} |