suite
This commit is contained in:
parent
e5d4400fc9
commit
9019a90384
@ -1,5 +1,6 @@
|
||||
class IWebsite < ActiveRecord::Base
|
||||
belongs_to :p_customer
|
||||
belongs_to :admin
|
||||
|
||||
has_many :i_tasks
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
.content
|
||||
=f.inputs do
|
||||
= f.input :admin_id, :label => "Chef projet :", :collection => Admin.all, :as => :select, :include_blank => true, :member_label => :show_name
|
||||
= f.input :p_customer_id, :label => "Clients :", :collection => PCustomer.all, :as => :select, :include_blank => false, :member_label => :show_name
|
||||
= f.input :name, :label => "Nom :"
|
||||
= f.input :url, :label => "Url :"
|
||||
|
@ -1,5 +1,7 @@
|
||||
%tr#i_website{:id => i_website.id}
|
||||
|
||||
%td= i_website.admin.show_name if i_website.admin
|
||||
|
||||
%td= i_website.p_customer.show_name if i_website.p_customer
|
||||
%td= i_website.name
|
||||
%td=link_to i_website.url.to_s, i_website.url.to_s, :target => "_blank"
|
||||
|
@ -8,6 +8,7 @@
|
||||
.qi_pannel.qi_plain.padding
|
||||
%table.table
|
||||
%tr
|
||||
%th Chef projet
|
||||
%th Client
|
||||
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
$('#i_websites_rows').html("<%= escape_javascript(render(@i_websites))%>");
|
||||
$('#i_website_<%= @i_website.id %>').replaceWith("<%= escape_javascript(render(@i_website))%>");
|
||||
close_pane_hover();
|
6
db/migrate/20190722161039_add_admin_to_i_website.rb
Normal file
6
db/migrate/20190722161039_add_admin_to_i_website.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class AddAdminToIWebsite < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :i_websites, :admin_id, :integer
|
||||
add_column :i_websites, :state, :string
|
||||
end
|
||||
end
|
@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20190722151424) do
|
||||
ActiveRecord::Schema.define(version: 20190722161039) do
|
||||
|
||||
create_table "admin_admin_roles", force: :cascade do |t|
|
||||
t.integer "admin_id", limit: 4
|
||||
@ -462,6 +462,8 @@ ActiveRecord::Schema.define(version: 20190722151424) do
|
||||
t.integer "p_customer_id", limit: 4
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "admin_id", limit: 4
|
||||
t.string "state", limit: 255
|
||||
end
|
||||
|
||||
create_table "image_contents", force: :cascade do |t|
|
||||
|
Loading…
x
Reference in New Issue
Block a user