Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: translate/pootle
...
head fork: translate/pootle
  • 3 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Commits on May 21, 2012
friedelwolff friedelwolff Avoid flickering of show/hide link. 7c994ed
friedelwolff friedelwolff Limit the width of the intro div.
This avoids overly long lines on some screens, while also
helping to space the show/hide link nicely from the content.
5cdb4f1
friedelwolff friedelwolff Inherrit project and language descriptions.
This shows the language and project description if no
description for this specific translation project exists.
Translation project descriptions are not implemented yet,
so the fallback will currently always display.
0336702
3  html/js/common.js
View
@@ -145,7 +145,8 @@ $(document).ready(function ($) {
$('.intro, #edit_settings, #hide_description, #show_description').toggle();
}
$('#hide_description, #show_description').click(function(e) {
- $('.intro, #edit_settings, #hide_description, #show_description').slideToggle();
+ $('#edit_settings, #hide_description, #show_description').toggle();
+ $('.intro,').slideToggle();
if ($.cookie(cookieName) == "yes") {
$.cookie(cookieName, "no", cookieOptions);
} else {
5 html/style.css
View
@@ -612,6 +612,7 @@ ul.errorlist
{
margin: 0 1em;
line-height: 1.3em;
+ max-width: 85%;
}
.intro .announcement {
@@ -621,6 +622,10 @@ ul.errorlist
color: #624800;
}
+h3.intro-helper {
+ color: #999;
+}
+
.intro strong {
font-weight: bold;
}
25 local_apps/pootle_translationproject/templates/translation_project/tp_overview.html
View
@@ -1,6 +1,6 @@
{% extends "tp_base_extended.html" %}
-{% load i18n baseurl %}
+{% load i18n baseurl cleanhtml %}
{% get_current_language as LANGUAGE_CODE %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
@@ -10,6 +10,29 @@
{% block bodyclass %}tpoverview{% endblock bodyclass %}
+{% block precontent %}
+{{ block.super }}
+{% if description %}
+ {% include "description.html" %}
+ {% endif %}
+{% if not description and project.description or not description and language.description %}
+ <a id="hide_description" title="{% trans 'Hide' %}">
+ <span>{% trans 'Hide' %}</span></a>
+ <a id="show_description" title="{% trans 'Show' %}" style="display: none;">
+ <span>{% trans 'Show description' %}</span></a>
+ <div class="intro">
+ {% if project.description %}
+ <h3 class="intro-helper">{% trans 'Project Description' %}</h3>
+ {{ project.description|safe|linebreaks|clean }}
+ {% endif %}
+ {% if language.description %}
+ <h3 class="intro-helper">{% trans 'Language Description' %}</h3>
+ {{ language.description|safe|linebreaks|clean }}
+ {% endif %}
+ </div>
+{% endif %}
+{% endblock %}
+
{% block content %}
{% if children %}
<!--! The statistics view -->
4 local_apps/pootle_translationproject/views.py
View
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright 2008-2009 Zuza Software Foundation
+# Copyright 2008-2012 Zuza Software Foundation
#
# This file is part of Pootle.
#
@@ -232,9 +232,11 @@ def GET(self, template_vars, request, translation_project, directory):
project = translation_project.project
language = translation_project.language
is_terminology = project.is_terminology
+ description = u"" # temporary placeholder
template_vars.update({
'translation_project': translation_project,
+ 'description': description,
'project': project,
'language': language,
'directory': directory,

No commit comments for this range

Something went wrong with that request. Please try again.