.itemtree li { margin: 12px 8px; line-height: 115%; }
.itemtree li .mainline { padding-left: 8px; }
-.itemtree li .author_pub { padding-left: 8px; font-size: 90%; margin: 4px 0 4px 0; color: #111; }
+.itemtree li .author_pub { padding-left: 8px; font-size: 90%; margin: 2px 0; color: #111; }
.itemtree .metalink { padding-left: 8px; color: gray; }
.itemtree .metalink a {
font-size: 80%; color: navy;
}
-.menublock { color: #da9; font-size: 80%; }
+.menublock { color: #da9; font-size: 80%; margin: 1px 0; }
.menublock a { color: #666; padding: 0 8px; }
.menublock a:hover { color: blue; }
#-----------------------------------------------------------------------------
def welcome(request):
- return HttpResponseRedirect('browse/')
+ user = request.user
+ if user.is_authenticated() and user.sites():
+ return HttpResponseRedirect('site/') # My Sites
+ else:
+ return HttpResponseRedirect('browse/')
# MARK: propose we get rid of this. We already have a 'Sites' browser.
def open_sites(request):
<title>${title}</title>
</head>
<body>
- <h1>${title}</h1>
+ <h1>${title}</h1>
<div py:if="user.is_anonymous()">
(Note: some reserve materials may require you
to <a href="${ROOT}${settings.LOGIN_URL}?next=${ROOT}/">log in</a>)
</div>
-
-
- <div py:for="(dept, ss) in blocks">
- <h2>${dept}</h2>
- <p py:for="site in ss" style="margin-left: 16px;">
- <a href="${site.site_url()}">${site}</a>
+
+ <img py:def="lock(condition=True)"
+ py:if="condition"
+ src="${ROOT}/static/tango/lock.png"
+ alt="lock" title="This resource is access-controlled."/>
+
+ <div py:for="(dept, ss) in blocks">
+ <h2>${dept}</h2>
+ <div py:for="site in ss">
+ <span py:if="not site.is_open_to(request.user)" style="float: left;">
+ ${lock()}
+ </span>
+ <p style="margin-left: 26px;">
+
+ <a href="${site.site_url()}">${site}</a>
</p>
-
- </div>
-
+ </div>
+ </div>
<div class="gap"/>
</body>
</html>
<div id="welcome" py:if="not user.is_authenticated()">
<strong style="padding-right: 18px;">Welcome!</strong>
<a class="loginbutton" href="${ROOT}${settings.LOGIN_URL}">Log In</a>
- • <a href="${ROOT}/prefs/">Preferences</a>
+ <span py:if="settings.USE_I18N">
+ • <a href="${ROOT}/prefs/">Preferences</a>
+ </span>
</div>
</div>
<xi:include py:if="user.is_authenticated()" href="tabbar.xhtml"/>
</head>
<body>
<h1>${title}</h1>
+<div py:if="settings.USE_I18N">
<h2>Preferred Language</h2>
<form action="../i18n/setlang/" method="post">
<input name="next" type="hidden" value="${ROOT}/" />
value="${code}">${_(descr)}</option>
</select> <input type="submit" value="Change" />
</form>
+</div>
<div py:if="user.is_authenticated()">
<h2>Notification preferences</h2>
<form action="." method="POST">