|
|
%header
|
|
|
%nav.navbar.fixed-top.navbar-dark.bg-primary.navbar-expand-lg
|
|
|
.container-fluid
|
|
|
%a.navbar-brand{href: list_main_path}
|
|
|
%span.glyphicon.glyphicon-home
|
|
|
MAIN
|
|
|
%button.navbar-toggler.collapsed{ type: :button, 'data-bs': {toggle: 'collapse', target: '#navbar-collapse'} }
|
|
|
%span.navbar-toggler-icon
|
|
|
.collapse.navbar-collapse#navbar-collapse
|
|
|
%ul.navbar-nav.me-auto.mb-2.mb-lg-0
|
|
|
/ submission
|
|
|
- if (@current_user!=nil) and (GraderConfiguration.show_tasks_to?(@current_user))
|
|
|
%li.nav-item.dropdown
|
|
|
%a.nav-link.dropdown-toggle{href: '#', 'data-bs': {toggle:'dropdown'}, aria: {expanded:"false"}, role: "button"}
|
|
|
= "#{I18n.t 'menu.submissions'}"
|
|
|
%ul.dropdown-menu
|
|
|
%li= link_to 'View', submissions_path, class:'dropdown-item'
|
|
|
%li= link_to 'Self Test', test_index_path, class:'dropdown-item'
|
|
|
/ hall of fame
|
|
|
- if GraderConfiguration['right.user_hall_of_fame']
|
|
|
= add_menu("#{I18n.t 'menu.hall_of_fame'}", 'report', 'problem_hof', class: 'nav-item')
|
|
|
/ display MODE button (with countdown in contest mode)
|
|
|
- if GraderConfiguration.analysis_mode?
|
|
|
%div.navbar-btn.btn.btn-success#countdown= "ANALYSIS MODE"
|
|
|
- elsif GraderConfiguration.time_limit_mode?
|
|
|
- if @current_user.contest_finished?
|
|
|
%div.navbar-btn.btn.btn-danger#countdown= "Contest is over"
|
|
|
- elsif !@current_user.contest_started?
|
|
|
%div.navbar-btn.btn.btn-primary#countdown= (t 'title_bar.contest_not_started')
|
|
|
- else
|
|
|
%div.navbar-btn.btn.btn-primary#countdown asdf
|
|
|
:javascript
|
|
|
$("#countdown").countdown({until: "+#{@current_user.contest_time_left.to_i}s", layout: 'Time left: {hnn}:{mnn}:{snn}'});
|
|
|
/ admin section
|
|
|
- if (@current_user!=nil) and (session[:admin])
|
|
|
/ management
|
|
|
%li.nav-item.dropdown
|
|
|
%a.nav-link.dropdown-toggle{href: '#', 'data-bs': {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
|
|
|
Manage
|
|
|
%ul.dropdown-menu
|
|
|
%li= link_to 'Announcements', announcements_path, class: 'dropdown-item'
|
|
|
%li= link_to 'Problems', problems_path, class: 'dropdown-item'
|
|
|
%li= link_to 'Tags', tags_path, class: 'dropdown-item'
|
|
|
%li= link_to 'Users', user_admin_index_path, class: 'dropdown-item'
|
|
|
%li= link_to 'User Groups', groups_path, class: 'dropdown-item'
|
|
|
%li= link_to 'Graders', graders_list_path, class: 'dropdown-item'
|
|
|
%li= link_to 'Message ', console_messages_path, class: 'dropdown-item'
|
|
|
%li
|
|
|
%hr.dropdown-divider
|
|
|
%li= link_to 'System config', grader_configuration_index_path, class: 'dropdown-item'
|
|
|
%li
|
|
|
%hr.dropdown-divider
|
|
|
%li= link_to 'Sites', sites_path, class: 'dropdown-item'
|
|
|
%li= link_to 'Contests', contest_management_index_path, class: 'dropdown-item'
|
|
|
-#
|
|
|
/ report
|
|
|
%li.nav-item.dropdown
|
|
|
%a.nav-link.dropdown-toggle{href: '#', 'data-bs': {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
|
|
|
Report
|
|
|
%ul.dropdown-menu
|
|
|
%li= link_to 'Current Score', current_score_report_path, class: 'dropdown-item'
|
|
|
%li= link_to 'Score Report', max_score_report_path, class: 'dropdown-item'
|
|
|
%li= link_to 'Submission Report', submission_report_path, class: 'dropdown-item'
|
|
|
%li= link_to 'Login Report', login_report_path, class: 'dropdown-item'
|
|
|
- if (ungraded = Submission.where('graded_at is null').where('submitted_at < ?', 1.minutes.ago).count) > 0
|
|
|
=link_to "#{ungraded} backlogs!",
|
|
|
graders_list_path,
|
|
|
class: 'navbar-btn btn btn-default btn-warning', data: {toggle: 'tooltip'},title: 'Number of ungraded submission'
|
|
|
/ announcement
|
|
|
- @nav_announcement.each do |ann|
|
|
|
%p.navbar-text
|
|
|
= ann.body.html_safe
|
|
|
|
|
|
|
|
|
|
|
|
%ul.nav.navbar-nav.navbar-right
|
|
|
= add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-question-sign')}".html_safe, 'main', 'help')
|
|
|
= add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-comment')}".html_safe, 'messages', 'index', {title: I18n.t('menu.messages'), data: {toggle: 'tooltip'}})
|
|
|
- if GraderConfiguration['system.user_setting_enabled']
|
|
|
= add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-cog', id: 'user_profile')}".html_safe, 'users', 'profile', {title: I18n.t('menu.settings'), data: {toggle: 'tooltip'}})
|
|
|
= add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-log-out')} #{@current_user.full_name}".html_safe, 'main', 'login', {title: I18n.t('menu.log_out'), data: {toggle: 'tooltip'}})
|
|
|
|
|
|
|