-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #524 from concord-consortium/158595244-fix-cuke-na…
…vigation 158595244 Final Navigation
- Loading branch information
Showing
25 changed files
with
111 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
class Admin::ProjectLink < ActiveRecord::Base | ||
self.table_name = "admin_project_links" | ||
belongs_to :project, :class_name => 'Admin::Project' | ||
attr_accessible :href, :name, :project_id, :link_id, :pop_out | ||
attr_accessible :href, :name, :project_id, :link_id, :pop_out, :position | ||
validates :href, :name, :link_id, :presence => true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,6 @@ | ||
-# TODO: possible refactoring to make more clazzes specific. | ||
-# Clazz navigation: top_node could be course, teacher, student ... | ||
-# 2018-07-06 NP: When we get all the blockers fixed, navigtion can use services.... | ||
-# - unless @wide_content_layout | ||
-# :javascript | ||
-# PortalPages.renderNavigation(Portal.API_V1.getNavigation(), 'clazzes_nav') | ||
- # Renders Navigation React component, configured by `getNavigation()`, into #clazzes_nav | ||
- # See https://github.com/concord-consortium/portal-pages/blob/master/src/library/library.js | ||
#clazzes_nav | ||
#utility-links | ||
%p | ||
Welcome, | ||
%br | ||
%strong | ||
= "#{current_visitor.name}!" | ||
%ul | ||
- if current_settings && ((current_settings.help_type == 'external url') || (current_settings.help_type == 'help custom html')) | ||
%li | ||
%a{:href => '/help', :target => '_blank', :class => 'help-link'} | ||
%i{:class => 'icon-search'} | ||
Help | ||
%li | ||
%a{:href => preferences_user_path(current_visitor)} | ||
%i{:class => 'icon-settings'} | ||
Settings | ||
- if current_user && !current_user.portal_student | ||
%li | ||
%a{:href => favorites_user_path(current_visitor)} | ||
%i{:class => 'icon-favorite'} | ||
Favorites | ||
|
||
- if @original_user != current_visitor | ||
- switch_user_form_id = "switch_user_id_#{@original_user.id}" | ||
%a{:href => 'javascript: void(0);', :onclick => "$('#{switch_user_form_id}').submit();"} | ||
%i{:class => 'icon-login'} | ||
Switch Back | ||
= form_for @original_user, :url => switch_user_path(@original_user), :html => { :method => :put,:class=> "hidden" ,:id=> switch_user_form_id} do |form| | ||
= hidden_field_tag 'user[id]', @original_user.id | ||
= hidden_field_tag 'commit', 'Switch' | ||
- if current_visitor.has_role?('admin', 'manager', 'researcher') || current_visitor.portal_teacher | ||
%ul.aux-links | ||
- if current_visitor.has_role?('admin', 'manager','researcher') || current_visitor.is_project_admin? || current_visitor.is_project_researcher? | ||
%li= link_to 'Admin', admin_path | ||
- current_visitor.projects.each do |project| | ||
- project.links.each do |link| | ||
%li= link_to link.name, link.href | ||
|
||
- if top_node | ||
.secondary-mobile-menu-toggle{onclick: "toggleSecondaryMenu()"} | ||
Menu | ||
.padded_content | ||
= render :partial => 'portal/clazzes/clazzes_list', :locals => {:top_node => top_node, :selects => selects} | ||
- if top_node.is_a? Portal::Teacher | ||
.create{:id=>dom_id_for(top_node, :nav_list_create_class)} | ||
.create_link | ||
= link_to 'Add a New Class', new_portal_clazz_path, :class=>"pie", :id=>"btn_create_class" | ||
.manage_classes_link | ||
= link_to 'Manage Classes', manage_portal_clazzes_url, :class=>"pie", :id=>"btn_manage_classes" | ||
:javascript | ||
var navOpts = Portal.API_V1.getNavigation() | ||
PortalPages.renderNavigation(Portal.API_V1.getNavigation(), 'clazzes_nav') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
db/migrate/20180824170559_add_position_to_admin_project_links.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddPositionToAdminProjectLinks < ActiveRecord::Migration | ||
def change | ||
add_column :admin_project_links, :position, :integer, :default => 5 | ||
end | ||
end |
Oops, something went wrong.