Permalink
Browse files

Update the magical unicorn frontend (there is a "design" now\!

  • Loading branch information...
1 parent aa36fa1 commit bcefbd6caa01e963f88075983731c42472dd8c38 @holdenk committed Feb 25, 2013
@@ -5,7 +5,13 @@
<body>
<a href="https://github.com/holdenk"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<center><img src="/staticz/unicorn.png"></center><br>
+<div style="float: left;">
Welcome to Holden's Magical Unicorn's Review Board, here you can review pull requests generated by <a href="https://github.com/holdenk/holdensmagicalunicorn">the magical unicorn</a>. Get started <a href="/review">here!</a><br>
+<a class="twitter-timeline" href="https://twitter.com/HoldensUnicorn" data-widget-id="305251515868774402">Tweets by @HoldensUnicorn</a>
+<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+</div>
+<div style="float: right;">
<iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=demonmoo-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B004CRYE2C" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
+</div>
</body>
</html>
@@ -7,18 +7,23 @@
<body>
<a href="https://github.com/holdenk"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<center><img src="/staticz/unicorn.png"></center><br>
+<div align="left"
<form name="input" action="review" method="post">
{% if newpatch %}
Welcome {{ghusername}}! What do you think of the following review:<br/>
<input type="hidden" value="{{id}}" name="id">
<a href="{{reviewlink}}" target="_blank">{{reviewlink}}</a><br/>
-<!-- Since we don't run SSL we can't ninja the https review links :( -->
+<!-- Since github sets X-Frame-Options: deny we can't use it :( -->
<!-- <iframe src="{{reviewlink}}" width="100%" height="75%"></iframe><br/> -->
<input type="submit" value="Yes" name="approve"><input type="submit" value="No" name="approve"><br/>
{% else %}
We have run out of patches to have reviewed! Thanks so much! (and or the server is down in which case oops)
{% endif %}
</form>
</form>
+</div>
+<div align="right">
+<iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=demonmoo-20&o=1&p=8&l=as4&m=amazon&f=ifr&ref=ss_til&asins=B004CRYE2C" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
+</div>
</body>
</html>
@@ -32,15 +32,15 @@ def review(request):
patch = None
reviewlink = None
id = None
- try:
- newpatch = True
- patch = PatchInfo.objects.get(Q(examined=False), Q(reviewer_username = '') | Q(reviewer_username = githubusername) | Q(touched_time__lte=date.today() - timedelta(2)))[0]
- patch.username = githubusername
- patch.touched_time = datetime.now()
- reviewlink = patch.diff_url
- id = patch.id
- except Exception, err:
- newpatch = False
+ #try:
+ newpatch = True
+ patch = PatchInfo.objects.filter(Q(examined=False), Q(reviewer_username = '') | Q(reviewer_username = githubusername) | Q(touched_time__lte=date.today() - timedelta(2)))[0]
+ patch.username = githubusername
+ patch.touched_time = datetime.now()
+ reviewlink = patch.diff_url
+ id = patch.id
+ #except Exception, err:
+ # newpatch = False
c = Context({'ghusername' : githubusername, 'patch': patch, 'newpatch': newpatch, 'reviewlink': reviewlink, 'id': id})
return HttpResponse(t.render(c))

0 comments on commit bcefbd6

Please sign in to comment.