Conversation
…club-logo' on line 19 of master.xhtml.
…e not configured show up
|
|
||
| <head py:block="head" py:strip="True"> | ||
| <title>Mines ACM - Mailing List Archives</title> | ||
| <title>${tg.config.get('short_site_name', 'not configured')} - Mailing List Archives</title> |
There was a problem hiding this comment.
Default value should be in config/app_config.py and have a default of "Mozzarella".
| <html py:extends="master.xhtml" py:strip="True"> | ||
| <head py:block="head" py:strip="True"> | ||
| <title>Mines ACM - Contact</title> | ||
| <title>${tg.config.get('short_site_name', 'not configured')} - Contact</title> |
| <html py:extends="master.xhtml" py:strip="True"> | ||
| <head py:block="head" py:strip="True"> | ||
| <title>Mines ACM - Error</title> | ||
| <title>${tg.config.get('short_site_name', 'not configured')} - Error</title> |
| <py:extends href="master.xhtml" /> | ||
| <head py:block="head" py:strip="True"> | ||
| <title>Mines ACM</title> | ||
| <title>${tg.config.get('short_site_name', 'not configured')}</title> |
| <div class="col-md-5"> | ||
| <div class="intro-block"> | ||
| <h2>Mines ACM Student Chapter</h2> | ||
| <h2>${tg.config.get('site_name', 'not configured')}</h2> |
| <div class="panel panel-default"> | ||
| <div class="panel-heading"> | ||
| <h3 class="panel-title">Join our ACM Chapter!</h3> | ||
| <h3 class="panel-title">Join our ${tg.config.get('site_name', 'not configured')}!</h3> |
|
|
||
| <head py:block="head" py:strip="True"> | ||
| <title>Mines ACM - Survey ${survey_id} Responses</title> | ||
| <title>${tg.config.get('short_site_name', 'not configured')} - Survey ${survey_id} Responses</title> |
|
|
||
| # Set site name and short site name | ||
| #site_name = | ||
| #short_site_name = |
There was a problem hiding this comment.
use a key like site.name and site.short_name.
It is not clear what the purpose of name vs short name is. Please document or just use one.
Also, document the behavior when only one is specified.
| meetings.icalendar.prodid = -//Mines ACM//web//EN | ||
|
|
||
| # Custom Assets Configuration | ||
| custom_assets.dir = /home/lpetty/mozzarella/assets |
There was a problem hiding this comment.
should be commented out by default, as this directory definately wont exist for anyone but you.
| Static Assets | ||
| ~~~~~~~~~~~~~ | ||
|
|
||
| The location of site-specific assets for development can be configured in ``development.ini``: |
There was a problem hiding this comment.
The site configuration might not be named development.ini.
| <div class="header-logo"> | ||
| <a href="${tg.url('/')}"> | ||
| <img src="${tg.url('/img/full.svg')}" alt="Mines ACM" class="acm-logo" /> | ||
| <img src="${tg.url(tg.config.get('custom_assets.logo'))}" alt="Club Logo" class="club-logo" /> |
There was a problem hiding this comment.
What's the default when no logo was specified? Can the site name be inserted instead?
|
Should be up to par now |
| meetings.icalendar.prodid = -//Mines ACM//web//EN | ||
|
|
||
| # Custom Assets Configuration | ||
| custom_assets.dir = / |
There was a problem hiding this comment.
It's a VERY bad idea to set the root of the filesystem as the custom assets dir, I would not reccomend this in the sample development.ini.
Try visiting /etc/passwd
There was a problem hiding this comment.
Just use site.custom_assets for this name
| debug = true | ||
|
|
||
| # Site name configuration | ||
| #site.name = CSM Mozzarella |
| # Custom Assets Configuration | ||
| custom_assets.dir = / | ||
| custom_assets.css = custom.css | ||
| custom_assets.logo = custom.png |
There was a problem hiding this comment.
I think it's a good idea to just have the paths be equivalent to the logos under public, rather than configuring the file name. This allows the sysadmin the guaruntee that the only overridden assets will have the same paths as the public directory.
So these keys should not be necessary.
| <div class="header-logo"> | ||
| <a href="${tg.url('/')}"> | ||
| <img src="${tg.url('/img/full.svg')}" alt="Mines ACM" class="acm-logo" /> | ||
| <img src="${tg.url(tg.config.get('custom_assets.logo', 'logo.jpg'))}" alt="${tg.config.get('site.name')}" class="club-logo" /> |
There was a problem hiding this comment.
See below comments, this will need changed.
There was a problem hiding this comment.
Just use the CSS class "logo". Also make sure to change the css class if you adjust this. BOTH sides need adjusted.
…emoved the configuration for css and logo.
Links to pages on the wiki should substitute spaces for %20 or the docutils publisher will strip the spaces and make the link invalid.
seems to align better
|
Now includes changes per #25, minus access control for certain pages and a web-based editor |
jackrosenthal
left a comment
There was a problem hiding this comment.
Overall looks good. The wiki controller needs converted to OO style Page and Pages controllers. I can do if you do not have time.
I will also pull and test soon ... On mobile now.
|
|
||
| def _init_wiki_repo(self): | ||
| self.repo = init_repository(tg.config.get('wiki.repo'), True) | ||
| signature = Signature("Example McPersonson", "emailuser@emailsite.tld") #TODO: Replace me |
There was a problem hiding this comment.
Explain what - the TODO?
If so - I just mean that this Signature can be replaced if need be, though it is only used for the inital commit. Presumably page commits using the web editor (once implemented) will pull signature details from the logged in profile.
| try: | ||
| repo_path = tg.config.get('wiki.repo') | ||
| if not repo_path: | ||
| tg.abort(400, "Wiki not enabled") |
| from docutils.core import publish_parts | ||
|
|
||
| import os | ||
| import tg |
There was a problem hiding this comment.
Import modules before from import
| return dict(pagename=pagename, parts=document) | ||
|
|
||
| @expose('acmwebsite.templates.wiki_history') | ||
| def history(self, pagename): |
There was a problem hiding this comment.
Can we do in OO-manner like user profile controller?
There was a problem hiding this comment.
See f30995d - I attempted to follow the style of the user controller but it still seems a little dirty to me. Let me know what you think.
I moved the repo check/initialization logic from WikiController to WikiPagesController, but I had to change _before to init as it seems WikiPagesController wasn't calling _before like WikiController did.
| <div class="container"> | ||
| <div class="header-logo"> | ||
| <a href="${tg.url('/')}"> | ||
| <img src="${tg.url('/img/full.svg')}" alt="Mines ACM" class="acm-logo" /> |
There was a problem hiding this comment.
Careful ... Was css class adjusted as well?
There was a problem hiding this comment.
Changed acm-logo to logo in style.css
| </py:def> | ||
|
|
||
|
|
||
| <h1 class="page-header">History: <a href="${tg.url('/wiki/%s' % page)}">$page</a></h1> |
There was a problem hiding this comment.
Do not use oldstyle string formatting
| <nav class="navbar navbar-default"> | ||
| <ul class="nav navbar-nav"> | ||
| <li class="nav-item"> | ||
| <a class="nav-link" href="${tg.url('/wiki/history/%s' % pagename)}">History</a> |
There was a problem hiding this comment.
Old style string formatting
There was a problem hiding this comment.
How would you recommend formatting these URLs instead? I tried just doing '/wiki/history/$pagename' put that seemed to mangle the URL pretty bad.
There was a problem hiding this comment.
This is now fixed - wiki pages now follow the example from other controllers of using '[url]/{}'.format(var)
|
|
||
| .. FIXME this still resolves to a local url | ||
| .. _reStructuredText format: <http://docutils.sourceforge.net/rst.html> | ||
|
|
There was a problem hiding this comment.
Is this FIXME resolved?
|
Programming for field session actually ended this past Friday, but I'm willing to see this PR through. |
…k on wiki FrontPage fixed
|
Seems like page history is now at /wiki/[pagename]/history |
Requested changes implemented in Field_Session
Changes: