Skip to content

Commit a8a2a37

Browse files
committed
Load stylesheets only when plugin is called
Signed-off-by: Arpit Goyal <agmps17@gmail.com>
1 parent d372d77 commit a8a2a37

File tree

6 files changed

+61
-78
lines changed

6 files changed

+61
-78
lines changed

app/assets/stylesheets/webapp_style.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,3 @@
55
display: inline-block;
66
text-indent: -9999px;
77
}
8-
9-
.settings-table{
10-
margin-top: 30px;
11-
}

app/assets/stylesheets/webapps.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +0,0 @@
1-
/*
2-
* This is a manifest file that'll be compiled into application.css, which will include all the files
3-
* listed below.
4-
*
5-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7-
*
8-
* You're free to add application-wide styles to this file and they'll appear at the top of the
9-
* compiled file, but it's generally better to create a new file per style scope.
10-
*
11-
*= require_self
12-
/*=require webapp_style
13-
*/

app/views/webapps/_list.html.slim

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,46 @@
1-
#webapps-table
2-
.settings-table
3-
- if @webapps.size > 0
4-
table.settings.table
5-
thead
6-
tr
7-
th.settings-col1.webapps-col1 scope="col" = t 'name'
8-
th.settings-col2.webapps-col2 scope="col" = t 'url'
9-
tbody
10-
= render :partial => 'webapp', :collection => @webapps
11-
- else
12-
div align="center"
13-
div align="left"
14-
h2= t 'there_are_no_webapps'
15-
p Web apps are web-based applications hosted in your Amahi HDA.
16-
p
17-
| Example of web apps are
18-
a href="http://www.wordpress.org" target="_blank" Wordpress
19-
|,
20-
a href="http://www.mediawiki.org" target="_blank" MediaWiki
21-
|,
22-
a href="http://gallery.menalto.com/" target="_blank" Gallery
23-
|,
24-
a href="http://www.webmin.com/" target="_blank" Webmin
25-
| and
26-
a href="http://phpsysinfo.sourceforge.net/" target="_blank" PHPSysinfo
27-
p There are a myriad of other apps that run under Linux.
28-
p You can install web apps in this panel by:
29-
p
30-
ul
31-
li
32-
| Deciding what
33-
b " name"
34-
| you want to access the web app within your network (e.g. http://blog), and
35-
li
36-
| Selecting where is the
37-
b " root directory"
38-
| of the app you want to run
39-
p The application code is expected to be present (before or after configuring the app) in the root directory.
40-
p You can install it there as an archive from source (tar/zip), or as a package from existing applications in the base OS.
41-
p Currently supported are applications based on LAMP (PHP), Python, static pages and others.
42-
p
43-
| We have a small
44-
a href="http://wiki.amahi.org/index.php/Category:Apps" target="_blank" gallery of apps
45-
| that other Amahi
46-
| developers and users have tried and tested.
1+
.settings-table#webapps-table
2+
- if @webapps.size > 0
3+
table.settings.table
4+
thead
5+
tr
6+
th.settings-col1.webapps-col1 scope="col" = t 'name'
7+
th.settings-col2.webapps-col2 scope="col" = t 'url'
8+
tbody
9+
= render :partial => 'webapp', :collection => @webapps
10+
- else
11+
div align="center"
12+
div align="left"
13+
h2= t 'there_are_no_webapps'
14+
p Web apps are web-based applications hosted in your Amahi HDA.
15+
p
16+
| Example of web apps are
17+
a href="http://www.wordpress.org" target="_blank" Wordpress
18+
|,
19+
a href="http://www.mediawiki.org" target="_blank" MediaWiki
20+
|,
21+
a href="http://gallery.menalto.com/" target="_blank" Gallery
22+
|,
23+
a href="http://www.webmin.com/" target="_blank" Webmin
24+
| and
25+
a href="http://phpsysinfo.sourceforge.net/" target="_blank" PHPSysinfo
26+
p There are a myriad of other apps that run under Linux.
27+
p You can install web apps in this panel by:
28+
p
29+
ul
30+
li
31+
| Deciding what
32+
b " name"
33+
| you want to access the web app within your network (e.g. http://blog), and
34+
li
35+
| Selecting where is the
36+
b " root directory"
37+
| of the app you want to run
38+
p The application code is expected to be present (before or after configuring the app) in the root directory.
39+
p You can install it there as an archive from source (tar/zip), or as a package from existing applications in the base OS.
40+
p Currently supported are applications based on LAMP (PHP), Python, static pages and others.
41+
p
42+
| We have a small
43+
a href="http://wiki.amahi.org/index.php/Category:Apps" target="_blank" gallery of apps
44+
| that other Amahi
45+
| developers and users have tried and tested.
4746

app/views/webapps/_new.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= button_tag "#{t('new_web_app')}" , :type => 'button', :class => 'open-area btn btn-create', :id => "new-webapp-to-step1", :data => { :related => "#new-webapp-step1" }
1+
= button_tag "#{t('new_web_app')}" , :type => 'button', :class => 'open-area btnn btn btn-create', :id => "new-webapp-to-step1", :data => { :related => "#new-webapp-step1" }
22

33
#new-webapp-box
44
#webapp-new

app/views/webapps/index.html.slim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
= stylesheet_link_tag 'webapp_style'
12
=render 'content'
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#webapps-table
2-
.settings-table
3-
- if @webapps.size > 0
4-
table.settings.table
5-
thead
6-
tr
7-
th.settings-col1.webapps-col1 scope="col" = t 'name'
8-
th.settings-col2.webapps-col2 scope="col" = t 'url'
9-
tbody
10-
= render :partial => 'permission_webapp', :collection => @webapps, :as=> :webapp
11-
- else
12-
div align="center"
13-
div align="left"
14-
h2= t 'there_are_no_webapps'
1+
= stylesheet_link_tag 'webapp_style'
2+
.settings-table#permissions
3+
- if @webapps.size > 0
4+
table.settings.table
5+
thead
6+
tr
7+
th.settings-col1.webapps-col1 scope="col" = t 'name'
8+
th.settings-col2.webapps-col2 scope="col" = t 'url'
9+
tbody
10+
= render :partial => 'permission_webapp', :collection => @webapps, :as=> :webapp
11+
- else
12+
div align="center"
13+
div align="left"
14+
h2= t 'there_are_no_webapps'

0 commit comments

Comments
 (0)