mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-02-13 09:34:00 -05:00
Compare commits
7 Commits
634fd96e82
...
2026.1.5
| Author | SHA1 | Date | |
|---|---|---|---|
| a932551b96 | |||
| e09990cd42 | |||
| ad8aa8e2e8 | |||
| 707abc00a9 | |||
| 1199af0886 | |||
| 5a2832b751 | |||
| 6fc2db5d73 |
6
init.rb
6
init.rb
@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo_vehicles do
|
||||
name 'Redmine QBO Vehicles plugin'
|
||||
author 'Rick Barrette'
|
||||
description 'This is a plugin for Redmine to intergrate with the redmine_qbo plugin to provide vehicle data tracking'
|
||||
version '2026.1.1'
|
||||
version '2026.1.5'
|
||||
url 'https://github.com/rickbarrette/redmine_qbo_vehicles'
|
||||
author_url 'https://barrettefabrication.com'
|
||||
requires_redmine version_or_higher: '6.1.0'
|
||||
@@ -27,13 +27,13 @@ Redmine::Plugin.register :redmine_qbo_vehicles do
|
||||
end
|
||||
|
||||
# Add safe attributes for core models
|
||||
Issue.safe_attributes 'vehicle_id'
|
||||
Issue.safe_attributes :vehicle_id
|
||||
|
||||
# Permissions for security
|
||||
permission :view_vehicles, vehicles: :new, public: false
|
||||
|
||||
# Register top menu items
|
||||
menu :top_menu, :vehicles, { controller: :vehicles, action: :index }, caption: 'Vehicles', if: Proc.new { User.current.logged? }
|
||||
menu :top_menu, :vehicles, { controller: :vehicles, action: :index }, caption: :field_vehicles, if: Proc.new { User.current.logged? }
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ module Vehicles
|
||||
locals: {
|
||||
vehicle: context[:form].select( :vehicle_id,
|
||||
context[:issue].customer ? context[:issue].customer.vehicles.pluck(:name, :id) : [],
|
||||
selected: context[:issue].vehicle,
|
||||
selected: context[:issue].vehicle ? context[:issue].vehicle.id : nil,
|
||||
include_blank: true )
|
||||
}
|
||||
})
|
||||
|
||||
@@ -19,7 +19,7 @@ module Vehicles
|
||||
context[:controller].send(:render_to_string, {
|
||||
partial: 'issues/show_issue_view_right',
|
||||
locals: {
|
||||
vehicle: link_to(context[:issue].vehicle),
|
||||
vehicle: context[:issue].vehicle ? link_to(context[:issue].vehicle) : nil,
|
||||
split_vin: context[:issue].vehicle ? context[:issue].vehicle.vin.to_s.scan(/.{1,9}/) : nil,
|
||||
notes: context[:issue].vehicle ? context[:issue].vehicle.notes : nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user