diff options
| author | Zog | 2017-12-27 13:42:39 +0100 | 
|---|---|---|
| committer | Zog | 2017-12-27 13:42:39 +0100 | 
| commit | 607fa5e03289a10b60a773bc40af38f1d721bbea (patch) | |
| tree | b27f8e9825e79675c606571ff7efb9953b8a4917 /app/views/autocomplete_purchase_windows | |
| parent | 78e2d256f895c1014a3def5f2ef6509086755215 (diff) | |
| download | chouette-core-607fa5e03289a10b60a773bc40af38f1d721bbea.tar.bz2 | |
Refs #5407 @2h; Model implementation
- Link PurchaseWindows to VehicleJourneys in the model
- Add an autocompletion endpoint
Diffstat (limited to 'app/views/autocomplete_purchase_windows')
| -rw-r--r-- | app/views/autocomplete_purchase_windows/index.rabl | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/app/views/autocomplete_purchase_windows/index.rabl b/app/views/autocomplete_purchase_windows/index.rabl new file mode 100644 index 000000000..1d0287602 --- /dev/null +++ b/app/views/autocomplete_purchase_windows/index.rabl @@ -0,0 +1,12 @@ +collection @purchase_windows, :object_root => false + +node do |window| +  { +    :id => window.id, +    :name => window.name, +    :objectid => window.objectid, +    :color => window.color, +    :short_id => window.get_objectid.short_id, +    :text => "<strong><span class='fa fa-circle' style='color:" + (window.color ? window.color : '#4b4b4b') + "'></span> " + window.name + " - " + window.get_objectid.short_id + "</strong>" +  } +end | 
