-
-
Notifications
You must be signed in to change notification settings - Fork 315
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 #3180 from tvdeyen/7.4-admin-stylesheets
[7.4] Allow additional stylesheets to be included in the admin UI
- Loading branch information
Showing
8 changed files
with
81 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
require "fileutils" | ||
require "thor" | ||
|
||
module Alchemy | ||
class Upgrader::SevenPointFour < Upgrader | ||
include Thor::Base | ||
include Thor::Actions | ||
|
||
class << self | ||
def update_custom_css_config | ||
if File.exist? "app/assets/config/manifest.js" | ||
log "Removing alchemy/admin/custom.css from assets config file." | ||
task.gsub_file "app/assets/config/manifest.js", %r{//= link alchemy/admin/custom.css\n}, "" | ||
end | ||
end | ||
|
||
private | ||
|
||
def task | ||
@_task || new | ||
end | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ | |
//= link_tree ../images | ||
//= link tinymce/langs/de.js | ||
//= link_tree ../builds | ||
//= link alchemy/admin/custom.css |
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,11 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
RSpec.describe Alchemy::Engine do | ||
describe "alchemy.admin_stylesheets" do | ||
it "includes custom css" do | ||
expect(Rails.application.config.assets.precompile).to include("alchemy/admin/custom.css") | ||
end | ||
end | ||
end |