mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-02-13 09:34:00 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a932551b96 | |||
| e09990cd42 | |||
| ad8aa8e2e8 | |||
| 707abc00a9 |
6
init.rb
6
init.rb
@@ -14,7 +14,7 @@ Redmine::Plugin.register :redmine_qbo_vehicles do
|
|||||||
name 'Redmine QBO Vehicles plugin'
|
name 'Redmine QBO Vehicles plugin'
|
||||||
author 'Rick Barrette'
|
author 'Rick Barrette'
|
||||||
description 'This is a plugin for Redmine to intergrate with the redmine_qbo plugin to provide vehicle data tracking'
|
description 'This is a plugin for Redmine to intergrate with the redmine_qbo plugin to provide vehicle data tracking'
|
||||||
version '2026.1.4'
|
version '2026.1.5'
|
||||||
url 'https://github.com/rickbarrette/redmine_qbo_vehicles'
|
url 'https://github.com/rickbarrette/redmine_qbo_vehicles'
|
||||||
author_url 'https://barrettefabrication.com'
|
author_url 'https://barrettefabrication.com'
|
||||||
requires_redmine version_or_higher: '6.1.0'
|
requires_redmine version_or_higher: '6.1.0'
|
||||||
@@ -27,13 +27,13 @@ Redmine::Plugin.register :redmine_qbo_vehicles do
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Add safe attributes for core models
|
# Add safe attributes for core models
|
||||||
Issue.safe_attributes 'vehicle_id'
|
Issue.safe_attributes :vehicle_id
|
||||||
|
|
||||||
# Permissions for security
|
# Permissions for security
|
||||||
permission :view_vehicles, vehicles: :new, public: false
|
permission :view_vehicles, vehicles: :new, public: false
|
||||||
|
|
||||||
# Register top menu items
|
# 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
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ module Vehicles
|
|||||||
context[:controller].send(:render_to_string, {
|
context[:controller].send(:render_to_string, {
|
||||||
partial: 'issues/show_issue_view_right',
|
partial: 'issues/show_issue_view_right',
|
||||||
locals: {
|
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,
|
split_vin: context[:issue].vehicle ? context[:issue].vehicle.vin.to_s.scan(/.{1,9}/) : nil,
|
||||||
notes: context[:issue].vehicle ? context[:issue].vehicle.notes : nil
|
notes: context[:issue].vehicle ? context[:issue].vehicle.notes : nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user