Skip to content

Commit

Permalink
#699 add activity lines links
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashnikovisme committed Jun 11, 2017
1 parent 8a69b5b commit ef485f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/controllers/web/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ def load_categories_tree
@first_category = Category.includes(:articles).find configus.categories.who_we_are
@about_site_category = Category.includes(:articles).find configus.categories.site_mic
@corporative_category = Category.includes(:articles).find configus.categories.corporative_projects
@report_category = Category.includes(:articles).find 18
if signed_in?
@korporative_category = Category.find configus.categories.corporative_projects
end
@activity_lines = ActivityLine.official.decorate
@feedback = FeedbackForm.new_with_model
@rss_article_id = 19
end
Expand Down
1 change: 1 addition & 0 deletions app/models/activity_line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class ActivityLine < ActiveRecord::Base
scope :has_curators, -> { where.not(activity_type: :event_line) }
scope :ulmic, -> { where organization_type: :ulmic }
scope :need_to_review, -> { where 'state = \'unviewed\' OR state = \'updated\'' }
scope :official, -> { active.where(organization_type: :ulmic, activity_type: [:central_program, :local_project]).order(activity_type: :asc) }

include TagsHelper
include PgSearch
Expand Down
12 changes: 5 additions & 7 deletions app/views/layouts/web/shared/_navbar.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@
= @corporative_category.name
- @corporative_category.articles.visible.confirmed.each do |article|
= link_to article.title, article_path(article)
- if @report_category.present?
.category-column
.menu-title
= @report_category.name
- [132, 133, 135, 134].each do |id|
- article = Article.find(id)
= link_to article.title, article_path(article)
.category-column
.menu-title
= t('activerecord.models.activity_line').pluralize(:ru)
- @activity_lines.each do |activity_line|
= link_to activity_line.title, activity_line_path(activity_line)
%li{ style: 'margin-right: 15px' }
- if signed_in? && current_user.state == 'confirmed'
= link_to '#', data: { 'reveal-id' => 'feedbackModal' } do
Expand Down

0 comments on commit ef485f8

Please sign in to comment.