code
stringlengths
1
1.73M
language
stringclasses
1 value
# #= イベントユーザモデル # # # class DatEventuser < ActiveRecord::Base ######################### # 関連定義 ######################### # イベントデータに所有される(1:多) belongs_to :dat_event, :foreign_key=>"event_id" # プロジェクトユーザーデータに所有される(1:多) belongs_to :dat_projectuser, :foreign_key=>"projectuser_id" end
Ruby
class MstMessage < ActiveRecord::Base end
Ruby
# #= イベントモデル # # # class DatEvent < ActiveRecord::Base ######################### # 関連定義 ######################### # プロジェクト構成データに所有される(1:1) belongs_to :dat_projectcomp, :foreign_key => "project_tree_id" # イベントユーザーデータを所有する(1:多) has_many :dat_eventusers, :foreign_key => "event_id", :dependent=>:destroy # ...
Ruby
# #= イベントファイルモデル # # # class DatEventfile < ActiveRecord::Base ######################### # 関連定義 ######################### # イベントデータに所有される(1:多) belongs_to :dat_event end
Ruby
# #= プロジェクトログモデル # # # class DatProjectlog < ActiveRecord::Base ######################### # 関連定義 ######################### # プロジェクト構成データに所有される(1:1) belongs_to :dat_projectcomp, :foreign_key => "projectcomp_id" end
Ruby
# #= タスクファイルモデル # # # class DatTaskfile < ActiveRecord::Base ######################### # 関連定義 ######################### # タスクデータに所有される(1:多) belongs_to :dat_task end
Ruby
# #= テンプレートイベントマスタモデル # # # class MstTpevent < ActiveRecord::Base ######################### # 関連定義 ######################### # テンプレート構成マスタに所有される(1:1) belongs_to :mst_composition, :foreign_key => "template_tree_id" end
Ruby
# #= テンプレート構成マスタモデル # # # class MstComposition < ActiveRecord::Base ######################### # 関連定義 ######################### # テンプレートマスタに所有される(1:多) belongs_to :mst_template, :foreign_key => "template_id" # TPタスクマスタを所有する(1:1) has_one :mst_tptask, :foreign_key => "template_tree_id", :dependent=>:destroy ...
Ruby
# #= タスクユーザモデル # # # class DatTaskuser < ActiveRecord::Base ######################### # 関連定義 ######################### # タスクデータに所有される(1:多) belongs_to :dat_task, :foreign_key=>"task_id" # プロジェクトユーザーデータに所有される(1:多) belongs_to :dat_projectuser, :foreign_key=>"projectuser_id" end
Ruby
# -*- coding: utf-8 -*- class UserController < ApplicationController # 共通レイアウト定義 layout "mainpage" # フィルタ定義 before_filter :login_required # ログインチェック before_filter :get_project_info # 更新時もタブ情報の取得は必要 before_filter :user_required # ユーザーチェック # #=== アカウント情報編集ページを表示 # #指定されたユーザのアカウント情報を取得して...
Ruby
# -*- coding: utf-8 -*- # #イベント情報の追加,更新,削除などを行う. #主にajax経由で呼ばれる. # class EventController < ApplicationController # 共通レイアウト定義 layout "mainpage", :except=>[:block_list, :dlg_index, :dlg_new, :dlg_edit, :dlg_create, :dlg_update, :dlg_destroy] # フィルタ定義 before_filter :login_required # ログインチェック # 追加ヘルパー定義 helpe...
Ruby
# -*- coding: utf-8 -*- class TaskController < ApplicationController # 共通レイアウト定義 layout "mainpage", :except=>[:block_list, :block_infolist, :dlg_index, :dlg_new, :dlg_edit, :dlg_create, :dlg_update, :dlg_destroy, :dlg_report] # フィルタ定義 before_filter :login_required, :except=>[:sync_air] # ログインチェック # 追加ヘルパー定義...
Ruby
# -*- coding: utf-8 -*- class LoginController < ApplicationController layout 'loginpage' , :except=>[:login, :air_login] include ApplicationHelper # #ログイン画面を表示,及びログイン処理を行う # #リクエストメソッドがGETの場合はログイン画面を表示する. #POSTの場合には,フォームからポストされたuser_login_idとuser_passwordを元にログイン処理を行う # #ログインに成功した場合は,プロジェクトのダッシュボードへ...
Ruby
# -*- coding: utf-8 -*- class Extensions::AirController < ApplicationController before_filter :user_authorize, :except => [:login] @is_logined = false ########################################################### # メソッド:air_loginアクション # 概  要:Airアプリからのログイン処理 ################################################...
Ruby
# -*- coding: utf-8 -*- # #マイルストーンの追加,編集,削除などを行うコントローラ. #主にAjax経由で呼ばれる. # class MilestoneController < ApplicationController # 共通レイアウト定義 layout "mainpage", :except=>[:dlg_index, :dlg_new, :dlg_edit, :dlg_create, :dlg_update, :dlg_destroy] # フィルタ定義 before_filter :login_required # ログインチェック # 追加ヘルパー定義 helper ...
Ruby
# -*- coding: utf-8 -*- class ProjectfileController < ApplicationController # ヘルパ定義 include ApplicationHelper ########################################################### # メソッド:dlg_indexアクション # 概  要:タスク編集ダイアログのためのデフォルトアクション ########################################################### def dlg_index end ...
Ruby
# -*- coding: utf-8 -*- require 'app_active_record'# ActiveRecord拡張 require_dependency 'login_system'# ログイン機能 # #アプリケーションコントローラ. #全てのコントローラの親コントローラとなる. # #アプリケーション全体にかかる認証処理やデフォルトで読み込むヘルパの定義を行う # class ApplicationController < ActionController::Base #認証処理を行うライブラリ include LoginSystem #-- # フィルタ定義 #++ #ローカライ...
Ruby
class ProjectuserController < ApplicationController # フィルタ定義 before_filter :login_required # ログインチェック # #=== プロジェクトの参加ユーザを表示する # #指定プロジェクトのさんかユーザ一覧を表示する. # def block_list conditions = " dat_projects.valid_flg = 1 " conditions << " AND dat_projects.id = " conditions << ((params[:project_id]....
Ruby
# -*- coding: utf-8 -*- class ProjectcompController < ApplicationController # フィルタ定義 before_filter :login_required # ログインチェック include ProjectItem # #=== プロジェクトアイテムの順番の入れ替えを行う # #アイテムの行番号を更新する # def item_order_update id = params[:id] offset = params[:offset] return unless my_item...
Ruby
# -*- coding: utf-8 -*- class ProjectlogController < ApplicationController # フィルタ定義 before_filter :login_required # ログインチェック # #=== プロジェクトの更新履歴を表示する # #指定プロジェクトの最新7日間の更新履歴を表示する. # def block_list limit_date = (Date.today - 7).strftime('%Y-%m-%d') conditions_sql = "dat_projects.valid_flg = 1 AND ...
Ruby
class LocalizeController < ApplicationController ########################################################### # メソッド:load_messageアクション # 概  要:ローカライズ用の言語データを返すアクション(JSON形式) ########################################################### def load_message render :text=> "app_messages_hash = " + @app_messages_has...
Ruby
# -*- coding: utf-8 -*- # #= プロジェクトコントローラ #WBS,ガントチャート,カレンダーなど基本的なデータの表示を行う. #また,プロジェクトの追加,編集などを行う # class ProjectController < ApplicationController # 共通レイアウト定義 layout "mainpage", :except=>[:block_list, :json_list_for_wbs, :json_list_for_gantt, :json_init_projects, :json_init_project_users, :json_init_project_comps...
Ruby
ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep in mind you can assign values other than :controller and :action # ...
Ruby
# Don't change this file! # Configure your app in config/environment.rb and config/environments/*.rb RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) module Rails class << self def boot! unless booted? preinitialize pick_boot.run end end def booted? ...
Ruby
# Be sure to restart your web server when you modify this file. $kcode='u' # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present RAILS_G...
Ruby
# Settings specified here will take precedence over those in config/environment.rb # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true # Use a different logger for distributed setups # config.logger = SyslogLogger.new # Full error repor...
Ruby
# Settings specified here will take precedence over those in config/environment.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the webserver when you make code changes. config.ca...
Ruby
# Settings specified here will take precedence over those in config/environment.rb # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between...
Ruby
# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' require 'rake/rdoctask' require 'tasks/rails'
Ruby
require "active_record" #require 'json' class ActiveRecord::Base # before_create :create_user_set # before_update :update_user_set # def to_json(*a) # result = {"Result" => self.attributes } #p self.attributes # result.to_json self.attributes_before_type_cast.to_json end # def create_user_set # i...
Ruby
# # Iso2022Mailer - 日本語メール送信処理プラグイン # # from : # http://wiki.fdiary.net/rails/?ActionMailer (moriq さん) # http://wota.jp/ac/?date=20050731#p01 (くまくまーさん) # # Model で Iso2022jpMailer を継承して使用する # (see http://d.hatena.ne.jp/drawnboy/20051114/1131977235 ) # TestMailer < Iso2022jpMailer # ... # end # # MIT License # requi...
Ruby
module ProjectItem def my_item?(project_comp_id) user_id = session['user']['id'] item = DatProjectcomp.find(project_comp_id) logger.debug item.inspect r = my_project?(item.project_id) render :text => result_for_json(false, 'Permission Dinied', {}) unless r r end end
Ruby
require_dependency "mst_user" module LoginSystem protected # overwrite this if you want to restrict access to only a few actions # or if you want to check if the user has the correct rights # example: # # # only allow nonbobs # def authorize?(user) # user.login != "bob" # end def aut...
Ruby
# # jsmin.rb 2008-06-08 # Author: UEDA Hiroyuki <BSDmad@gmail.com> # # This work is originated from jsmin.rb by Uladzislau Latynski. # The purpose of translation from jsmin.rb to jsmin.rb ^^;) is # for using the feature as a class. As a result, you can deploy # minified JavaScript files with this class as follows: # #...
Ruby
class CreateDatTaskfiles < ActiveRecord::Migration def self.up create_table :dat_taskfiles do |t| end end def self.down drop_table :dat_taskfiles end end
Ruby
class CreateDatEventfiles < ActiveRecord::Migration def self.up create_table :dat_eventfiles do |t| end end def self.down drop_table :dat_eventfiles end end
Ruby
class CreateMstTpmilestones < ActiveRecord::Migration def self.up create_table :mst_tpmilestones do |t| end end def self.down drop_table :mst_tpmilestones end end
Ruby
class CreateDatProjectclasses < ActiveRecord::Migration def self.up create_table :dat_projectclasses do |t| end end def self.down drop_table :dat_projectclasses end end
Ruby
class CreateDatTasks < ActiveRecord::Migration def self.up create_table :dat_tasks do |t| end end def self.down drop_table :dat_tasks end end
Ruby
class CreateMstTptasks < ActiveRecord::Migration def self.up create_table :mst_tptasks do |t| end end def self.down drop_table :mst_tptasks end end
Ruby
class CreateDatProjects < ActiveRecord::Migration def self.up create_table :dat_projects do |t| end end def self.down drop_table :dat_projects end end
Ruby
class CreateMstMessages < ActiveRecord::Migration def self.up create_table :mst_messages do |t| end end def self.down drop_table :mst_messages end end
Ruby
class CreateDatCalls < ActiveRecord::Migration def self.up create_table :dat_calls do |t| end end def self.down drop_table :dat_calls end end
Ruby
class CreateMstTemplates < ActiveRecord::Migration def self.up create_table :mst_templates do |t| end end def self.down drop_table :mst_templates end end
Ruby
class CreateDatTaskhistories < ActiveRecord::Migration def self.up create_table :dat_taskhistories do |t| end end def self.down drop_table :dat_taskhistories end end
Ruby
class CreateDatTaskusers < ActiveRecord::Migration def self.up create_table :dat_taskusers do |t| end end def self.down drop_table :dat_taskusers end end
Ruby
class CreateDatProjectusers < ActiveRecord::Migration def self.up create_table :dat_projectusers do |t| end end def self.down drop_table :dat_projectusers end end
Ruby
class CreateMstTpclasses < ActiveRecord::Migration def self.up create_table :mst_tpclasses do |t| end end def self.down drop_table :mst_tpclasses end end
Ruby
class CreateDatMilestones < ActiveRecord::Migration def self.up create_table :dat_milestones do |t| end end def self.down drop_table :dat_milestones end end
Ruby
class CreateMstCompositions < ActiveRecord::Migration def self.up create_table :mst_compositions do |t| end end def self.down drop_table :mst_compositions end end
Ruby
class CreateDatEvents < ActiveRecord::Migration def self.up create_table :dat_events do |t| end end def self.down drop_table :dat_events end end
Ruby
class CreateDatEventusers < ActiveRecord::Migration def self.up create_table :dat_eventusers do |t| end end def self.down drop_table :dat_eventusers end end
Ruby
class CreateMstTpevents < ActiveRecord::Migration def self.up create_table :mst_tpevents do |t| end end def self.down drop_table :mst_tpevents end end
Ruby
class CreateDatProjectcomps < ActiveRecord::Migration def self.up create_table :dat_projectcomps do |t| end end def self.down drop_table :dat_projectcomps end end
Ruby
class CreateDatTaskcmts < ActiveRecord::Migration def self.up create_table :dat_taskcmts do |t| end end def self.down drop_table :dat_taskcmts end end
Ruby
ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'test_help' class Test::Unit::TestCase # Transactional fixtures accelerate your tests by wrapping each test method # in a transaction that's rolled back on completion. This ensures that the # test datab...
Ruby
#!/usr/local/bin/ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai...
Ruby
#!/usr/local/bin/ruby # # You may specify the path to the FastCGI crash log (a log of unhandled # exceptions which forced the FastCGI instance to exit, great for debugging) # and the number of requests to process before running garbage collection. # # By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.lo...
Ruby
#!/usr/local/bin/ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai...
Ruby
#!/usr/local/bin/ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai...
Ruby
#!/usr/local/bin/ruby # # You may specify the path to the FastCGI crash log (a log of unhandled # exceptions which forced the FastCGI instance to exit, great for debugging) # and the number of requests to process before running garbage collection. # # By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.lo...
Ruby
#!/usr/local/bin/ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impai...
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/breakpointer'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/destroy'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/about'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/runner'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/runner'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/server'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/generate'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/destroy'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/plugin'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/breakpointer'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/console'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/about'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/server'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/console'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/plugin'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/spawner'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/spawner'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/inspector'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/reaper'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/reaper'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/inspector'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/benchmarker'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/profiler'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/benchmarker'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/profiler'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/generate'
Ruby
module CalendarHelper def open_calender(element) return link_to(image_tag("icon-calendar.gif", :border => 0), "javascript:dispCal('" + element + "');") end end
Ruby
# Methods added to this helper will be available to all templates in the application. require_dependency 'jsmin' module ApplicationHelper include AppFormHelper # #=== ローカライズ文字列を返す # #指定されたメッセージ区分とメッセージコードに該当する #ローカライズされた文字列を返す。 # def app_localized_message(msg_kbn, msg_code) if @app_messages_has...
Ruby
module ProjectHelper include ApplicationHelper include AppFormHelper # #=== プロジェクト名のリンクタグを返す # #指定されたプロジェクトオブジェクトから #該当のプロジェクト名のリンクタグを返す # def link_project_name(project, options="") to = {:controller=>:project, :action=>:index, :id=>project.id} link_to(disp_project_name(project)+options.to_...
Ruby
module EventHelper # #=== ユーザー一覧のプルダウンを返す # #イベントに参加可能なユーザーのSELECTタグを出力する。 # def select_for_eventusers(variable, attribute, options, html_options) # ユーザー一覧のプルダウンを出力 insobj = instance_variable_get("@#{variable}") if insobj == nil select( variable, attribute, {}, options, html_options) ...
Ruby
module LoginHelper end
Ruby
module AppFormHelper # #=== 日付入力フィールドタグ文字列を返す # #日付ピックアップダイアログのアイコンを持つ #日付入力フィールドのタグを出力する。 # def date_field(object_name, method, options = {}) content_for(:for_ext_scripts) do opt = {:format => 'Y-m-d'} apply_ext((object_name.to_s+'_'+method.to_s), 'Ext.form.DateField', opt) end ...
Ruby
module TaskHelper # #=== プロジェクト選択プルダウンを返す # #参加可能なプロジェクトのSELECTタグを出力する。 # def select_for_projects(variable, attribute, projectcomp, projects, options, html_options) if projectcomp.id.nil? || projectcomp.id == "" # 新規プロジェクト構成データの場合は # プロジェクト選択プルダウンを出力 collection_select( variable, ...
Ruby
module Extensions::AirHelper end
Ruby
module AirHelper end
Ruby
require_dependency 'jsmin' require 'action_view/helpers/asset_tag_helper' module JsminHelper #** #* javascriptファイルの圧縮とファイル結合スクリプトへパラメータを渡す #* def jscomp(paths=null) if !@jscomp_src @jscomp_src = Array.new end @jscomp_src.push(paths) end def csscomp(paths, prefix='') if !@csscom...
Ruby
# #= マイルストーンモデル # # # class DatMilestone < ActiveRecord::Base ######################### # 関連定義 ######################### # プロジェクト構成データに所有される(1:1) belongs_to :dat_projectcomp, :foreign_key => "project_tree_id" ######################### # 検証機能定義 # (全てのインスタンスで共通の検査項目は、クラスメソッドで定義) # (:messageの指定は、言語DBのエ...
Ruby
# #= プロジェクトユーザモデル # # # class DatProjectuser < ActiveRecord::Base ######################### # 関連定義 ######################### # プロジェクトデータに所有される(1:多) belongs_to :dat_project, :foreign_key => "project_id" # ユーザーマスタに所有される(1:多) belongs_to :mst_user, :foreign_key=>"user_id" # タスクユーザーデータを所有する(1:多) has_m...
Ruby