SF.net SVN: morphix: [2597] trunk/morphixlivekiosk/scripts/mbuild
[email protected] Sun, 18 Nov 2007 15:15:48 -0800
| Newsgroups | gmane.linux.morphix.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 2597
http://morphix.svn.sourceforge.net/morphix/?rev=2597&view=rev
Author: bmsleight
Date: 2007-11-18 15:15:47 -0800 (Sun, 18 Nov 2007)
Log Message:
-----------
mbuild almost ready to go live
Modified Paths:
--------------
trunk/morphixlivekiosk/scripts/mbuild/media/style.css
trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html
trunk/morphixlivekiosk/scripts/mbuild/urls.py
trunk/morphixlivekiosk/scripts/mbuild/web/models.py
trunk/morphixlivekiosk/scripts/mbuild/web/views.py
Added Paths:
-----------
trunk/morphixlivekiosk/scripts/mbuild/templates/comments.html
trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html
trunk/morphixlivekiosk/scripts/mbuild/templates/view-blog.html
trunk/morphixlivekiosk/scripts/mbuild/templates/view-comments.html
Modified: trunk/morphixlivekiosk/scripts/mbuild/media/style.css
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/media/style.css 2007-11-13 18:55:31 UTC (rev 2596)
+++ trunk/morphixlivekiosk/scripts/mbuild/media/style.css 2007-11-18 23:15:47 UTC (rev 2597)
@@ -61,108 +61,31 @@
a:active { color:#480000 } /* when link is clicked */
a:hover { color:#780000 } /* when mouse is over link */
-/*- Menu Tabs--------------------------- */
+#bblack {
+ background:#000000;
+}
- #tabs {
- float:left;
- width:100%;
- font-size:93%;
- line-height:normal;
- }
- #tabs ul {
- margin:0;
- padding:10px 10px 0 50px;
- list-style:none;
- }
- #tabs li {
- display:inline;
- margin:0;
- padding:0;
- }
- #tabs a {
- float:left;
- background:url("tableft.gif") no-repeat left top;
- margin:0;
- padding:0 0 0 4px;
- text-decoration:none;
- }
- #tabs a span {
- float:left;
- display:block;
- background:url("tabright.gif") no-repeat right top;
- padding:5px 15px 4px 6px;
- color:#666;
- }
- /* Commented Backslash Hack hides rule from IE5-Mac \*/
- #tabs a span {float:none;}
- /* End IE5-Mac hack */
- #tabs a:hover span {
- color:#FF9834;
- }
- #tabs a:hover {
- background-position:0% -42px;
- }
- #tabs a:hover span {
- background-position:100% -42px;
- }
+.hbuttons a{
+display: block;
+text-decoration: none;
+font-size: 75%;
+color: #CC0000;
+background: #000000;
+float: centre;
+display: inline;
+margin-right: 2px;
+margin-left: 2px;
+text-align:center;
+border-left:1px solid #CC0000;
+border-right:1px solid #CC0000;
+}
-/*- Menu Tabs E--------------------------- */
+.hbuttons a:hover {background-color: #FFFFFF;
+color: #780000;
+text-decoration: none;}
- #tabsE {
- float:left;
- width:100%;
- background:#000;
- font-size:93%;
- line-height:normal;
- }
- #tabsE ul {
- margin:0;
- padding:10px 10px 0 50px;
- list-style:none;
- }
- #tabsE li {
- display:inline;
- margin:0;
- padding:0;
- }
- #tabsE a {
- float:left;
- background:url("tableftE.gif") no-repeat left top;
- margin:0;
- padding:0 0 0 4px;
- text-decoration:none;
- }
- #tabsE a span {
- float:left;
- display:block;
- background:url("tabrightE.gif") no-repeat right top;
- padding:5px 15px 4px 6px;
- color:#FFF;
- }
- /* Commented Backslash Hack hides rule from IE5-Mac \*/
- #tabsE a span {float:none;}
- /* End IE5-Mac hack */
- #tabsE a:hover span {
- color:#FFF;
- }
- #tabsE a:hover {
- background-position:0% -42px;
- }
- #tabsE a:hover span {
- background-position:100% -42px;
- }
-
-/* Images */
-/*img {
-/* display: block;*/
-/* margin-left: auto; */
-/* margin-right: auto */
- }
-
-
-
label,input {
font:11px/20px verdana, arial, helvetica, sans-serif;
}
Added: trunk/morphixlivekiosk/scripts/mbuild/templates/comments.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/comments.html (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/comments.html 2007-11-18 23:15:47 UTC (rev 2597)
@@ -0,0 +1,11 @@
+{% extends "html-master.html" %}
+
+{% block content %}
+
+<p>Please feel free to leave comments about mbuild</p>
+<form enctype="multipart/form-data" method="post" action=".">
+ {{ form.as_p }}
+ <p><input type="submit" value="Notify →"></p>
+</form>
+<p>Spam will be deleted - it not worth the touble</p>
+{% endblock %}
\ No newline at end of file
Modified: trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html 2007-11-13 18:55:31 UTC (rev 2596)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/html-master.html 2007-11-18 23:15:47 UTC (rev 2597)
@@ -6,19 +6,17 @@
<title>Custom Kiosk LiveCD</title>
</head>
<h1><img src="/img/logo.gif" id="logo" alt="mbuild.livecd.net logo" > Build Kiosks - on the web for the web.</h1>
-<div id="tabsE">
- <ul>
- <li><a href="/" title="about"><span>mbuild</span></a></li>
- <li><a href="/kiosks//2007-11-11--22-07_MorphixLiveKiosk.iso" title="Download MorphixLiveKiosk"><span>Download MorphixLiveKiosk</span></a></li>
- <li><a href="/view-queue/" title="View Build Queue"><span>View Build Queue</span></a></li>
- <li><a href="/start/" title="Start a New Build"><span>Start a New Build</span></a></li>
- <li><a href="/" title="Leave Comments"><span>Leave Comments</span></a></li>
- <li><a href="/" title="mbuilder.blog"><span>mbuild.blog</span></a></li>
- </ul>
+<div id="bblack">
+ <div class="hbuttons">
+ <a href="/" title="about">mbuild</a></li>
+ <a href="/kiosks//2007-11-11--22-07_MorphixLiveKiosk.iso" title="Download MorphixLiveKiosk">Download MorphixLiveKiosk</a>
+ <a href="/view-queue/" title="View Build Queue">View Build Queue</a>
+ <a href="/start/" title="Start a New Build">Start a New Build</a>
+ <a href="/comments/" title="Leave Comments">Comments</a>
+ <a href="/blog/" title="mbuilder.blog">mbuild.blog</a>
+ </div>
</div>
-<br /><br />
-
-
+</body>
<div id="body">
{% block content %}{% endblock %}
</div>
Added: trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/leave-comments.html 2007-11-18 23:15:47 UTC (rev 2597)
@@ -0,0 +1,11 @@
+{% extends "html-master.html" %}
+
+{% block content %}
+<h2>mbuild - Comments</h2>
+<p>Please feel free to leave comments about mbuild</p>
+<form enctype="multipart/form-data" method="post" action=".">
+ {{ form.as_p }}
+ <p><input type="submit" value="Notify →"></p>
+</form>
+<p>Spam will be deleted - it not worth the touble</p>
+{% endblock %}
\ No newline at end of file
Added: trunk/morphixlivekiosk/scripts/mbuild/templates/view-blog.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/view-blog.html (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/view-blog.html 2007-11-18 23:15:47 UTC (rev 2597)
@@ -0,0 +1,11 @@
+{% extends "html-master.html" %}
+
+{% block content %}
+<h2>mbuild weblog</h2>
+{% if blog_list %}
+ {% for blog in blog_list %}
+ <p><u>{{blog.title}} on the {{blog.pub_date}}</u><br /> {{blog.body}} </p>
+ <p> </p>
+ {% endfor %}
+{% endif %}
+{% endblock %}
Added: trunk/morphixlivekiosk/scripts/mbuild/templates/view-comments.html
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/templates/view-comments.html (rev 0)
+++ trunk/morphixlivekiosk/scripts/mbuild/templates/view-comments.html 2007-11-18 23:15:47 UTC (rev 2597)
@@ -0,0 +1,12 @@
+{% extends "html-master.html" %}
+
+{% block content %}
+<p>Below is a listing of the comments received about mbuild.
+{% if comments_list %}
+ {% for comment in comments_list %}
+ <p><u>{{comment.whom}} on the {{comment.pub_date}}</u><br />Wrote: <br /> {{comment.body}} </p>
+ <p> </p>
+ {% endfor %}
+{% endif %}
+<p><a href=/comments/leave/>What to leave a comment ?</a></p>
+{% endblock %}
Modified: trunk/morphixlivekiosk/scripts/mbuild/urls.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-13 18:55:31 UTC (rev 2596)
+++ trunk/morphixlivekiosk/scripts/mbuild/urls.py 2007-11-18 23:15:47 UTC (rev 2597)
@@ -11,6 +11,9 @@
(r'^kabt-queue/', 'mbuild.web.views.kabtqueue'),
(r'^delete-queue/', 'mbuild.web.views.delall'),
(r'^credits/', 'mbuild.web.views.credits'),
+ (r'^comments/leave/', 'mbuild.web.views.leavecomments'),
+ (r'^comments/', 'mbuild.web.views.viewcomments'),
+ (r'^blog/', 'mbuild.web.views.viewblog'),
# Uncomment this for admin:
(r'^admin/', include('django.contrib.admin.urls')),
Modified: trunk/morphixlivekiosk/scripts/mbuild/web/models.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-13 18:55:31 UTC (rev 2596)
+++ trunk/morphixlivekiosk/scripts/mbuild/web/models.py 2007-11-18 23:15:47 UTC (rev 2597)
@@ -19,6 +19,23 @@
builtogg = models.CharField(maxlength="150")
builtjpg = models.CharField(maxlength="150")
oktobuild = models.BooleanField(default=False)
-
class Admin:
- pass
\ No newline at end of file
+ pass
+
+
+class Blog(models.Model):
+ title = models.CharField(maxlength=200)
+ pub_date = models.DateTimeField('Date published')
+ body = models.TextField()
+ class Admin:
+ pass
+
+
+class Comments(models.Model):
+ whom = models.CharField(maxlength=200)
+ pub_date = models.DateTimeField('Date published')
+ body = models.TextField()
+ class Admin:
+ pass
+
+
Modified: trunk/morphixlivekiosk/scripts/mbuild/web/views.py
===================================================================
--- trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-13 18:55:31 UTC (rev 2596)
+++ trunk/morphixlivekiosk/scripts/mbuild/web/views.py 2007-11-18 23:15:47 UTC (rev 2597)
@@ -4,6 +4,8 @@
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from mbuild.web.models import Queue
+from mbuild.web.models import Comments
+from mbuild.web.models import Blog
from django.core.mail import EmailMessage
from django.template import loader, Context
@@ -168,8 +170,29 @@
#Yes I know Jure - I shoudl use flatpages - I will try to move to flatpages....
return render_to_response('credits.html')
-
def delall(request):
# Will disable when running live
Queue.objects.all().delete()
return HttpResponse("The Elves have deleted the whole queue.")
+
+def viewcomments(request):
+ comments_list = Comments.objects.all()
+ return render_to_response('view-comments.html', {'comments_list': comments_list})
+
+def leavecomments(request):
+ class BuildForm(forms.Form):
+ whom = forms.CharField(max_length=200, required=True, label="Name of Person Leaving Comments:")
+ body = forms.CharField(widget=forms.Textarea)
+ if request.POST:
+ comments = Comments(whom=request.POST["whom"], pub_date=datetime.datetime.today(), body=request.POST["body"])
+ comments.save()
+ return HttpResponseRedirect("/comments/" )
+ else:
+ form = BuildForm()
+ context = {'form': form}
+ return render_to_response('leave-comments.html', context,
+ context_instance=RequestContext(request))
+
+def viewblog(request):
+ blog_list = Blog.objects.all().order_by('-pub_date')[:5]
+ return render_to_response('view-blog.html', {'blog_list': blog_list})
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/