redmine.diff

Marcin Świątkiewicz, 2015-06-19 12:14

Download (1.99 KB)

View differences:

app/models/issue_query.rb
158 158
      project_values = []
159 159
      if User.current.logged? && User.current.memberships.any?
160 160
        project_values << ["<< #{l(:label_my_projects).downcase} >>", "mine"]
161
        project_values << ["<< #{l(:label_opened_projects).downcase} >>", "opened"]
161 162
      end
162 163
      project_values += all_projects_values
163 164
      add_available_filter("project_id",
app/models/query.rb
579 579
        if v.delete('mine')
580 580
          v += User.current.memberships.map(&:project_id).map(&:to_s)
581 581
        end
582
        if v.delete('opened')
583
          v += User.current.memberships.joins(:project).
584
                                        where(projects: { status: Project::STATUS_ACTIVE }).
585
                                        map(&:project_id).
586
                                        map(&:to_s)
587
        end
582 588
      end
583 589

  
584 590
      if field =~ /cf_(\d+)$/
config/locales/en.yml
561 561
  label_my_page: My page
562 562
  label_my_account: My account
563 563
  label_my_projects: My projects
564
  label_opened_projects: My Opened projects
564 565
  label_my_page_block: My page block
565 566
  label_administration: Administration
566 567
  label_login: Sign in
config/locales/pl.yml
508 508
  label_my_account: Moje konto
509 509
  label_my_page: Moja strona
510 510
  label_my_projects: Moje projekty
511
  label_opened_projects: Moje Otwarte Projekty
511 512
  label_new: Nowy
512 513
  label_new_statuses_allowed: Uprawnione nowe statusy
513 514
  label_news: Komunikat