add header/footer/nav for Developer Hub (bug 590330)
This commit is contained in:
Родитель
486b93fc75
Коммит
365ef1d8d2
|
@ -0,0 +1,77 @@
|
|||
{% extends "devhub/base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ page_title(_('Recent Activity for My Add-ons')) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<header>
|
||||
{{ breadcrumbs([(url('devhub.index'), _('Developer Hub')),
|
||||
(remora_url('/developers/addons'), _('My Add-ons')),
|
||||
(None, _('Recent Activity'))], add_default=False) }}
|
||||
<h2>{{ _('Recent Activity for My Add-ons') }}</h2>
|
||||
</header>
|
||||
|
||||
<section class="primary" role="main">
|
||||
<div class="listing results">
|
||||
<div class="results-inner">
|
||||
|
||||
{# TODO(cvan): Add item for each activity update. #}
|
||||
<div class="item">
|
||||
<p><a href="#">Version 1.3</a> of <a href="#">Test Pilot</a> added.</p>
|
||||
<p>30 min ago by <a href="#">Mozilla Labs</a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="secondary" role="complementary">
|
||||
<div id="refine-results" class="highlight">
|
||||
|
||||
<h3>{{ _('Refine Activity') }}</h3>
|
||||
|
||||
<div id="refine-addon">
|
||||
<h5>{{ _('Add-on') }}</h5>
|
||||
|
||||
<ul class="refinements">
|
||||
{# TODO(cvan): Add list items for each refinement item. #}
|
||||
<li class="selected">
|
||||
<a href="#">{{ _('All My Add-ons') }}</a>
|
||||
</li>
|
||||
<li><a href="#">{{ _('Firefox Sync') }}</a></li>
|
||||
<li><a href="#">{{ _('Personas Plus') }}</a></li>
|
||||
<li><a href="#">{{ _('Test Pilot') }}</a></li>
|
||||
|
||||
{# for item in addons #}
|
||||
{# include 'devhub/includes/refinement.html' #}
|
||||
{# endfor #}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="refine-activity">
|
||||
<h5>{{ _('Activity') }}</h5>
|
||||
|
||||
<ul class="refinements">
|
||||
{# TODO(cvan): Add list items for each refinement item. #}
|
||||
<li class="selected">
|
||||
<a href="#">{{ _('All Activity') }}</a>
|
||||
</li>
|
||||
<li><a href="#">{{ _('Add-on Updates') }}</a></li>
|
||||
<li><a href="#">{{ _('Add-on Status') }}</a></li>
|
||||
<li><a href="#">{{ _('User Collections') }}</a></li>
|
||||
<li><a href="#">{{ _('User Reviews') }}</a></li>
|
||||
|
||||
{# for item in activities #}
|
||||
{# include 'devhub/includes/refinement.html' #}
|
||||
{# endfor #}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div> {# refine-results #}
|
||||
<p class="secondary-feed">
|
||||
{# TODO(cvan): Add URL for feed. #}
|
||||
<a href="#" class="subscribe">{{ _('Subscribe to this feed') }}</a>
|
||||
</p>
|
||||
</section>
|
||||
{% endblock %}
|
|
@ -0,0 +1,91 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block bodyclass %}developer-hub{% endblock %}
|
||||
|
||||
{% block extrahead %}
|
||||
<link rel="stylesheet" media="screen,projection,tv"
|
||||
href="{{ MEDIA_URL }}css/developers.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block site_header_title %}
|
||||
<a title="{{ _('Return to the Add-on Developer Hub') }}"
|
||||
href="{{ url('devhub.index') }}">
|
||||
{{ _('Add-on <strong>Developer Hub</strong>')|safe }}
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block aux_nav %}
|
||||
<ul class="change">
|
||||
<li><a class="return" href="{{ url('home') }}">
|
||||
{{ _('Back to Add-ons') }}</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block navbar %}
|
||||
<div id="navbar">
|
||||
<ul class="top">
|
||||
{% if request.user.is_authenticated() and amo_user.is_developer %}
|
||||
<li class="top">
|
||||
<a href="{{ remora_url('/developers/addons') }}" class="controller">
|
||||
{{ _('My Add-ons') }}</a>
|
||||
<ul>
|
||||
{% for addon in amo_user.addons_listed[:7] %}
|
||||
<li><a href="{{ remora_url('/developers/addon/edit/%s' % addon.id) }}">
|
||||
{{ addon.name }}</a></li>
|
||||
{% endfor %}
|
||||
{% if amo_user.addons_listed|length > 7 %}
|
||||
<li><a href="{{ remora_url('/developers/addons') }}">
|
||||
{{ _('more add-ons...') }}</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{{ remora_url('/developers/addon/submit') }}">
|
||||
{{ _('Submit a New Add-on') }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="top">
|
||||
<a href="#" class="controller">{{ _('Documentation') }}</a>
|
||||
<ul>
|
||||
<li><a href="{{ remora_url('/developers/docs/getting-started') }}">
|
||||
{{ _('Getting Started') }}</a></li>
|
||||
<li><a href="{{ remora_url('/developers/docs/policies') }}">
|
||||
{{ _('Add-on Policies') }}</a></li>
|
||||
<li><a href="{{ remora_url('/developers/docs/case-studies') }}">
|
||||
{{ _('Case Studies') }}</a></li>
|
||||
<li><a href="{{ remora_url('/developers/docs/how-to') }}">
|
||||
{{ _('How-to Library') }}</a></li>
|
||||
<li><a href="{{ remora_url('/developers/docs/reference') }}">
|
||||
{{ _('API & Language Reference') }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="top">
|
||||
<a href="#" class="controller">{{ _('Tools') }}</a>
|
||||
<ul>
|
||||
<li><a href="{{ remora_url('/developers/tools/builder') }}">
|
||||
{{ _('Add-on Packager') }}</a></li>
|
||||
<li><a href="{{ remora_url('/developers/addon/validate') }}">
|
||||
{{ _('Add-on Validator') }}</a></li>
|
||||
<li><a href="{{ remora_url('/collection/devel-tools') }}">
|
||||
{{ _('Development Add-ons') }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="top">
|
||||
<a href="#" class="controller">{{ _('Community') }}</a>
|
||||
<ul>
|
||||
<li><a href="http://blog.mozila.com/addons/">
|
||||
{{ _('Add-ons Blog') }}</a></li>
|
||||
<li><a href="https://forums.addons.mozilla.org">
|
||||
{{ _('Add-ons Forum') }}</a></li>
|
||||
<li><a href="{{ remora_url('/developers/community/newsletter') }}">
|
||||
{{ _('about:addons Newsletter') }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="search">
|
||||
{% include "devhub/search.html" %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer_secondary %}
|
||||
<img src="{{ MEDIA_URL }}img/amo2009/developers/hub-logo-footer.png" alt="">
|
||||
{% endblock footer_secondary %}
|
|
@ -0,0 +1,6 @@
|
|||
{% extends "devhub/base.html" %}
|
||||
|
||||
{% block title %}{{ page_title(_('Add-on Developer Hub')) }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,12 @@
|
|||
{% set search_form = SearchForm(request) %}
|
||||
<form id="search-form" action="{{ remora_url('/developers/search') }}">
|
||||
<div class="basic" id="search-query">
|
||||
<input id="query" type="text" title="search" name="q"
|
||||
{% if not search_form.q.data %}class="placeholder"{% endif %}
|
||||
value="{{ search_form.q.data or '' }}"
|
||||
placeholder="{{ _('Search developer documentation') }}">
|
||||
<button id="search-submit" type="submit">
|
||||
<img src="{{ MEDIA_URL }}img/amo2009/blank.gif">
|
||||
</button>
|
||||
</div> {# search-query #}
|
||||
</form>
|
|
@ -0,0 +1,10 @@
|
|||
from django.conf.urls.defaults import patterns, url
|
||||
|
||||
from . import views
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url('^$', views.index, name='devhub.index'),
|
||||
url('^addons/activity$', views.addons_activity,
|
||||
name='devhub.addons_activity'),
|
||||
)
|
|
@ -0,0 +1,14 @@
|
|||
import jingo
|
||||
from tower import ugettext as _
|
||||
|
||||
from amo.decorators import login_required
|
||||
|
||||
|
||||
def index(request):
|
||||
return jingo.render(request, 'devhub/index.html', dict())
|
||||
|
||||
|
||||
# TODO: Check if user is a developer.
|
||||
@login_required
|
||||
def addons_activity(request):
|
||||
return jingo.render(request, 'devhub/addons_activity.html', dict())
|
|
@ -148,7 +148,7 @@ th, td {
|
|||
background-position: 0.3em center;
|
||||
background-color: white;
|
||||
color: #888;
|
||||
min-width: 15em;
|
||||
min-width: 16em;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
|
@ -161,6 +161,7 @@ th, td {
|
|||
}
|
||||
#navbar #search-submit {
|
||||
margin: -.1em 0 .1em .1em;
|
||||
/*padding: 0.3em 0;*/
|
||||
padding: 0 .0 .2em 0;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
|
@ -170,8 +171,14 @@ th, td {
|
|||
background-position:left center;
|
||||
background-repeat:repeat-x;
|
||||
border:1px solid #B9D999;
|
||||
/* width: 12%;*/
|
||||
}
|
||||
#navbar #search-submit img {
|
||||
/*
|
||||
width: 9px;
|
||||
height: 18px;
|
||||
background-image: url(../../img/amo2009/icons/buttons/go-green.gif);
|
||||
*/
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(../../img/developers/go-arrow.png);
|
||||
|
@ -183,7 +190,8 @@ th, td {
|
|||
border: none;
|
||||
}
|
||||
.html-rtl #navbar #search-submit img {
|
||||
background-image: url(../../img/developers/go-arrow_rtl.png);
|
||||
background-image: url(../../img/amo2009/icons/buttons/go-green_rtl.gif);
|
||||
/* background-image: url(../../img/developers/go-arrow_rtl.png); */
|
||||
}
|
||||
|
||||
/** content */
|
||||
|
@ -192,7 +200,7 @@ p.summary {
|
|||
line-height: 150%;
|
||||
}
|
||||
.secondary .highlight ul:last-child {
|
||||
margin-bottom: 0;
|
||||
/* margin-bottom: 0; */
|
||||
}
|
||||
|
||||
.secondary .button-wrapper {
|
||||
|
@ -469,6 +477,10 @@ p.summary {
|
|||
}
|
||||
|
||||
/** search */
|
||||
.results-head {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
#search #resultcount {
|
||||
font-size: 1.385em;
|
||||
margin-bottom: .5em;
|
||||
|
@ -877,6 +889,14 @@ p.summary {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
.secondary-feed {
|
||||
padding: 1em 0 0 1em;
|
||||
}
|
||||
|
||||
.secondary-feed .subscribe {
|
||||
padding: 2px 0 0 24px;
|
||||
}
|
||||
|
||||
.addon-feed-outer-wrapper {
|
||||
float: right;
|
||||
margin-left: -25em;
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 432 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 202 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 396 B |
|
@ -59,6 +59,7 @@
|
|||
</p>
|
||||
{% block site_stats %}{% endblock %}
|
||||
<div id="aux-nav" role="navigation">
|
||||
{% block aux_nav %}
|
||||
<ul id="other-apps" class="change"
|
||||
title="{{ _('Find add-ons for other applications') }}">
|
||||
<li>
|
||||
|
@ -74,6 +75,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock aux_nav %}
|
||||
{% if not settings.READ_ONLY %}
|
||||
{% include "user_login.html" %}
|
||||
{% endif %}
|
||||
|
@ -106,7 +108,18 @@
|
|||
{% endblock %}
|
||||
{% block js %}{% endblock %}
|
||||
{% block footer %}
|
||||
{% include "footer.html" %}
|
||||
<div id="footer" role="contentinfo">
|
||||
<div class="section">
|
||||
<div class="primary">
|
||||
{% include "footer.html" %}
|
||||
</div> {# primary #}
|
||||
<div class="secondary">
|
||||
{% block footer_secondary %}
|
||||
<img src="{{ MEDIA_URL }}img/amo2009/illustrations/logo-add-ons-half.png" alt="">
|
||||
{% endblock %}
|
||||
</div> {# secondary #}
|
||||
</div> {# section #}
|
||||
</div> {# footer #}
|
||||
{% endblock %}
|
||||
{# Webtrends Stats Tracking #}
|
||||
<script defer src="{{ MEDIA_URL }}js/webtrends/webtrends-v0.1.js"></script>
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
<div id="footer" role="contentinfo">
|
||||
<div class="section">
|
||||
<div class="primary">
|
||||
{% include 'includes/lang_switcher.html' %}
|
||||
<p>{% trans legalurl="http://www.mozilla.com/en-US/about/legal.html#site", ccurl="http://creativecommons.org/licenses/by-sa/3.0/" -%}
|
||||
Except where otherwise <a href="{{ legalurl }}">noted</a>, content on this site is licensed under the
|
||||
|
@ -12,7 +9,7 @@
|
|||
<li><a href="http://www.mozilla.com/{{ LANG }}/about/legal.html">{{ _('Legal Notices') }}</a></li>
|
||||
<li><a href="{{ url('pages.about') }}">{{ _('About') }}</a></li>
|
||||
<li><a href="http://blog.mozilla.com/addons">{{ _('Blog') }}</a></li>
|
||||
<li><a href="{{ remora_url('/developers') }}{# TODO #}">{{ _('Developer Hub') }}</a></li>
|
||||
<li><a href="{{ url('devhub.index') }}">{{ _('Developer Hub') }}</a></li>
|
||||
<li><a href="{{ url('pages.faq') }}"><abbr title="{{ _('Frequently Asked Questions') }}">{{ _('FAQ') }}</abbr></a></li>
|
||||
<li><a href="https://forums.addons.mozilla.org">{{ _('Forum') }}</a></li>
|
||||
</ul>
|
||||
|
@ -20,9 +17,3 @@
|
|||
regarding the applications or any information related thereto. Any questions, complaints or claims regarding the
|
||||
applications must be directed to the appropriate software vendor.{%- endtrans %}
|
||||
</p>
|
||||
</div> {# primary #}
|
||||
<div class="secondary">
|
||||
<img src="{{ MEDIA_URL }}img/amo2009/illustrations/logo-add-ons-half.png" alt="" />
|
||||
</div> {# secondary #}
|
||||
</div> {# section #}
|
||||
</div> {# footer #}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% set search_form = SearchForm(request) %}
|
||||
{% set show_advanced = search_form.advanced.data == 'on' %}
|
||||
<div class="search-form expanded-search-form {% if show_advanced %}expanded{% endif %}">
|
||||
<form method="get" id="search-form" action="{{ url('search.search') }}">
|
||||
<form id="search-form" action="{{ url('search.search') }}">
|
||||
<div class="basic" id="search-query">
|
||||
<input id="query" type="text" title="search" name="q"
|
||||
{% if not search_form.q.data %}class="placeholder"{% endif %}
|
||||
|
@ -21,7 +21,7 @@
|
|||
{%- endfor %}
|
||||
</select>
|
||||
<button type="submit">
|
||||
<img src="{{ MEDIA_URL}}img/amo2009/blank.gif">
|
||||
<img src="{{ MEDIA_URL }}img/amo2009/blank.gif">
|
||||
</button>
|
||||
</div> {# search-query #}
|
||||
<div id="advanced-link" title="{{ _('Toggle advanced search mode') }}">
|
||||
|
|
3
urls.py
3
urls.py
|
@ -32,6 +32,9 @@ urlpatterns = patterns('',
|
|||
# Tags
|
||||
('', include('tags.urls')),
|
||||
|
||||
# Developer Hub.
|
||||
('developers/', include('devhub.urls')),
|
||||
|
||||
# AMO admin (not django admin).
|
||||
('^admin/', include('zadmin.urls')),
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче