diff options
author | Sean O'Brien <diggity@diggmobile.(none)> | 2012-02-27 17:18:41 -0500 |
---|---|---|
committer | James Vasile <james@jamesvasile.com> | 2012-03-12 14:39:31 -0400 |
commit | 638b287d1bf9e2772716cc6391a18d65ade3e18b (patch) | |
tree | c8f3f8d9f85cd7fec4232e6b3f25c825220478d0 /modules | |
parent | d2bcebf6766ef2dec4827006198296161d1b49be (diff) |
new template based upon bootstrap
Diffstat (limited to 'modules')
-rw-r--r-- | modules/installed/apps/apps.py | 4 | ||||
-rw-r--r-- | modules/installed/help/help.py | 18 | ||||
-rw-r--r-- | modules/installed/lib/forms.py | 10 | ||||
-rw-r--r-- | modules/installed/privacy/privacy.py | 6 | ||||
-rw-r--r-- | modules/installed/router/info.py | 2 | ||||
-rw-r--r-- | modules/installed/router/router.py | 10 | ||||
-rw-r--r-- | modules/installed/services/services.py | 4 | ||||
-rw-r--r-- | modules/installed/sharing/sharing.py | 6 | ||||
-rw-r--r-- | modules/installed/system/config.py | 2 | ||||
-rw-r--r-- | modules/installed/system/expert_mode.py | 2 | ||||
-rw-r--r-- | modules/installed/system/system.py | 4 | ||||
-rw-r--r-- | modules/installed/system/users.py | 14 | ||||
-rw-r--r-- | modules/installed/system/wan.py | 4 |
13 files changed, 44 insertions, 42 deletions
diff --git a/modules/installed/apps/apps.py b/modules/installed/apps/apps.py index 1de7617..fa22178 100644 --- a/modules/installed/apps/apps.py +++ b/modules/installed/apps/apps.py @@ -7,7 +7,7 @@ class Apps(PagePlugin): def __init__(self, *args, **kwargs): PagePlugin.__init__(self, *args, **kwargs) self.register_page("apps") - self.menu = cfg.main_menu.add_item("User Apps", "/apps", 80) + self.menu = cfg.main_menu.add_item("Apps", "/apps", 80) self.menu.add_item("Photo Gallery", "/apps/photos", 35) @cherrypy.expose @@ -27,7 +27,7 @@ class Apps(PagePlugin): @require() def photos(self): return self.fill_template(title="Open ID", main='', sidebar_right=""" -<h2>Photo Gallery</h2><p>Your photos might well be the most valuable +<strong>Photo Gallery</strong><p>Your photos might well be the most valuable digital property you have, so why trust it to companies that have no investment in the sentimental value of your family snaps? Keep those photos local, backed up, easily accessed and free from the whims of diff --git a/modules/installed/help/help.py b/modules/installed/help/help.py index e0a1870..f10b04d 100644 --- a/modules/installed/help/help.py +++ b/modules/installed/help/help.py @@ -8,7 +8,7 @@ class Help(PagePlugin): def __init__(self, *args, **kwargs): PagePlugin.__init__(self, *args, **kwargs) self.register_page("help") - self.menu = cfg.main_menu.add_item(_("Documentation and FAQ"), "/help", 101) + self.menu = cfg.main_menu.add_item(_("Documentation"), "/help", 101) self.menu.add_item(_("Where to Get Help"), "/help/index", 5) self.menu.add_item(_("Developer's Manual"), "/help/view/plinth", 10) self.menu.add_item(_("FAQ"), "/help/view/faq", 20) @@ -27,7 +27,7 @@ class Help(PagePlugin): offer suggestions, edits, and screenshots for completing it!</p> - <p><a href="http://wiki.debian.org/FreedomBox">A section of + <p><a href="http://wiki.debian.org/FreedomBox" target="_blank">A section of the Debian wiki</a> is devoted to the %(box)s. At some point the documentation in the wiki and the documentation in the manual should dovetail.</p> @@ -48,8 +48,9 @@ class Help(PagePlugin): @cherrypy.expose def about(self): return self.fill_template(title=_("About the %s" % cfg.box_name), main=""" - <p> We live in a world where our use of the network is - mediated by organizations that often do not have our best + <img src="/static/theme/img/freedombox-logo-200px.png" style="float:right;padding:25px;" /> + <p>We live in a world where our use of the network is + mediated by those who often do not have our best interests at heart. By building software that does not rely on a central service, we can regain control and privacy. By keeping our data in our homes, we gain useful legal @@ -62,14 +63,15 @@ class Help(PagePlugin): runs on must be cheap. The software it runs on must be easy to install and administrate by anybody. It must be easy to transition from existing services.</p> - - <p>There are a number of projects working to realize a future + <p><a class="btn btn-primary btn-large" href="http://wiki.debian.org/FreedomBox" target="_blank">Learn more »</a></p>""", + sidebar_right=_("""<strong>Our Goal</strong><p>There are a number of projects working to realize a future of distributed services; we aim to bring them all together in a convenient package.</p> - <p>For more information about the Freedom Box project, see the + <p>For more information about the FreedomBox project, see the <a href="http://wiki.debian.org/FreedomBox">Debian - Wiki</a>.</p>""") + Wiki</a>.</p> + """)) class View(PagePlugin): def __init__(self, *args, **kwargs): diff --git a/modules/installed/lib/forms.py b/modules/installed/lib/forms.py index aac4cd4..df78eea 100644 --- a/modules/installed/lib/forms.py +++ b/modules/installed/lib/forms.py @@ -50,9 +50,9 @@ class Form(): quad = [0,0,0,0] self.text += """ <label> <span>%(label)s</span> - <input type="text" class="inputtextnowidth" name="%(name)s0" id="%(id)s0" value="%(q0)s" maxlength="3" size="1"/><b>.</b> - <input type="text" class="inputtextnowidth" name="%(name)s1" id="%(id)s1" value="%(q1)s" maxlength="3" size="1"/><b>.</b> - <input type="text" class="inputtextnowidth" name="%(name)s2" id="%(id)s2" value="%(q2)s" maxlength="3" size="1"/><b>.</b> + <input type="text" class="inputtextnowidth" name="%(name)s0" id="%(id)s0" value="%(q0)s" maxlength="3" size="1"/><strong>.</strong> + <input type="text" class="inputtextnowidth" name="%(name)s1" id="%(id)s1" value="%(q1)s" maxlength="3" size="1"/><strong>.</strong> + <input type="text" class="inputtextnowidth" name="%(name)s2" id="%(id)s2" value="%(q2)s" maxlength="3" size="1"/><strong>.</strong> <input type="text" class="inputtextnowidth" name="%(name)s3" id="%(id)s3" value="%(q3)s" maxlength="3" size="1"/> </label>""" % {'label':label, 'name':name, 'id':id, 'q0':quad[0], 'q1':quad[1], 'q2':quad[2], 'q3':quad[3]} @@ -77,7 +77,7 @@ class Form(): self.text += """ <div class="submit"> <label><span></span> - <input type="submit" class="button" value="%s" name="%s" id="%s" /> + <input type="submit" class="btn-primary" value="%s" name="%s" id="%s" /> </label></div>\n""" % (label, name, id) def submit_row(self, buttons): """buttons is a list of tuples, each containing label, name, id. Name and id are optional.""" @@ -99,7 +99,7 @@ class Form(): if button_text != '': button_text += " " - button_text += '<input type="submit" class="button" value="%s" name="%s" id="%s" />\n' % (label, name, id) + button_text += '<input type="submit" class="btn-primary" value="%s" name="%s" id="%s" />\n' % (label, name, id) self.text += '%s</div></label>' % button_text def name_or_id(self, name, id): if not name: name = id diff --git a/modules/installed/privacy/privacy.py b/modules/installed/privacy/privacy.py index 8eee565..a0eeffa 100644 --- a/modules/installed/privacy/privacy.py +++ b/modules/installed/privacy/privacy.py @@ -9,7 +9,7 @@ class Privacy(PagePlugin): def __init__(self, *args, **kwargs): PagePlugin.__init__(self, *args, **kwargs) self.register_page("privacy") - self.menu = cfg.main_menu.add_item("Privacy Controls", "/privacy", 12) + self.menu = cfg.main_menu.add_item("Privacy", "/privacy", 12) self.menu.add_item("General Config", "/privacy/config", 10) self.menu.add_item("Ad Blocking", "/privacy/adblock", 20) self.menu.add_item("TOR", "/privacy/TOR", 30) @@ -29,7 +29,7 @@ class Privacy(PagePlugin): is a founding consideration, not an afterthought.</p> """ return self.fill_template(title=_("Privacy Control Panel"), main=main, -sidebar_right=_("""<h2>Statement of Principles</h2><p>When we say your +sidebar_right=_("""<strong>Statement of Principles</strong><p>When we say your privacy is important, it's not just an empty pleasantry. We really mean it. Your privacy control panel should give you fine-grained control over exactly who can access your %s and the @@ -37,6 +37,6 @@ information on it.</p> <p>Your personal information should not leave this box without your knowledge and direction. And if companies or government wants this -information, they have to ask <b>you</b> for it. This gives you a +information, they have to ask <strong>you</strong> for it. This gives you a change to refuse and also tells you who wants your data.</p> """) % cfg.product_name) diff --git a/modules/installed/router/info.py b/modules/installed/router/info.py index 1f4585a..9b1f6ff 100644 --- a/modules/installed/router/info.py +++ b/modules/installed/router/info.py @@ -14,5 +14,5 @@ class Info(PagePlugin): @require() def index(self): return self.fill_template(title="Router Information", main=""" -<p> Eventually we will display a bunch of info, graphs and logs about the routing functions here.</p> +<p>Eventually we will display a bunch of info, graphs and logs about the routing functions here.</p> """) diff --git a/modules/installed/router/router.py b/modules/installed/router/router.py index 0d12c87..91b5866 100644 --- a/modules/installed/router/router.py +++ b/modules/installed/router/router.py @@ -11,7 +11,7 @@ class router(PagePlugin): order = 9 # order of running init in PagePlugins def __init__(self, *args, **kwargs): self.register_page("router") - self.menu = cfg.main_menu.add_item("Router Admin", "/router", 10) + self.menu = cfg.main_menu.add_item("Router", "/router", 10) self.menu.add_item("Wireless", "/router/wireless", 12) self.menu.add_item("Firewall", "/router/firewall", 18) self.menu.add_item("Hotspot and Mesh", "/router/hotspot") @@ -54,7 +54,7 @@ class setup(PagePlugin): def index(self): parts = self.forms('/router/setup') parts['title'] = "General Router Setup" - parts['sidebar_right']="""<h2>Introduction</h2><p>Your %s is a replacement for your + parts['sidebar_right']="""<strong>Introduction</strong><p>Your %s is a replacement for your wireless router. By default, it should do everything your usual router does. With the addition of some extra modules, its abilities can rival those of high-end routers costing hundreds of dollars.</p> @@ -88,7 +88,7 @@ class wan(FormPlugin, PagePlugin): url = ["/router/setup"] order = 10 - js = """<script LANGUAGE="JavaScript"> + js = """<script type="text/javascript"> <!-- function hideshow_static() { var d = document.getElementById('connect_type'); @@ -105,7 +105,7 @@ class wan(FormPlugin, PagePlugin): def sidebar_right(self, *args, **kwargs): side='' if cfg.users.expert(): - side += """<h2>WAN Connection Type</h2> + side += """<strong>WAN Connection Type</strong> <h3>DHCP</h3><p>DHCP allows your router to automatically connect with the upstream network. If you are unsure what option to choose, stick with DHCP. It is usually @@ -150,7 +150,7 @@ class wan(FormPlugin, PagePlugin): form.dotted_quad("Static DNS 2", name="dns2", quad=[dns20, dns21, dns22, dns23]) form.dotted_quad("Static DNS 3", name="dns3", quad=[dns30, dns31, dns32, dns33]) form.html('</div>') - form.html(""" <script LANGUAGE="JavaScript"> + form.html(""" <script type="text/javascript"> <!-- hideshow_static(); // --> diff --git a/modules/installed/services/services.py b/modules/installed/services/services.py index ba62378..5ad7feb 100644 --- a/modules/installed/services/services.py +++ b/modules/installed/services/services.py @@ -8,7 +8,7 @@ class Services(PagePlugin): def __init__(self, *args, **kwargs): PagePlugin.__init__(self, *args, **kwargs) self.register_page("services") - self.menu = cfg.main_menu.add_item("Other Services", "/services", 90) + self.menu = cfg.main_menu.add_item("Services", "/services", 90) self.menu.add_item("Open ID", "/services/openid", 35) @cherrypy.expose @@ -19,7 +19,7 @@ class Services(PagePlugin): @require() def openid(self): return self.fill_template(title="Open ID", main='', sidebar_right=""" -<h2>One Login for Every Site</h2><p>Your %s is also an OpenID +<strong>One Login for Every Site</strong><p>Your %s is also an OpenID machine. It can generate credentials that allow you to log in to many websites without the need to remember or enter a separate username and password at each one.</p> diff --git a/modules/installed/sharing/sharing.py b/modules/installed/sharing/sharing.py index a3ef736..866b9bc 100644 --- a/modules/installed/sharing/sharing.py +++ b/modules/installed/sharing/sharing.py @@ -10,7 +10,7 @@ class Sharing(PagePlugin): def __init__(self, *args, **kwargs): PagePlugin.__init__(self, *args, **kwargs) self.register_page("sharing") - self.menu = cfg.main_menu.add_item("Resource Sharing", "/sharing", 35) + self.menu = cfg.main_menu.add_item("Sharing", "/sharing", 35) self.menu.add_item("File Server", "/sharing/files", 10) @cherrypy.expose @@ -25,7 +25,7 @@ class Sharing(PagePlugin): @require() def files(self): return self.fill_template(title="File Server", main='', sidebar_right=_(""" -<h2>Freedom NAS</h2><p> The %s can make your spare hard drives accessible to your +<strong>Freedom NAS</strong><p> The %s can make your spare hard drives accessible to your local network, thus acting as a NAS server. We currently support sharing files via NFS and SMB. @@ -47,7 +47,7 @@ class PrinterSharing(PagePlugin): <p>TODO: Setup and install CUPS</p> """ return self.fill_template(title="Printer Sharing", main=main, sidebar_right=""" -<h2>Share Your Printer</h2><p> The %s can share your printer via Samba and CUPS.</p> +<strong>Share Your Printer</strong><p> The %s can share your printer via Samba and CUPS.</p> """ % cfg.box_name) diff --git a/modules/installed/system/config.py b/modules/installed/system/config.py index 151b710..c8b5190 100644 --- a/modules/installed/system/config.py +++ b/modules/installed/system/config.py @@ -64,7 +64,7 @@ class general(FormPlugin, PagePlugin): ## only expert users are going to get deep enough to see any timestamps if not cfg.users.expert(): return '' - return _(#"""<h2>Time Zone</h2> + return _(#"""<strong>Time Zone</strong> """<p>Set your timezone to get accurate timestamps. %(product)s will use this information to set your %(box)s's systemwide timezone.</p> diff --git a/modules/installed/system/expert_mode.py b/modules/installed/system/expert_mode.py index 16420a5..da8dbc5 100644 --- a/modules/installed/system/expert_mode.py +++ b/modules/installed/system/expert_mode.py @@ -15,7 +15,7 @@ class experts(FormPlugin, PagePlugin): order = 10 def help(self, *args, **kwargs): - side = _(#"""<h2>Expert Mode</h2> + side = _(#"""<strong>Expert Mode</strong> """ <p>The %(box)s can be administered in two modes, 'basic' and 'expert'. Basic mode hides a lot of features and diff --git a/modules/installed/system/system.py b/modules/installed/system/system.py index 75aa850..6f5e32a 100644 --- a/modules/installed/system/system.py +++ b/modules/installed/system/system.py @@ -18,7 +18,7 @@ class Sys(PagePlugin): def __init__(self, *args, **kwargs): PagePlugin.__init__(self, *args, **kwargs) self.register_page("sys") - self.menu = cfg.main_menu.add_item(_("%s System" % cfg.product_name), "/sys", 100) + self.menu = cfg.main_menu.add_item(_("System"), "/sys", 100) self.menu.add_item(_("Configure"), "/sys/config", 10) self.menu.add_item(_("Package Manager"), "/sys/packages", 20) self.menu.add_item(_("Users and Groups"), "/sys/users", 15) @@ -37,7 +37,7 @@ class Sys(PagePlugin): @require() def packages(self): side=_(""" -<h2>Help</h2> +<strong>Help</strong> <p>On this page, you can add or remove %s plugins to your %s.</p> <p>Plugins are just Debian packages, so Debian's usual package management features should make this job fairly easy.</p> """ % (cfg.product_name, cfg.box_name)) diff --git a/modules/installed/system/users.py b/modules/installed/system/users.py index 669183c..c4ac977 100644 --- a/modules/installed/system/users.py +++ b/modules/installed/system/users.py @@ -24,8 +24,8 @@ class add(FormPlugin, PagePlugin): order = 30 sidebar_left = '' - sidebar_right = _("""<h2>Add User</h2><p>Adding a user via this - administrative interface <b>might</b> create a system user. + sidebar_right = _("""<strong>Add User</strong><p>Adding a user via this + administrative interface <strong>might</strong> create a system user. For example, if you provide a user with ssh access, she will need a system account. If you don't know what that means, don't worry about it.</p>""") @@ -70,16 +70,16 @@ class edit(FormPlugin, PagePlugin): order = 35 sidebar_left = '' - sidebar_right = _("""<h2>Edit Users</h2><p>Click on a user's name to - go to a screen for editing that user's account.</p><h2>Delete - Users</h2><p>Check the box next to a users' names and then click + sidebar_right = _("""<strong>Edit Users</strong><p>Click on a user's name to + go to a screen for editing that user's account.</p><strong>Delete + Users</strong><p>Check the box next to a users' names and then click "Delete User" to remove users from %s and the %s system.</p><p>Deleting users is permanent!</p>""" % (cfg.product_name, cfg.box_name)) def main(self, msg=''): users = cfg.users.keys() add_form = Form(title=_("Edit or Delete User"), action="/sys/users/edit", message=msg) - add_form.html('<span class="indent"><b>Delete</b><br /></span>') + add_form.html('<span class="indent"><strong>Delete</strong><br /></span>') for uname in sorted(users.keys()): add_form.html('<span class="indent"> %s ' % add_form.get_checkbox(name=uname) + @@ -123,6 +123,6 @@ class edit(FormPlugin, PagePlugin): return self.fill_template(template="err", title=_("Unnown User"), main=main, sidebar_left=self.sidebar_left, sidebar_right=sidebar_right) - main = _("""<h2>Edit User '%s'</h2>""" % u['username']) + main = _("""<strong>Edit User '%s'</strong>""" % u['username']) sidebar_right = '' return self.fill_template(title="", main=main, sidebar_left=self.sidebar_left, sidebar_right=sidebar_right) diff --git a/modules/installed/system/wan.py b/modules/installed/system/wan.py index 52b0cf0..0817f62 100644 --- a/modules/installed/system/wan.py +++ b/modules/installed/system/wan.py @@ -22,13 +22,13 @@ class wan(FormPlugin, PagePlugin): end will be reachable from the WAN. If your %(box)s connects you to the internet, that means you'll be able to log in to the front end from the internet. This might be - convenient, but it is also <b>dangerous</b>, since it can + convenient, but it is also <strong>dangerous</strong>, since it can enable attackers to gain access to your %(box)s from the outside world. All they'll need is your username and passphrase, which they might guess or they might simply try every posible combination of letters and numbers until they get in. If you enable the WAN administration option, you - <b>must</b> use long and complex passphrases.</p> + <strong>must</strong> use long and complex passphrases.</p> <p>For security reasons, neither WAN Administration nor WAN SSH is available to the `admin` user account.</p> |