Compare commits

..

4 Commits

Author SHA1 Message Date
Arthur Poulet
193ad1bd44 fix Client#last_view 2016-02-01 02:37:12 +01:00
Arthur Poulet
fec6c7d204 comments are descriptionized 2016-02-01 02:27:43 +01:00
Arthur Poulet
1c5c5b1cc7 rmeove ticket header from ticket form 2016-02-01 02:07:32 +01:00
Arthur Poulet
65f103b22c Merge branch '23-ticket-simples' 2016-01-31 12:03:41 +01:00
5 changed files with 4 additions and 8 deletions

View File

@ -107,7 +107,7 @@ class TicketsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def ticket_params
params.require(:ticket).permit(:ticket_id, :title, :description, :state)
params.require(:ticket).permit(:title, :description, :state)
end
def looks_ticket

View File

@ -10,7 +10,7 @@ class Client < ActiveRecord::Base
delegate :name, to: :contact, allow_nil: true, prefix: true
def last_contact
contacts.pluck(:view_at).max || "never"
contacts.where('view_at IS NOT NULL').pluck(:view_at).max || "never"
end
def bills_retard

View File

@ -8,7 +8,7 @@ table.table.table-condensed
tr
td = c.creator_type
td = c.title
td = c.comment
td = descriptionize c.comment
td
= link_to "/comments/#{c.id}.json", remote: true, data: {:confirm => 'Are you sure?'}, method: :delete, class: "close remove-comment", type: "button", "aria-label" => "Close" do
span aria-hidden="true" &times;

View File

@ -7,4 +7,4 @@ table.table.table-condensed
tr
td = c.creator_type
td = c.title
td = c.comment
td = descriptionize c.comment

View File

@ -7,10 +7,6 @@
li = message
.form-horizontal
.form-group
.field
= f.label :ticket_id, class: "sr-only"
= f.text_field :ticket_id, class: "form-control", placeholder: "Master Ticket id"
.form-group
.field
= f.label :creator_type, class: "sr-only"