-
Notifications
You must be signed in to change notification settings - Fork 2
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 #498 from commercekitchen/develop
Create AT&T subdomain
- Loading branch information
Showing
22 changed files
with
143 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ruby 2.6.6 |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,8 @@ | ||
.att { | ||
@include color_scheme($att-dark-blue, $att-light-blue, $att-light-blue); | ||
@include banner($att-light-blue); | ||
@include buttons($att-dark-blue); | ||
@include course_widget($att-light-blue, $att-dark-blue); | ||
@include lesson_tile($att-light-blue, $grey, $att-orange); | ||
@include icons($att-light-blue, $orange); | ||
} |
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
Empty file.
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,5 +1,5 @@ | ||
<div class="trainers-link"> | ||
<strong> | ||
<%= link_to t('home.trainer_link'), "https://training.digitallearn.org" %> | ||
<%= link_to t('home.trainer_link'), current_organization.training_site_link %> | ||
</strong> | ||
</div> |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
require 'colorize' | ||
|
||
# GIT Repo URL | ||
set :repo_url, "[email protected]:PublicLibraryAssoc/cpldl.git" | ||
set :repo_url, "[email protected]:commercekitchen/cpldl.git" | ||
|
||
# Ruby Version (used for RVM) - MUST MATCH PASSENGER/SERVER CONFIG! | ||
set :ruby_version, '2.6.4' | ||
|
@@ -83,7 +83,6 @@ | |
'tmp/sockets', | ||
'vendor/bundle', | ||
'public/system', | ||
'public/storylines', | ||
'public/ckeditor_assets' | ||
) | ||
|
||
|
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,29 @@ | ||
class CreateAttSubsite < ActiveRecord::Migration[5.2] | ||
def up | ||
# Subsite Attributes | ||
subsite_attributes = { | ||
name: 'AT&T', | ||
subdomain: 'att', | ||
branches: false, | ||
accepts_programs: false, | ||
accepts_partners: false | ||
} | ||
|
||
# Admin users | ||
admins = ['[email protected], | ||
[email protected], | ||
[email protected]'] | ||
|
||
# Create the subdomain organization | ||
subsite = Organization.create!(subsite_attributes) | ||
|
||
# Invite Admins | ||
admins.each do |email| | ||
AdminInvitationService.invite(email: email, organization: subsite) | ||
end | ||
end | ||
|
||
def down | ||
raise ActiveRecord::IrreversibleMigration | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
# frozen_string_literal: true | ||
|
||
DataMigrate::Data.define(version: 20_210_209_193_144) | ||
# encoding: UTF-8 | ||
DataMigrate::Data.define(version: 20210630052420) |
5 changes: 5 additions & 0 deletions
5
db/migrate/20210726182520_add_use_subdomain_for_training_site_flag_to_organizations.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 AddUseSubdomainForTrainingSiteFlagToOrganizations < ActiveRecord::Migration[5.2] | ||
def change | ||
add_column :organizations, :use_subdomain_for_training_site, :boolean, default: false, null: false | ||
end | ||
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'feature_helper' | ||
|
||
feature 'Admin user updates lesson' do | ||
let(:story_line) do | ||
fixture_file_upload(Rails.root.join('spec', 'fixtures', 'BasicSearch1.zip'), 'application/zip') | ||
end | ||
|
||
let(:pla) { FactoryBot.create(:default_organization) } | ||
|
||
let(:course) { FactoryBot.create(:course, organization: pla) } | ||
let(:lesson) { FactoryBot.create(:lesson, course: course) } | ||
|
||
let(:user) { FactoryBot.create(:user, :admin, organization: pla) } | ||
|
||
before do | ||
switch_to_subdomain(pla.subdomain) | ||
log_in_with user.email, user.password | ||
end | ||
|
||
scenario 'can change lesson attachment', js: true do | ||
visit edit_admin_course_lesson_path(course, lesson) | ||
expect(page).to have_content('BasicSearch1.zip') | ||
accept_confirm do | ||
click_link 'Remove' | ||
end | ||
expect(page).not_to have_content('BasicSearch1.zip') | ||
expect(page).to have_content('Story Line successfully removed, please upload a new story line .zip file.') | ||
|
||
# Re-attach file | ||
attach_file 'Articulate Storyline Package', Rails.root.join('spec', 'fixtures', 'BasicSearch1.zip') | ||
click_button 'Save Lesson' | ||
|
||
expect(current_path).to eq(edit_admin_course_lesson_path(course.to_param, Lesson.last.to_param)) | ||
expect(page).to have_content('Lesson successfully updated.') | ||
end | ||
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