Skip to content

Commit

Permalink
Update the magical unicorn frontend (there is a "design" now\!
Browse files Browse the repository at this point in the history
  • Loading branch information
holdenk committed Feb 25, 2013
1 parent aa36fa1 commit bcefbd6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
6 changes: 6 additions & 0 deletions frontend/unicorn/templates/index.html
Expand Up @@ -5,7 +5,13 @@
<body> <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> <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> <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> 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> <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> </body>
</html> </html>
7 changes: 6 additions & 1 deletion frontend/unicorn/templates/review.html
Expand Up @@ -7,18 +7,23 @@
<body> <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> <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> <center><img src="/staticz/unicorn.png"></center><br>
<div align="left"
<form name="input" action="review" method="post"> <form name="input" action="review" method="post">
{% if newpatch %} {% if newpatch %}
Welcome {{ghusername}}! What do you think of the following review:<br/> Welcome {{ghusername}}! What do you think of the following review:<br/>
<input type="hidden" value="{{id}}" name="id"> <input type="hidden" value="{{id}}" name="id">
<a href="{{reviewlink}}" target="_blank">{{reviewlink}}</a><br/> <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/> --> <!-- <iframe src="{{reviewlink}}" width="100%" height="75%"></iframe><br/> -->
<input type="submit" value="Yes" name="approve"><input type="submit" value="No" name="approve"><br/> <input type="submit" value="Yes" name="approve"><input type="submit" value="No" name="approve"><br/>
{% else %} {% else %}
We have run out of patches to have reviewed! Thanks so much! (and or the server is down in which case oops) We have run out of patches to have reviewed! Thanks so much! (and or the server is down in which case oops)
{% endif %} {% endif %}
</form> </form>
</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> </body>
</html> </html>
18 changes: 9 additions & 9 deletions frontend/unicorn/verify/views.py
Expand Up @@ -32,15 +32,15 @@ def review(request):
patch = None patch = None
reviewlink = None reviewlink = None
id = None id = None
try: #try:
newpatch = True 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 = 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.username = githubusername
patch.touched_time = datetime.now() patch.touched_time = datetime.now()
reviewlink = patch.diff_url reviewlink = patch.diff_url
id = patch.id id = patch.id
except Exception, err: #except Exception, err:
newpatch = False # newpatch = False
c = Context({'ghusername' : githubusername, 'patch': patch, 'newpatch': newpatch, 'reviewlink': reviewlink, 'id': id}) c = Context({'ghusername' : githubusername, 'patch': patch, 'newpatch': newpatch, 'reviewlink': reviewlink, 'id': id})
return HttpResponse(t.render(c)) return HttpResponse(t.render(c))


Expand Down

0 comments on commit bcefbd6

Please sign in to comment.