Commit d50904e0343eb5f5235832a83dfb06f474df915d
Committed by
Paulo Meireles
1 parent
1fb9ff14
Exists in
staging
and in
42 other branches
Deleting db and controllers directory
Showing
3 changed files
with
0 additions
and
91 deletions
Show diff stats
plugins/mezuro/controllers/mezuro_plugin_myprofile_controller.rb
| ... | ... | @@ -1,55 +0,0 @@ |
| 1 | -class MezuroPluginMyprofileController < MyProfileController | |
| 2 | - append_view_path File.join(File.dirname(__FILE__) + '/../views') | |
| 3 | - | |
| 4 | - def index | |
| 5 | - @projects = MezuroPlugin::Project.by_profile(profile) | |
| 6 | - end | |
| 7 | - | |
| 8 | - def new | |
| 9 | - @project = MezuroPlugin::Project.new | |
| 10 | - end | |
| 11 | - | |
| 12 | - def create | |
| 13 | - @project = MezuroPlugin::Project.new(params[:project]) | |
| 14 | - if @project.save | |
| 15 | - session[:notice] = _('Project successfully registered') | |
| 16 | - redirect_to :action => 'index' | |
| 17 | - else | |
| 18 | - render :action => 'new' | |
| 19 | - end | |
| 20 | - end | |
| 21 | - | |
| 22 | - def edit | |
| 23 | - @project = MezuroPlugin::Project.find(params[:id]) | |
| 24 | - end | |
| 25 | - | |
| 26 | - def update | |
| 27 | - @project = MezuroPlugin::Project.find(params[:id]) | |
| 28 | - if @project.update_attributes(params[:project]) | |
| 29 | - session[:notice] = _('Project successfully updated') | |
| 30 | - redirect_to :action => 'index' | |
| 31 | - else | |
| 32 | - render :action => 'edit' | |
| 33 | - end | |
| 34 | - end | |
| 35 | - | |
| 36 | - def show | |
| 37 | - @project = MezuroPlugin::Project.find_by_identifier params[:identifier] | |
| 38 | - @total_metrics = @project.total_metrics if @project != nil | |
| 39 | - @statistical_metrics = @project.statistical_metrics if @project != nil | |
| 40 | - @svn_error = @project.svn_error if (@project != nil && @project.svn_error) | |
| 41 | - end | |
| 42 | - | |
| 43 | - def destroy | |
| 44 | - @project = MezuroPlugin::Project.by_profile(profile).find(params[:id]) | |
| 45 | - if request.post? | |
| 46 | - if @project.destroy | |
| 47 | - session[:notice] = _('Project successfully removed.') | |
| 48 | - else | |
| 49 | - session[:notice] = _('Project was not successfully removed.') | |
| 50 | - end | |
| 51 | - redirect_to :action => 'index' | |
| 52 | - end | |
| 53 | - end | |
| 54 | - | |
| 55 | -end |
plugins/mezuro/db/migrate/20101209151530_create_projects.rb
| ... | ... | @@ -1,20 +0,0 @@ |
| 1 | -class CreateProjects < ActiveRecord::Migration | |
| 2 | - def self.up | |
| 3 | - create_table :mezuro_plugin_projects do |t| | |
| 4 | - t.string :name | |
| 5 | - t.string :identifier | |
| 6 | - t.string :personal_webpage | |
| 7 | - t.text :description | |
| 8 | - t.string :repository_url | |
| 9 | - t.string :svn_error | |
| 10 | - t.boolean :with_tab | |
| 11 | - t.references :profile | |
| 12 | - | |
| 13 | - t.timestamps | |
| 14 | - end | |
| 15 | - end | |
| 16 | - | |
| 17 | - def self.down | |
| 18 | - drop_table :mezuro_plugin_projects | |
| 19 | - end | |
| 20 | -end |
plugins/mezuro/db/migrate/20101209151640_create_metrics.rb
| ... | ... | @@ -1,16 +0,0 @@ |
| 1 | -class CreateMetrics < ActiveRecord::Migration | |
| 2 | - def self.up | |
| 3 | - create_table :mezuro_plugin_metrics do |t| | |
| 4 | - t.string :name | |
| 5 | - t.float :value | |
| 6 | - t.integer :metricable_id | |
| 7 | - t.string :metricable_type | |
| 8 | - | |
| 9 | - t.timestamps | |
| 10 | - end | |
| 11 | - end | |
| 12 | - | |
| 13 | - def self.down | |
| 14 | - drop_table :mezuro_plugin_metrics | |
| 15 | - end | |
| 16 | -end |