Skip to content

Upgrade to v2.3.2 of Admin-lte #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.3.2

Features:

- Updating tool pulls latest release of Adminlte v2.3.2

## 1.3.2

Features:
Expand All @@ -17,4 +23,4 @@ Features:
- Updating tool pulls latest release from [AdminLTE](https://github.com/almasaeed2010/AdminLTE) `/lib/adminlte-rails/source_file.rb`.
- Support iCheck controls (only flat style) .
- Support datatables.
- Convert font-face urls for Rails assets pipeline.
- Convert font-face urls for Rails assets pipeline.
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,36 @@ Or install it yourself as:

Add the following to your `app/assets/javascripts/application.js`:

//= require bootstrap.min
//= require admin-lte
//= require admin-lte


### Include adminlte-rails stylesheet assets

Add the following to your `app/assets/stylesheets/application.css`:

*= require bootstrap
*= require font-awesome
*= require ionicons
*= require admin-lte
*= require admin-lte


If you want to use additional features, add more these lines to your `app/assets/stylesheets/application.css`:
### Note:

Admin-lte depends upon bootstrap but does ship with it. So you need to include bootstrap and other libraries yourself.

*= require iCheck/all
*= require datatables/dataTables.bootstrap
### If you want to use additional features, add those gem seperately:

* iCheck
* dataTables

## Updating version of Adminlte

Rake tasks supplied allow you update Adminlte version yourself. Run
following to see list of commands available

$ bundle exec rake -T


## Version

1.3.2 (AdminLTE 1.3.0)
2.3.2 (AdminLTE 2.3.2)

## Changelog

Expand Down
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ task :update do
files = SourceFile.new
files.cleanup
files.fetch
files.convert
end

task :convert do
Expand Down
108 changes: 26 additions & 82 deletions lib/adminlte-rails/source_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ def fetch
# Fetch javascripts
fetch_javascripts(remote, tag)

# Fetch fonts
fetch_fonts(remote, tag)

# Fetch stylesheets
fetch_stylesheets(remote, tag)

Expand All @@ -36,16 +33,6 @@ def fetch

desc 'convert css to use rails paths', 'make css use rails paths'

def convert
self.destination_root = 'vendor/assets'
inside destination_root do
#gsub_file 'stylesheets/bootstrap.scss', %r/url\(([^\)]*)\)/, 'image-url(\1)'
gsub_file 'stylesheets/bootstrap.scss', %r/url\('(\.\.\/fonts\/)([^\)]*)'\)/, 'url(font-path(\'\2\'))'
gsub_file 'stylesheets/font-awesome.scss', %r/url\('(\.\.\/fonts\/)([^\)]*)'\)/, 'url(font-path(\'\2\'))'
gsub_file 'stylesheets/ionicons.scss', %r/url\("(\.\.\/fonts\/)([^\)]*)"\)/, 'url(font-path(\'\2\'))'
end
end

private
def fetch_tags
http = HTTPClient.new
Expand All @@ -62,85 +49,42 @@ def select(msg, elements)
end

def fetch_javascripts(remote, tag)
js_path = "#{remote}/raw/#{tag}/js"
get "#{js_path}/bootstrap.min.js", 'javascripts/bootstrap.min.js'
get "#{js_path}/AdminLTE/app.js", 'javascripts/admin-lte.js'
end

def fetch_fonts(remote, tag)
fonts_path = "#{remote}/raw/#{tag}/fonts"
get "#{fonts_path}/FontAwesome.otf", 'fonts/FontAwesome.otf'
get "#{fonts_path}/fontawesome-webfont.eot", 'fonts/fontawesome-webfont.eot'
get "#{fonts_path}/fontawesome-webfont.svg", 'fonts/fontawesome-webfont.svg'
get "#{fonts_path}/fontawesome-webfont.ttf", 'fonts/fontawesome-webfont.ttf'
get "#{fonts_path}/fontawesome-webfont.woff", 'fonts/fontawesome-webfont.woff'
get "#{fonts_path}/glyphicons-halflings-regular.eot", 'fonts/glyphicons-halflings-regular.eot'
get "#{fonts_path}/glyphicons-halflings-regular.svg", 'fonts/glyphicons-halflings-regular.svg'
get "#{fonts_path}/glyphicons-halflings-regular.ttf", 'fonts/glyphicons-halflings-regular.ttf'
get "#{fonts_path}/glyphicons-halflings-regular.woff", 'fonts/glyphicons-halflings-regular.woff'
get "#{fonts_path}/ionicons.eot", 'fonts/ionicons.eot'
get "#{fonts_path}/ionicons.svg", 'fonts/ionicons.svg'
get "#{fonts_path}/ionicons.ttf", 'fonts/ionicons.ttf'
get "#{fonts_path}/ionicons.woff", 'fonts/ionicons.woff'
js_path = "#{remote}/raw/#{tag}/dist/js"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace detected.

get "#{js_path}/app.js", 'javascripts/admin-lte.js'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

plugins_path = "#{remote}/raw/#{tag}/plugins"
get "#{plugins_path}/daterangepicker/daterangepicker.js", 'javascripts/daterangepicker.js'
get "#{plugins_path}/timepicker/bootstrap-timepicker.js", 'javascripts/bootstrap-timepicker.js'
get "#{plugins_path}/bootstrap-slider/bootstrap-slider.js", 'javascripts/bootstrap-slider.js'
end

def fetch_images(remote, tag)
images_path = "#{remote}/raw/#{tag}/img"
images_path = "#{remote}/raw/#{tag}/dist/img"
get "#{images_path}/avatar.png", 'images/avatar.png'
get "#{images_path}/avatar2.png", 'images/avatar2.png'
get "#{images_path}/avatar3.png", 'images/avatar3.png'
end

def fetch_stylesheets(remote, tag)
# Get Css files
css_path = "#{remote}/raw/#{tag}/css"
get "#{css_path}/bootstrap.css", 'stylesheets/bootstrap.scss'
get "#{css_path}/AdminLTE.css", 'stylesheets/admin-lte.css'
get "#{css_path}/ionicons.css", 'stylesheets/ionicons.scss'
get "#{css_path}/font-awesome.css", 'stylesheets/font-awesome.scss'
css_path = "#{remote}/raw/#{tag}/dist/css"

get "#{css_path}/AdminLTE.css", 'stylesheets/admin-lte.css'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

get "#{css_path}/skins/skin-purple.css", 'stylesheets/skin-purple.css'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

get "#{css_path}/skins/skin-blue.css", 'stylesheets/skin-blue.css'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace detected.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace detected.

# Get Plugins stylesheets
plugins_path = "#{remote}/raw/#{tag}/plugins"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace detected.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace detected.

get "#{plugins_path}/bootstrap-slider/slider.css", 'stylesheets/bootstrap-slider.css'
get "#{plugins_path}/daterangepicker/daterangepicker-bs3.css", 'stylesheets/daterangepicker.css'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [100/80]
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

get "#{plugins_path}/timepicker/bootstrap-timepicker.css", 'stylesheets/bootstrap-timepicker.css'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [101/80]
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace detected.

# Get DataTables assets
get "#{css_path}/datatables/images/sort_asc.png", 'stylesheets/datatables/images/sort_asc.png'
get "#{css_path}/datatables/images/sort_asc_disabled.png", 'stylesheets/datatables/images/sort_asc_disabled.png'
get "#{css_path}/datatables/images/sort_both.png", 'stylesheets/datatables/images/sort_both.png'
get "#{css_path}/datatables/images/sort_desc.png", 'stylesheets/datatables/images/sort_desc.png'
get "#{css_path}/datatables/images/sort_desc_disabled.png", 'stylesheets/datatables/images/sort_desc_disabled.png'
get "#{css_path}/datatables/dataTables.bootstrap.css", 'stylesheets/datatables/dataTables.bootstrap.css'

# Get iCheck assets
icheck_path = "#{css_path}/iCheck"
get "#{icheck_path}/all.css", 'stylesheets/iCheck/all.scss'
get "#{icheck_path}/flat/_all.css", 'stylesheets/iCheck/flat/_all.css'
get "#{icheck_path}/flat/aero.css", 'stylesheets/iCheck/flat/aero.css'
get "#{icheck_path}/flat/aero.png", 'stylesheets/iCheck/flat/aero.png'
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]'
get "#{icheck_path}/flat/blue.css", 'stylesheets/iCheck/flat/blue.css'
get "#{icheck_path}/flat/blue.png", 'stylesheets/iCheck/flat/blue.png'
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]'
get "#{icheck_path}/flat/flat.css", 'stylesheets/iCheck/flat/flat.css'
get "#{icheck_path}/flat/flat.png", 'stylesheets/iCheck/flat/flat.png'
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]'
get "#{icheck_path}/flat/green.css", 'stylesheets/iCheck/flat/green.css'
get "#{icheck_path}/flat/green.png", 'stylesheets/iCheck/flat/green.png'
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]'
get "#{icheck_path}/flat/grey.css", 'stylesheets/iCheck/flat/grey.css'
get "#{icheck_path}/flat/grey.png", 'stylesheets/iCheck/flat/grey.png'
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]'
get "#{icheck_path}/flat/orange.css", 'stylesheets/iCheck/flat/orange.css'
get "#{icheck_path}/flat/orange.png", 'stylesheets/iCheck/flat/orange.png'
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]'
get "#{icheck_path}/flat/pink.css", 'stylesheets/iCheck/flat/pink.css'
get "#{icheck_path}/flat/pink.png", 'stylesheets/iCheck/flat/pink.png'
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]'
get "#{icheck_path}/flat/purple.css", 'stylesheets/iCheck/flat/purple.css'
get "#{icheck_path}/flat/purple.png", 'stylesheets/iCheck/flat/purple.png'
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]'
get "#{icheck_path}/flat/red.css", 'stylesheets/iCheck/flat/red.css'
get "#{icheck_path}/flat/red.png", 'stylesheets/iCheck/flat/red.png'
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]'
get "#{icheck_path}/flat/yellow.css", 'stylesheets/iCheck/flat/yellow.css'
get "#{icheck_path}/flat/yellow.png", 'stylesheets/iCheck/flat/yellow.png'
get "#{icheck_path}/flat/[email protected]", 'stylesheets/iCheck/flat/[email protected]'

# get "#{css_path}/datatables/images/sort_asc.png", 'stylesheets/datatables/images/sort_asc.png'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [100/80]

# get "#{css_path}/datatables/images/sort_asc_disabled.png", 'stylesheets/datatables/images/sort_asc_disabled.png'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [118/80]

# get "#{css_path}/datatables/images/sort_both.png", 'stylesheets/datatables/images/sort_both.png'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [102/80]

# get "#{css_path}/datatables/images/sort_desc.png", 'stylesheets/datatables/images/sort_desc.png'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [102/80]

# get "#{css_path}/datatables/images/sort_desc_disabled.png", 'stylesheets/datatables/images/sort_desc_disabled.png'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [120/80]

# get "#{css_path}/datatables/dataTables.bootstrap.css", 'stylesheets/datatables/dataTables.bootstrap.css'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [110/80]

end
end
end
4 changes: 2 additions & 2 deletions lib/adminlte-rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module AdminLTE
module Rails
VERSION = '1.3.3'
VERSION = '2.3.2'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

end
end
end
Binary file removed vendor/assets/fonts/FontAwesome.otf
Binary file not shown.
Binary file removed vendor/assets/fonts/fontawesome-webfont.eot
Binary file not shown.
Loading