Merge pull request #242 from warpc/195-new_design_for_projects

[Refs #195] 
* Add default value to is_rpm field for projects
* Show tab for wiki, tracker or build only if they activate
This commit is contained in:
Vladimir Sharshov 2012-02-29 11:04:19 -08:00
commit 4fd518ac86
4 changed files with 30 additions and 11 deletions

View File

@ -20,7 +20,7 @@
%td
.img
= image_tag(gravatar_url(user.email))
.forimg= link_to user.name, user_path(user)
.forimg= link_to "#{user.uname} (#{user.name})", user_path(user)
- Relation::ROLES.each_with_index do |role, i|
%td
.radio

View File

@ -9,7 +9,9 @@
%li= link_to t("project_menu.commits"), commits_path(@project), {:class => (act.in?([:index, :show]) && contr == :commits) ? 'active' : ''}
- if @project.is_rpm
%li= link_to t("project_menu.builds"), project_build_lists_path(@project), {:class => (act == :index && contr == :builds) ? 'active' : ''}
%li= link_to t("project_menu.tracker"), project_issues_path(@project), {:class => (act == :index && contr == :issues) ? 'active' : ''}
%li= link_to t("project_menu.wiki"), project_wiki_index_path(@project), {:class => contr == :wiki ? 'active' : ''}
- if @project.has_issues
%li= link_to t("project_menu.tracker"), project_issues_path(@project), {:class => (act == :index && contr == :issues) ? 'active' : ''}
- if @project.has_wiki
%li= link_to t("project_menu.wiki"), project_wiki_index_path(@project), {:class => contr == :wiki ? 'active' : ''}
%li= link_to t("project_menu.readme"), "#" #pending
%li= link_to t("project_menu.settings"), edit_project_path(@project), {:class => (act == :edit && contr == :projects) ? 'active' : ''}

View File

@ -0,0 +1,5 @@
class AddDefaultValuesToIsRpmForProjects < ActiveRecord::Migration
def change
Project.update_all(:is_rpm => true)
end
end

View File

@ -11,7 +11,15 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20120228100121) do
ActiveRecord::Schema.define(:version => 20120229182356) do
create_table "activity_feeds", :force => true do |t|
t.integer "user_id", :null => false
t.string "kind"
t.text "data"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "arches", :force => true do |t|
t.string "name", :null => false
@ -155,6 +163,7 @@ ActiveRecord::Schema.define(:version => 20120228100121) do
t.datetime "updated_at"
t.string "uname"
t.integer "own_projects_count", :default => 0, :null => false
t.text "description"
end
create_table "issues", :force => true do |t|
@ -276,31 +285,29 @@ ActiveRecord::Schema.define(:version => 20120228100121) do
t.text "description"
t.string "ancestry"
t.boolean "has_issues", :default => true
t.boolean "has_wiki", :default => false
t.string "srpm_file_name"
t.string "srpm_content_type"
t.integer "srpm_file_size"
t.datetime "srpm_updated_at"
t.string "default_branch", :default => "master"
t.boolean "is_rpm", :default => true
t.boolean "has_wiki", :default => false
end
add_index "projects", ["category_id"], :name => "index_projects_on_category_id"
add_index "projects", ["owner_id"], :name => "index_projects_on_name_and_owner_id_and_owner_type", :unique => true, :case_sensitive => false
create_table "register_requests", :force => true do |t|
t.string "name"
t.string "email"
t.string "token"
t.boolean "approved", :default => false
t.boolean "rejected", :default => false
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "interest"
t.text "more"
end
add_index "register_requests", ["email"], :name => "index_register_requests_on_email", :unique => true, :case_sensitive => false
add_index "register_requests", ["token"], :name => "index_register_requests_on_token", :unique => true, :case_sensitive => false
create_table "relations", :force => true do |t|
t.integer "object_id"
@ -359,6 +366,7 @@ ActiveRecord::Schema.define(:version => 20120228100121) do
t.string "name"
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "password_salt", :default => "", :null => false
t.string "reset_password_token"
t.datetime "remember_created_at"
t.datetime "created_at"
@ -367,10 +375,14 @@ ActiveRecord::Schema.define(:version => 20120228100121) do
t.string "uname"
t.string "role"
t.string "language", :default => "en"
t.datetime "reset_password_sent_at"
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.integer "own_projects_count", :default => 0, :null => false
t.datetime "reset_password_sent_at"
end
add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
add_index "users", ["uname"], :name => "index_users_on_uname", :unique => true