Commit 004260be2719acbd1e8fa785690cdf6367cbed97

Changed wiki tab to default to first wiki page
Minor change to tickets and users

Commit diff

app/helpers/application_helper.rb

 
341341 acts << %Q{<li>#{link_to("Close Ticket", root_path)}</li>} if flags[:close_ticket]
342342 acts << %Q{<li>#{link_to("List Tickets", project_tickets_path(@project.slug))}</li>} if flags[:list_tickets]
343343 acts << %Q{<li>#{link_to("New Milestone", new_project_milestone_path(@project.slug))}</li>} if flags[:new_milestone] && is_member
344 acts << %Q{<li>#{link_to("Current Milestones", root_path)}</li>} if flags[:current_milestones]
345 acts << %Q{<li>#{link_to("Completed Milestones", root_path)}</li>} if flags[:completed_milestones]
344 acts << %Q{<li>#{link_to("List Active Milestones", root_path)}</li>} if flags[:list_active_milestones]
345 acts << %Q{<li>#{link_to("List Completed Milestones", root_path)}</li>} if flags[:list_completed_milestones]
346 acts << %Q{<li>#{link_to("Edit Milestones", root_path)}</li>} if flags[:edit_milestones] && is_member
347 acts << %Q{<li>#{link_to("Edit Components", root_path)}</li>} if flags[:edit_components] && is_member
346348 acts << %Q{<li>#{link_to("Clone Mainline", new_project_repository_path(@project.slug, @repository))}</li>} if flags[:clone_mainline] && logged_in?
347349 out << %Q{<tr><td><ul>#{acts}</ul></td></tr>} if acts != ""
348350 out << %Q{<tr><td>#{actionbox_default(flags)}</td></tr>}
toggle raw diff

app/helpers/projects_helper.rb

 
5454 end
5555
5656 def project_tab (active_tab, tab)
57 title, suffix = Project.tab_settings(tab)
57 title, suffix = Project.tab_settings(tab, @project.wiki_slug)
5858 path = %Q{/projects/#{@project.slug}#{suffix}}
5959 active_tab == tab ? %Q{<li>#{link_to(title, path, :class => "active")}</li>} : %Q{<li>#{link_to(title, path)}</li>}
6060 end
127127 when PRJ_TAB_TICKETS
128128 case subtab
129129 when PRJ_TAB_SUBTAB_NONE
130 out << actionbox_complex(:allow_shortcuts => true, :new_ticket => true, :new_milestone => true, :completed_milestones => true, :current_milestones => true)
130 out << actionbox_complex(:allow_shortcuts => true, :new_ticket => true, :new_milestone => true,
131 :list_completed_milestones => true, :list_active_milestones => true, :edit_milestones => true,
132 :edit_components => true)
131133 out << render(:partial => "ac_right_ticket_filter")
132134 when PRJ_TAB_TICKETS_SHOW
133135 out << actionbox_complex(:allow_shortcuts => true, :list_tickets => true, :edit_ticket => true, :close_ticket => true)
toggle raw diff

app/models/project.rb

 
211211 end
212212 end
213213
214 def self.tab_settings (tab)
214 def self.tab_settings (tab, wiki_slug = "")
215215 case tab
216216 when PRJ_TAB_SUMMARY
217217 title = "Summary"
224224 url_suffix = "/members/"
225225 when PRJ_TAB_WIKI
226226 title = "Wiki"
227 url_suffix = "/wikis/"
227 url_suffix = "/wikis/" + wiki_slug
228228 when PRJ_TAB_TICKETS
229229 title = "Tickets"
230230 url_suffix = "/tickets/"
toggle raw diff

db/migrate/015_create_tickets.rb

 
1616 t.datetime :close_date
1717 t.integer :progress #FIXME this is temporary (should be calculated on % of completed tickets)
1818 t.timestamps
19 #
20 #foreign keys
21 #
22 t.integer :project_id, :references => nil, :null => false
19 t.integer :project_id, :null => false
2320 t.integer :repository_id, :references => nil
2421 end
2522 add_index :milestones, [:slug, :project_id, :audience]
4747 #
4848 t.integer :component_id
4949 t.integer :milestone_id
50 t.integer :assignee_id, :references => nil #foreign key to user table
51 t.integer :submitter_id, :references => nil #foreign key to user table
50 t.integer :assignee_id, :references => nil, :default => 2 # Unassigned
51 t.integer :submitter_id, :references => nil, :default => 1 # Anonymous
5252 end
5353 add_index :tickets, [:id]
5454 add_index :tickets, [:milestone_id]
toggle raw diff

test/fixtures/milestones.yml

 
1919
2020gitlabdevelopment:
2121 id: 2
22 name: "0.2 Dev"
22 name: "0.2 Active"
2323 description: "Current pre-alpha development version, loads missing. Commits go to <a href=''>0.2 Development</a>"
2424 status: :active
2525 slug: "0-2"
toggle raw diff

test/fixtures/users.yml

 
33#
44#
55mtkd:
6 id: 2
6 id: 3
77 login: "mtkd"
88 email: "mtkd@prj2.com"
99 salt: 0f6bac5ebb933fe706440fbc27e76ae1685a493d
1515 ssh_key_id: 1
1616 fullname: "mtkd"
1717 url: "http://prj2.com"
18 #
1918 slug: "mtkd"
2019
20unassigned:
21 id: 2
22 login: "unassigned"
23 email: "unassigned@gitlab.org"
24 salt: 0f6bac5ebb933fe706440fbc27e76ae1685a493d
25 crypted_password: eddfa2d2c2540a1d2b543258fa65d8d48cec60a7 # test
26 remember_token:
27 remember_token_expires_at:
28 activation_code: "e8ea481a79c93263c63834187addc4814a186549"
29 activated_at: <%= 20.days.ago.to_s :db %>
30 ssh_key_id: 1
31 fullname: "Unassigned"
32 url: ""
33 slug: "unassigned"
34
2135anonymous:
2236 id: 1
2337 login: "anon"
4545 ssh_key_id: 1
4646 fullname: "Anonymous"
4747 url: ""
48 #
4948 slug: "anonymous"
5049
5150
toggle raw diff