Commit 004260be2719acbd1e8fa785690cdf6367cbed97
- Date: Sat May 10 07:59:36 +0000 2008
- Committer: mtkd (mtkd@prj2.com)
- Author: mtkd (mtkd@prj2.com)
- Commit SHA1: 004260be2719acbd1e8fa785690cdf6367cbed97
- Tree SHA1: 86445558a95c79ae2c948fb553131dbffa1f0275
- test/fixtures/milestones.yml 2 -+
- db/migrate/015_create_tickets.rb 9 ------+++
- app/models/project.rb 4 --++
- app/helpers/projects_helper.rb 6 --++++
- app/helpers/application_helper.rb 6 --++++
- test/fixtures/users.yml 19 ---++++++++++++++++
Commit diff
- Diff rendering mode:
- inline
- side by side
app/helpers/application_helper.rb
|   | ||
| 341 | 341 | acts << %Q{<li>#{link_to("Close Ticket", root_path)}</li>} if flags[:close_ticket] |
| 342 | 342 | acts << %Q{<li>#{link_to("List Tickets", project_tickets_path(@project.slug))}</li>} if flags[:list_tickets] |
| 343 | 343 | acts << %Q{<li>#{link_to("New Milestone", new_project_milestone_path(@project.slug))}</li>} if flags[:new_milestone] && is_member |
| 344 | ||
| 345 | ||
| 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 | |
| 346 | 348 | acts << %Q{<li>#{link_to("Clone Mainline", new_project_repository_path(@project.slug, @repository))}</li>} if flags[:clone_mainline] && logged_in? |
| 347 | 349 | out << %Q{<tr><td><ul>#{acts}</ul></td></tr>} if acts != "" |
| 348 | 350 | out << %Q{<tr><td>#{actionbox_default(flags)}</td></tr>} |
| toggle raw diff | ||
app/helpers/projects_helper.rb
|   | ||
| 54 | 54 | end |
| 55 | 55 | |
| 56 | 56 | def project_tab (active_tab, tab) |
| 57 | ||
| 57 | title, suffix = Project.tab_settings(tab, @project.wiki_slug) | |
| 58 | 58 | path = %Q{/projects/#{@project.slug}#{suffix}} |
| 59 | 59 | active_tab == tab ? %Q{<li>#{link_to(title, path, :class => "active")}</li>} : %Q{<li>#{link_to(title, path)}</li>} |
| 60 | 60 | end |
| … | … | |
| 127 | 127 | when PRJ_TAB_TICKETS |
| 128 | 128 | case subtab |
| 129 | 129 | when PRJ_TAB_SUBTAB_NONE |
| 130 | ||
| 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) | |
| 131 | 133 | out << render(:partial => "ac_right_ticket_filter") |
| 132 | 134 | when PRJ_TAB_TICKETS_SHOW |
| 133 | 135 | out << actionbox_complex(:allow_shortcuts => true, :list_tickets => true, :edit_ticket => true, :close_ticket => true) |
| toggle raw diff | ||
app/models/project.rb
|   | ||
| 211 | 211 | end |
| 212 | 212 | end |
| 213 | 213 | |
| 214 | ||
| 214 | def self.tab_settings (tab, wiki_slug = "") | |
| 215 | 215 | case tab |
| 216 | 216 | when PRJ_TAB_SUMMARY |
| 217 | 217 | title = "Summary" |
| … | … | |
| 224 | 224 | url_suffix = "/members/" |
| 225 | 225 | when PRJ_TAB_WIKI |
| 226 | 226 | title = "Wiki" |
| 227 | ||
| 227 | url_suffix = "/wikis/" + wiki_slug | |
| 228 | 228 | when PRJ_TAB_TICKETS |
| 229 | 229 | title = "Tickets" |
| 230 | 230 | url_suffix = "/tickets/" |
| toggle raw diff | ||
db/migrate/015_create_tickets.rb
|   | ||
| 16 | 16 | t.datetime :close_date |
| 17 | 17 | t.integer :progress #FIXME this is temporary (should be calculated on % of completed tickets) |
| 18 | 18 | t.timestamps |
| 19 | ||
| 20 | ||
| 21 | ||
| 22 | ||
| 19 | t.integer :project_id, :null => false | |
| 23 | 20 | t.integer :repository_id, :references => nil |
| 24 | 21 | end |
| 25 | 22 | add_index :milestones, [:slug, :project_id, :audience] |
| … | … | |
| 47 | 47 | # |
| 48 | 48 | t.integer :component_id |
| 49 | 49 | t.integer :milestone_id |
| 50 | ||
| 51 | ||
| 50 | t.integer :assignee_id, :references => nil, :default => 2 # Unassigned | |
| 51 | t.integer :submitter_id, :references => nil, :default => 1 # Anonymous | |
| 52 | 52 | end |
| 53 | 53 | add_index :tickets, [:id] |
| 54 | 54 | add_index :tickets, [:milestone_id] |
| toggle raw diff | ||
test/fixtures/milestones.yml
|   | ||
| 19 | 19 | |
| 20 | 20 | gitlabdevelopment: |
| 21 | 21 | id: 2 |
| 22 | ||
| 22 | name: "0.2 Active" | |
| 23 | 23 | description: "Current pre-alpha development version, loads missing. Commits go to <a href=''>0.2 Development</a>" |
| 24 | 24 | status: :active |
| 25 | 25 | slug: "0-2" |
| toggle raw diff | ||
test/fixtures/users.yml
|   | ||
| 3 | 3 | # |
| 4 | 4 | # |
| 5 | 5 | mtkd: |
| 6 | ||
| 6 | id: 3 | |
| 7 | 7 | login: "mtkd" |
| 8 | 8 | email: "mtkd@prj2.com" |
| 9 | 9 | salt: 0f6bac5ebb933fe706440fbc27e76ae1685a493d |
| … | … | |
| 15 | 15 | ssh_key_id: 1 |
| 16 | 16 | fullname: "mtkd" |
| 17 | 17 | url: "http://prj2.com" |
| 18 | ||
| 19 | 18 | slug: "mtkd" |
| 20 | 19 | |
| 20 | unassigned: | |
| 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 | ||
| 21 | 35 | anonymous: |
| 22 | 36 | id: 1 |
| 23 | 37 | login: "anon" |
| … | … | |
| 45 | 45 | ssh_key_id: 1 |
| 46 | 46 | fullname: "Anonymous" |
| 47 | 47 | url: "" |
| 48 | ||
| 49 | 48 | slug: "anonymous" |
| 50 | 49 | |
| 51 | 50 | |
| toggle raw diff | ||
