Skip to content

Commit

Permalink
Merge branch 'interlegis-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
rougeth committed May 15, 2014
2 parents b099364 + 85c1bb2 commit 0524f48
Show file tree
Hide file tree
Showing 16 changed files with 531 additions and 6 deletions.
5 changes: 5 additions & 0 deletions puppet/modules/colab/manifests/cronjobs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,9 @@
# ],
#}

cron { 'cleanup-snippets':
command => "$manage_colab cleanup_snippets &> /dev/null",
hour => '1',
}

}
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ transliterate==1.5
# Diazo
#diazo
git+https://github.com/plone/diazo@44ca0da7de5a7ee5d4085c7344701b9cfecfb419

# Dpaste
git+https://github.com/interlegis/dpaste
1 change: 1 addition & 0 deletions src/accounts/templates/accounts/user_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{% load i18n gravatar i18n_model %}

{% block title %}Perfil{% endblock %}

{% block head_js %}
{% trans "Messages" as group_collabs %}
Expand Down
14 changes: 14 additions & 0 deletions src/colab/custom_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
'haystack',
'hitcounter',
'i18n_model',
'mptt',
'dpaste',

# Own apps
'super_archives',
Expand Down Expand Up @@ -303,6 +305,18 @@
TASTYPIE_DEFAULT_FORMATS = ['json', ]


# Dpaste settings
DPASTE_EXPIRE_CHOICES = (
('onetime', _(u'One Time Snippet')),
(3600, _(u'In one hour')),
(3600 * 24 * 7, _(u'In one week')),
(3600 * 24 * 30, _(u'In one month')),
('never', _(u'Never')),
)
DPASTE_EXPIRE_DEFAULT = DPASTE_EXPIRE_CHOICES[4][0]
DPASTE_DEFAULT_GIST_DESCRIPTION = 'Gist created on Colab Interlegis'
DPASTE_DEFAULT_GIST_NAME = 'colab_paste'

try:
from local_settings import *
except ImportError:
Expand Down
4 changes: 3 additions & 1 deletion src/colab/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
url(r'^signup/', include('accounts.urls')), # (same here) TODO: move to nginx
url(r'^account/', include('accounts.urls')),

url(r'', include('django_browserid.urls')),

url(r'^planet/', include('feedzilla.urls')),

url(r'', include('django_browserid.urls')),
url(r'paste/', include('dpaste.urls.dpaste')),

# Uncomment the next line to enable the admin:
url(r'^colab/admin/', include(admin.site.urls)),
Expand Down
9 changes: 6 additions & 3 deletions src/home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@ def index(request):
if count_types is None:
count_types = OrderedDict()
for type in ['thread', 'changeset', 'attachment']:
count_types[trans(type)] = SearchQuerySet().filter(
count_types[type] = SearchQuerySet().filter(
type=type,
).count()

count_types[trans('ticket')] = sum([
count_types['ticket'] = sum([
ticket.count for ticket in TicketCollabCount.objects.all()
])

count_types[trans('wiki')] = sum([
count_types['wiki'] = sum([
wiki.count for wiki in WikiCollabCount.objects.all()
])
cache.set('home_chart', count_types)

for key in count_types.keys():
count_types[trans(key)] = count_types.pop(key)

context = {
'hottest_threads': hottest_threads[:6],
'latest_threads': latest_threads,
Expand Down
2 changes: 2 additions & 0 deletions src/planet/templates/feedzilla/base.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends 'base.html' %}
{% load i18n feedzilla_tags %}

{% block title %}Blogs{% endblock %}

{% block main-content %}
<h2>{% trans 'Community Blogs' %}</h2>
<hr/>
Expand Down
212 changes: 212 additions & 0 deletions src/static/dpaste/css/theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@

.shortcut {
color: #AAA;
font-size: 13px;
font-weight: 300;
margin-left: 15px;
}

.form-horizontal .form-group {
margin: 0 0 20px 0;
}

#id_content{
width: 100%;
font-family: monospace;
font-size: 14px;
line-height: 16px;
}

/* ----------------------------------------------------------------------------
Snippet Details
---------------------------------------------------------------------------- */
#snippet-diff {
display: none;
}
.snippet-options{
margin-bottom: 20px;
}

.snippet-reply {
margin-top: 30px;
}

.snippet-reply-hidden {
opacity: 0.3;
}

.snippet-reply-hidden,
.snippet-reply-hidden *{
cursor: pointer;
}

.snippet-diff-form {
}

.snippet-rendered {
color: #666;
font-size: 16px;
line-height: 24px;
max-width: 620px;
font-family: Helvetica, FreeSerif, serif;
font-weight: 300;
}
.diff-form {
/* margin-bottom: 10px;*/
}

#diff {
margin-bottom: 10px;
/* display: none;*/
}

.tree{
width: 100%;
line-height: 1.8em;
}

.tree ul,
.tree ul li{
margin: 0;
padding: 0;
list-style: none;
}

.tree ul li{
color: #ccc;
clear: both;
}

.tree ul li div{
border-bottom: 1px solid #EEE;
}

.tree strong{
color: #111;
font-weight: normal;
}

.tree ul li li{
padding-left: 0;
margin-left: 15px;
color: #ccc;
list-style: circle;
}

/* ----------------------------------------------------------------------------
.code
---------------------------------------------------------------------------- */

.code {
width: 100%;
background: #232829;
color: #f8f8f2;
padding: 20px 30px !important;
border-radius: 0;
padding: 20px 30px;
font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
}

.code.wordwrap {
overflow: auto;
white-space: nowrap;
}

.code ol {
margin: 0 0 0 45px;
}

.code ol li {
color: #aaa;
font-size: 12px;
line-height: 21px;
cursor: pointer;
padding-left: 5px;
}

.code ol li.marked {
color: #f4e009;
background-color: #4f4800;
margin-right: -30px;
padding-right: 30px;
}

/* ----------------------------------------------------------------------------
Pygments
---------------------------------------------------------------------------- */

.code .gd { color: #FF494F; display: block; }
.code .gi { color: #53C64A; display: block; }

.code .hll { background-color: #49483e }
.code .c { color: #75715e } /* Comment */
.code .err { color: #960050; background-color: #1e0010 } /* Error */
.code .k { color: #66d9ef } /* Keyword */
.code .l { color: #ae81ff } /* Literal */
.code .n { color: #f8f8f2 } /* Name */
.code .o { color: #f92672 } /* Operator */
.code .p { color: #f8f8f2 } /* Punctuation */
.code .cm { color: #75715e } /* Comment.Multiline */
.code .cp { color: #75715e } /* Comment..codeproc */
.code .c1 { color: #75715e } /* Comment.Single */
.code .cs { color: #75715e } /* Comment.Special */
.code .ge { font-style: italic } /* Generic.Emph */
.code .gs { font-weight: bold } /* Generic.Strong */
.code .kc { color: #66d9ef } /* Keyword.Constant */
.code .kd { color: #66d9ef } /* Keyword.Declaration */
.code .kn { color: #f92672 } /* Keyword.Namespace */
.code .kp { color: #66d9ef } /* Keyword.Pseudo */
.code .kr { color: #66d9ef } /* Keyword.Reserved */
.code .kt { color: #66d9ef } /* Keyword.Type */
.code .ld { color: #e6db74 } /* Literal.Date */
.code .m { color: #ae81ff } /* Literal.Number */
.code .s { color: #e6db74 } /* Literal.String */
.code .na { color: #a6e22e } /* Name.Attribute */
.code .nb { color: #f8f8f2 } /* Name.Builtin */
.code .nc { color: #a6e22e } /* Name.Class */
.code .no { color: #66d9ef } /* Name.Constant */
.code .nd { color: #a6e22e } /* Name.Decorator */
.code .ni { color: #f8f8f2 } /* Name.Entity */
.code .ne { color: #a6e22e } /* Name.Exception */
.code .nf { color: #a6e22e } /* Name.Function */
.code .nl { color: #f8f8f2 } /* Name.Label */
.code .nn { color: #f8f8f2 } /* Name.Namespace */
.code .nx { color: #a6e22e } /* Name.Other */
.code .py { color: #f8f8f2 } /* Name.Property */
.code .nt { color: #f92672 } /* Name.Tag */
.code .nv { color: #f8f8f2 } /* Name.Variable */
.code .ow { color: #f92672 } /* Operator.Word */
.code .w { color: #f8f8f2 } /* Text.Whitespace */
.code .mf { color: #ae81ff } /* Literal.Number.Float */
.code .mh { color: #ae81ff } /* Literal.Number.Hex */
.code .mi { color: #ae81ff } /* Literal.Number.Integer */
.code .mo { color: #ae81ff } /* Literal.Number.Oct */
.code .sb { color: #e6db74 } /* Literal.String.Backtick */
.code .sc { color: #e6db74 } /* Literal.String.Char */
.code .sd { color: #e6db74 } /* Literal.String.Doc */
.code .s2 { color: #e6db74 } /* Literal.String.Double */
.code .se { color: #ae81ff } /* Literal.String.Escape */
.code .sh { color: #e6db74 } /* Literal.String.Heredoc */
.code .si { color: #e6db74 } /* Literal.String.Interpol */
.code .sx { color: #e6db74 } /* Literal.String.Other */
.code .sr { color: #e6db74 } /* Literal.String.Regex */
.code .s1 { color: #e6db74 } /* Literal.String.Single */
.code .ss { color: #e6db74 } /* Literal.String.Symbol */
.code .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.code .vc { color: #f8f8f2 } /* Name.Variable.Class */
.code .vg { color: #f8f8f2 } /* Name.Variable.Global */
.code .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.code .il { color: #ae81ff } /* Literal.Number.Integer.Long */


/* ----------------------------------------------------------------------------
Mobile
---------------------------------------------------------------------------- */

@media (max-width: 580px) {
.form-options-expire {
float: left;
clear: left;
margin-top: 10px;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends 'base.html' %}
{% load i18n %}

{% block title %}{% trans 'Groups'|title %}{% endblock %}

{% block main-content %}
<h2>{% trans 'Groups'|title %}</h2>
<hr/>
Expand All @@ -9,7 +11,7 @@ <h2>{% trans 'Groups'|title %}</h2>
{% if latest or most_relevant %}
<h3 class="text-center"><b>{{ listname|title }} {% if description %} ({{ description }}){% endif %}</b></h3>
<hr/>

<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<h4>{% trans 'latest'|title %}</h4>
Expand Down
4 changes: 3 additions & 1 deletion src/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% endif %}
{% endblock %}

<title>Colab - {% block title %}Colab{% endblock %}</title>
<title>{% block title %}Colab{% endblock %} - Colab</title>

<link rel="shortcut icon" type="image/x-icon" href="{{ STATIC_URL }}img/interlegis.ico">

Expand Down Expand Up @@ -184,5 +184,7 @@

{% include "tz/set_utc_offset.html" %}
{% browserid_js %}

{% block footer_js %}{% endblock %}
</body>
</html>
16 changes: 16 additions & 0 deletions src/templates/dpaste/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% extends 'base.html' %}

{% block head_css %}
<link rel="stylesheet" href="{{ STATIC_URL }}dpaste/css/theme.css"
type="text/css" media="screen" />
{% endblock %}

{% block header %}
<h2>Paste</h2>
{% endblock %}

{% block main-content %}
{% block page %}{% endblock %}
{% endblock %}

{% block footer_js %}{% endblock %}
Loading

0 comments on commit 0524f48

Please sign in to comment.