transferred Code Ocean from original repository to GitHub

This commit is contained in:
Hauke Klement
2015-01-22 09:51:49 +01:00
commit 4cbf9970b1
683 changed files with 11979 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
- if current_user.try(:internal?)
ul.breadcrumb
- if model = Kernel.const_get(controller_name.classify) rescue nil
- object = model.find_by(id: params[:id])
- if model.try(:nested_resource?)
li = model.model_name.human(count: 2)
- if object
li = object
- else
li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
- if object
li = link_to(object, send(:"#{model.model_name.singular}_path", object))
li.active
- if translation_present?("shared.#{params[:action]}")
= t("shared.#{params[:action]}")
- else
= t("#{controller_name}.index.#{params[:action]}")
- else
li.active = t("breadcrumbs.#{params[:action]}")

View File

@@ -0,0 +1,3 @@
#flash data-message-failure=t('shared.message_failure')
- %w[danger info notice success warning].each do |severity|
p.alert.flash class="alert-#{severity == 'notice' ? 'success' : severity}" id="flash-#{severity}" = flash[severity]

View File

@@ -0,0 +1,7 @@
li.dropdown
a.dropdown-toggle data-toggle='dropdown' href='#'
= t("locales.#{I18n.locale}")
span.caret
ul.dropdown-menu role='menu'
- I18n.available_locales.sort_by { |locale| t("locales.#{locale}") }.each do |locale|
li = link_to(t("locales.#{locale}"), url_for(params.merge(locale: locale)))

View File

@@ -0,0 +1,11 @@
- if current_user.try(:internal?)
ul.nav.navbar-nav
li.dropdown
a.dropdown-toggle data-toggle='dropdown' href='#'
= t('shared.administration')
span.caret
ul.dropdown-menu role='menu'
- models = [ExecutionEnvironment, Exercise, Consumer, ExternalUser, FileType, InternalUser, Submission].sort_by { |model| model.model_name.human(count: 2) }
- models.each do |model|
- if policy(model).index?
li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))

View File

@@ -0,0 +1,20 @@
- if current_user
- if current_user.internal?
li.dropdown
a.dropdown-toggle data-toggle='dropdown' href='#'
i.glyphicon.glyphicon-user
= current_user
span.caret
ul.dropdown-menu role='menu'
li = link_to(t('consumers.show.link'), current_user.consumer) if current_user.consumer
li = link_to(t('internal_users.show.link'), current_user)
li = link_to(t('sessions.destroy.link'), sign_out_path, method: :delete)
- else
li
p.navbar-text
i.glyphicon.glyphicon-user
= current_user
- else
li = link_to(sign_in_path) do
i.fa.fa-sign-in
= t('sessions.new.link')

View File

@@ -0,0 +1,9 @@
- unless local_assigns[:modal]
h1 = t('shared.help.headline')
h2 = t('shared.help.general_help')
== Forgery(:lorem_ipsum).paragraphs(10, html: true)
- if local_assigns.has_key?(:execution_environment)
h2 = t('shared.help.execution_environment_specific_help', execution_environment: execution_environment)
= render_markdown(execution_environment.help)

View File

@@ -0,0 +1,3 @@
h1 = t('breadcrumbs.welcome')
p = Forgery(:lorem_ipsum).words(100)