81 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
56250562d4
help: Move custom static file handling into app from central place
Tests performed:

- Print the calls to _mount_static_directory() before and after the changes.
They should print the same.

- With English as the preferred language, visit the user manual. Images should
be visible. Visit MediaWiki manual page with learn more link in MediaWiki.
Images should be visible.

- Repeat with Spanish as the preferred language.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-25 20:23:55 +02:00
Sunil Mohan Adapa
95d0923788
help: Rename views modules as 'views'
Tests performed:

- Visit help main view by visiting URL /plinth/help/.

- Visit pages: about, manual, get support, submit feedback, contribute.

- Download manual.

- Raise an exception in a view, visit the view in non-develop mode, see the
status log.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-06 13:08:08 +02:00
Sunil Mohan Adapa
fffbbe5ac7
help: Fix attribute on download manual button
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:40:52 +02:00
Sunil Mohan Adapa
a2f897e33d
*.js: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:40:43 +02:00
Sunil Mohan Adapa
e89e2b4a2a
*.html: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:39:19 +02:00
Sunil Mohan Adapa
9368504da5
*.py: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:38:55 +02:00
Sunil Mohan Adapa
b576a77c3d
app: Refactor all apps to use the Info component
- Remove the need to pass all the individual information elements to the AppView
  separately. This eliminates many issues with elements that were mistakenly not
  sent to AppView. Also reduces a lot of code duplication.

- Create App classes for power and sso for consistency.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-16 18:22:01 -05:00
Sunil Mohan Adapa
176e7ecae3
help: Refactor to move app into __init__.py for consistency
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:19 -05:00
Sunil Mohan Adapa
121c1cf4ca
help: Fix showing manual pages in fallback cases
- When a manual page for a certain language is not found, redirect to 'en' for
  that manual page. Simply showing English content will cause issues with
  serving images.

- Don't use language preferences unless the URL language is not generic. The
  language of the page shown will always correspond to the language in the URL.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:15 -04:00
Joseph Nuthalapati
eb91938963
help: Respect language preference when showing user manual
Retrieve the manual page or download PDF manual in user's preferred language.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Merge URL format since view is the same]
[sunil@medhas.org Refactor language extraction]
[sunil@medhas.org Minor refactorings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:06 -04:00
Sunil Mohan Adapa
5fbc3fc31f
help: Make download as PDF a regular button
By creating an icon for 'download as pdf', we are introducing a completely new
class of buttons into FreedomBox UI. While not being essential, this causes more
learning for the user. Further, it does not exhibit the regular behavior of a
button such as hover styling and button text.

Change the icon into a regular button that user is familiar with elsewhere. Also
add label text.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-09-07 10:51:05 +05:30
Danny Haidar
6e5791ca0c
help: Minor updates to the statements on contribute page
See https://salsa.debian.org/freedombox-team/plinth/issues/1517#note_108382

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-09-06 12:43:55 -07:00
Joseph Nuthalapati
7ec0ee3163
manual: Move PDF download link to HTML manual page
- Remove "Download Manual" card
- Create link to download manual in the header of the HTML manual

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Remove hard-coded URL for manual download]
[sunil@medhas.org Fix CSS indentation]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-09-06 11:07:04 -07:00
Sunil Mohan Adapa
b91f0fb4d0
help: Add more text to contribute page for donations
From original discussion in
https://salsa.debian.org/freedombox-team/plinth/issues/1517#note_69698

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-08-30 16:25:02 -07:00
Joseph Nuthalapati
b484dcb301
help: Add button for Contribute
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-08-30 16:24:59 -07:00
Joseph Nuthalapati
519b573e9f
help: Add button for Support
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-08-30 16:24:56 -07:00
Joseph Nuthalapati
35fb7c4e0e
help: Add button to submit feedback
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-08-30 16:24:49 -07:00
James Valleroy
a0837be410
help: Show security notice when backports are in use
Closes #1611.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil@medhas.org: Fixed incorrect HTML nesting and inline styling]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-07-26 16:51:31 -07:00
Sunil Mohan Adapa
46f162d093
app: Add unique ID to each app class
Also maintain a global list of apps

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:17:59 -04:00
Sunil Mohan Adapa
b96d901071
Introduce component architecture and menu component
- Introduce base class for all apps that will contain components. With
  unittests.

- Introduce base classes for components. With unittests.

- Turn Menu class into an app component.

  - Further cleanup Menu class.

  - Update tests.

  - Maintain a global list of menu items and look them up easily. Generalize
    such that subsubmenus can later be merged into Menu class.

  - Cleanup scope of main menu initialization.

  - Use None instead of empty strings for various values. Ensure that
    printing short_description does not show 'None' in output.

  - Use enable/disable instead of promote/demote.

- Use menu component in all apps.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-06-07 11:48:04 -07:00
Sunil Mohan Adapa
fdcbd46513
setup: Move app enabling files to respective apps
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-17 16:20:54 -04:00
Prachi Srivastava
62b4f67a2e
help: Use freedombox package instead of plinth for version
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-30 23:10:08 -08:00
Prachi Srivastava
f43e185a8c
security: Moves inline javascript to files
Signed-off-by: Prachi Srivastava <prachi.chs.2009@gmail.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-28 17:39:12 -08:00
James Valleroy
5a8873508d
help: Add action script to read logs from journal
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-28 09:56:59 -08:00
James Valleroy
27cfd4786a
help: Use journalctl to show status log
The status log file had been removed previously.

Closes #1461

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-28 09:56:51 -08:00
Sunil Mohan Adapa
7279db3f2c
ui: Fix top margin for content containers
Currently, when a message is shown at the top or in users and groups page, The
top margin is too short. Increase it to 25px from 5px. Also:

- Don't use the .thumbnail class for containers as this does not match the
  semantics. Create and use class .contain-container.

- Also create class .card-container for all container containing cards. Unused
  for now.

- Indentation fixes.

- Remove duplicated rule.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-01-18 11:46:23 +05:30
Prachi Srivastava
5d68f6bf52
Replace glyphicons with forkawesome icons
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-14 17:37:58 -08:00
Robert Martinez
966b2cb36a
Add white Card
This puts pages on white cards.
This lets the footer float underneath content instead of bottom of the page.
This should fix issues with MR !1335

Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-11-21 17:54:11 +05:30
Joseph Nuthalapati
f762f57d1c
Add turbolinks
- Load scripts in the head with `defer` instead of at the end of the body
- Disable turbolinks for application shortcuts and manual download

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-29 12:22:52 -04:00
Sunil Mohan Adapa
ee80d77be5
help: Remove the duplicate index URL and menu item
Signed-off-by: Manish Tripathy <manisht@thougtworks.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-06-18 20:23:28 +05:30
Sunil Mohan Adapa
cece5a003d
help: Center the FreedomBox logo on about page
Signed-off-by: Manish Tripathy <manisht@thougtworks.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-06-18 20:23:16 +05:30
Sunil Mohan Adapa
a596ad5f37
help: Show cards in the index page
- Need to duplicate the code from help base page.

Signed-off-by: Manish Tripathy <manisht@thougtworks.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-06-18 20:20:47 +05:30
Joseph Nuthalapati
4064d6e231
manual: Link to manual from each service
Closes #930

- Make targets to download wiki pages of each service

- Add post-processor script for DocBook file processing

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-22 19:49:14 -04:00
Sunil Mohan Adapa
a0196e9c97
Rename Plinth to FreedomBox in help about page
From Plinth to FreedomBox. Users don't need to know about 'Plinth' anymore.
Version of freedombox-setup package is now irrelevant.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:11:04 -05:00
Sunil Mohan Adapa
8f0e2d6381
Rename Plinth to FreedomBox in module doc strings
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:25 -05:00
Sunil Mohan Adapa
dea4af17fb
Rename Plinth to FreedomBox in license headers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:09 -05:00
Sunil Mohan Adapa
db2b796165
Update Github URLs with Salsa URLs
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-01-30 11:06:13 +05:30
Johannes Keyser
d41bb0ae76
help: Show menu on smaller screens also
- Fixes issue #1185.

Signed-off-by: Johannes Keyser <johanneskeyser@posteo.de>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-01-15 15:21:44 +05:30
Sunil Mohan Adapa
d15e6b22f1
help: Don't uncompress the PDF manual
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-12-18 15:27:44 +05:30
Joseph Nuthalapati
0b6006968e
manual: Download can serve either pdf or pdf.gz file
Fixes the problem where an installation might not have a gzipped version of the
manual (like the Plinth development VM for example).

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-18 15:27:26 +05:30
Joseph Nuthalapati
3bafdb3789
manual: Make manual available as a PDF download
- serving gzipped version of PDF manual
- works with the latest versions of both Firefox and Chromium
- closes #1117

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-18 15:26:33 +05:30
Prachi
c8eb714562
Separate out the short description and app name
Signed-off-by: Prachi <prachi@swecha.net>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-08-21 11:17:08 +05:30
Hemanth Kumar Veeranki
29cc95bbdb
Make help accessible for logged-in non-admin users
Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>

Reviewed-by: Johannes Keyser <johanneskeyser@posteo.de>
2017-08-11 23:54:35 +02:00
Johannes Keyser
8ae6fbbd4c
help: only show help pages if user is logged in 2017-06-07 22:22:08 -04:00
Johannes Keyser
5ee8e9397d
help: Add Debian release to about page. 2017-05-29 20:00:52 -04:00
Sunil Mohan Adapa
ee7cc98fee
apps, system: Remove modules and merge into main
- Remove apps and system modules and merge their views into main views.

- Move main_menu from cfg into menu.py.

- Remove dependencies of other modules on apps and system modules.

- Update tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-05-05 22:31:45 -04:00
James Valleroy
c7b4bb7cc8
help: Fix issues with new version indicator 2017-01-17 12:29:33 -05:00
pk13055
7fdb09abfd
help: Add indicator for new plinth version available 2017-01-17 12:11:01 -05:00
fonfon
3af82ab14e
Firstboot: minor variable renaming and cleanup 2017-01-02 15:05:20 -05:00
Sunil Mohan Adapa
037944e5fc
help: Minor updates and fixes to status log
- Refactor reading status log file.

- Fix hardcoded URL path into 500.html.

- Rename 'status logs' to 'status log' for consistency.

- Decorate the personal information warning.  Avoid <b>.

- Add heading to status log page.

- Indentation and grammer fixes.
2016-08-26 21:51:58 -04:00