Commits

Mathieu D.  committed e63ec55

make the main div.wrap part of the children templates

  • Participants
  • Parent commits 6380094
  • Branches latest_reviews

Comments (0)

Files changed (5)

File review/templates/404.html

 {% block title %}Page not found - {% endblock %}
 
 {% block content %}
-    <h2>Page not found (404)</h2>
-    <p>The page you requested could not be found. <a href="/">Go home</a>.</p>
+    <div class="wrap">
+        <h2>Page not found (404)</h2>
+        <p>The page you requested could not be found. <a href="/">Go home</a>.</p>
+    </div>
 {% endblock %}

File review/templates/500.html

 {% block title %}Server error - {% endblock %}
 
 {% block content %}
-    <h2>Server error (500)</h2>
-    <p>Something went horribly wrong.</p>
-    <p>
-        If you have a few extra minutes you could
-        <a href="http://bitbucket.org/sjl/hg-review/issues/">file a bug report</a>.
-    </p>
+    <div class="wrap">
+        <h2>Server error (500)</h2>
+        <p>Something went horribly wrong.</p>
+        <p>
+            If you have a few extra minutes you could
+            <a href="http://bitbucket.org/sjl/hg-review/issues/">file a bug report</a>.
+        </p>
+    </div>
 {% endblock %}

File review/templates/base.html

             {% block navigation %}
                 <div class="navigation">&nbsp;</div>
             {% endblock %}
-
-            <div class="wrap">
-                {% block content %}{% endblock %}
-            </div>
+            {% block content %}{% endblock %}
         </div>
         <div class="footer">
             <div class="wrap">

File review/templates/changeset.html

 
 
 {% block content %}
-    <div class="group head">
-        <div class="committer-avatar" style="background: transparent url('{{ utils['cset_gravatar'](rev, 60) }}') top left no-repeat">&nbsp;</div>
-        <div class="patch"><a href="/changeset/{{ utils['node_short'](rev.node()) }}/patch/">Download Patch &darr;</a></div>
+    <div class="wrap">
+        <div class="group head">
+            <div class="committer-avatar" style="background: transparent url('{{ utils['cset_gravatar'](rev, 60) }}') top left no-repeat">&nbsp;</div>
+            <div class="patch"><a href="/changeset/{{ utils['node_short'](rev.node()) }}/patch/">Download Patch &darr;</a></div>
 
-        <h2>
-            {{ rev.rev() }}:
-            <span class="desc">{{ rev.description().splitlines()[0] }}</span>
-            <span class="by">by</span>
-            <a href="mailto:{{ utils['email'](rev.user()) }}">{{ utils['person'](rev.user()) }}</a>
-        </h2>
+            <h2>
+                {{ rev.rev() }}:
+                <span class="desc">{{ rev.description().splitlines()[0] }}</span>
+                <span class="by">by</span>
+                <a href="mailto:{{ utils['email'](rev.user()) }}">{{ utils['person'](rev.user()) }}</a>
+            </h2>
 
-        <div class="fulldesc">{{ rev.description() }}</div>
+            <div class="fulldesc">{{ rev.description() }}</div>
+        </div>
+
+        {% with %}
+            {% set comments = rcset.review_level_comments() %}
+
+            {% if comments %}
+                <div class="review-level-comments item-listing">
+                    {% for comment in comments %}
+                        {% include "pieces/comment.html" %}
+                    {% endfor %}
+                </div>
+            {% else %}
+                <p class="placeholder">No changeset-level comments yet&hellip;</p>
+            {% endif %}
+        {% endwith %}
+
+        {% if not read_only or allow_anon %}
+            {% include "pieces/forms/review-comment.html" %}
+        {% endif %}
+
+        <h2>Signoffs</h2>
+
+        {% with %}
+            {% set signoffs = rcset.signoffs %}
+
+            {% if signoffs %}
+                <div class="signoffs item-listing">
+                    {% for signoff in signoffs %}
+                        {% include "pieces/signoff.html" %}
+                    {% endfor %}
+                </div>
+            {% else %}
+                <p class="placeholder">No signoffs yet&hellip;</p>
+            {% endif %}
+        {% endwith %}
+
+        {% if not read_only %}
+            {% include "pieces/forms/signoff.html" %}
+        {% endif %}
+
+        <h2>Files</h2>
+
+        {% for ufilename, filename in rcset.unicode_files() %}
+            {% set comments = rcset.file_level_comments(filename) %}
+            {% set commentcount = utils['len'](comments) + utils['len'](rcset.line_level_comments(filename)) %}
+
+            <div class="file">
+                <div class="filename group">
+                    <span class="filename-b64 disabled">{{ utils['b64'](filename) }}</span>
+                    <h3>
+                        <a class="fold" href="#"><span class="filename-u">{{ ufilename }}</span>{% if commentcount %} ({{ commentcount }} comment{% if commentcount != 1 %}s{% endif %}){% endif %}</a>
+                        <span class="status">&darr;</span>
+                    </h3>
+                </div>
+
+                <div class="file-review-contents">
+                    {% if comments %}
+                        <div class="comments item-listing">
+                            {% for comment in comments %}
+                                {% include "pieces/comment.html" %}
+                            {% endfor %}
+                        </div>
+                    {% endif %}
+
+                    {% if not read_only or allow_anon %}
+                        {% set index = loop.index %}
+                        {% include "pieces/forms/file-comment.html" %}
+                    {% endif %}
+
+                    {% include "pieces/diff.html" %}
+                </div>
+            </div>
+        {% endfor %}
     </div>
-
-    {% with %}
-        {% set comments = rcset.review_level_comments() %}
-
-        {% if comments %}
-            <div class="review-level-comments item-listing">
-                {% for comment in comments %}
-                    {% include "pieces/comment.html" %}
-                {% endfor %}
-            </div>
-        {% else %}
-            <p class="placeholder">No changeset-level comments yet&hellip;</p>
-        {% endif %}
-    {% endwith %}
-
-    {% if not read_only or allow_anon %}
-        {% include "pieces/forms/review-comment.html" %}
-    {% endif %}
-
-    <h2>Signoffs</h2>
-
-    {% with %}
-        {% set signoffs = rcset.signoffs %}
-
-        {% if signoffs %}
-            <div class="signoffs item-listing">
-                {% for signoff in signoffs %}
-                    {% include "pieces/signoff.html" %}
-                {% endfor %}
-            </div>
-        {% else %}
-            <p class="placeholder">No signoffs yet&hellip;</p>
-        {% endif %}
-    {% endwith %}
-
-    {% if not read_only %}
-        {% include "pieces/forms/signoff.html" %}
-    {% endif %}
-
-    <h2>Files</h2>
-
-    {% for ufilename, filename in rcset.unicode_files() %}
-        {% set comments = rcset.file_level_comments(filename) %}
-        {% set commentcount = utils['len'](comments) + utils['len'](rcset.line_level_comments(filename)) %}
-
-        <div class="file">
-            <div class="filename group">
-                <span class="filename-b64 disabled">{{ utils['b64'](filename) }}</span>
-                <h3>
-                    <a class="fold" href="#"><span class="filename-u">{{ ufilename }}</span>{% if commentcount %} ({{ commentcount }} comment{% if commentcount != 1 %}s{% endif %}){% endif %}</a>
-                    <span class="status">&darr;</span>
-                </h3>
-            </div>
-
-            <div class="file-review-contents">
-                {% if comments %}
-                    <div class="comments item-listing">
-                        {% for comment in comments %}
-                            {% include "pieces/comment.html" %}
-                        {% endfor %}
-                    </div>
-                {% endif %}
-
-                {% if not read_only or allow_anon %}
-                    {% set index = loop.index %}
-                    {% include "pieces/forms/file-comment.html" %}
-                {% endif %}
-
-                {% include "pieces/diff.html" %}
-            </div>
-        </div>
-    {% endfor %}
 {% endblock %}

File review/templates/index.html

 {% block title %}{% endblock %}
 
 {% block content %}
-    <h2>Changesets</h2>
-    <table>
-        {% for rcset in rcsets %}
-            {% set rev = rcset.target[rcset.node] %}
-            {% set node_short = utils['node_short'](rev.node()) %}
-            {% set link = "/changeset/" + node_short + "/" %}
+    <div class="wrap">
+        <h2>Changesets</h2>
+        <table>
+            {% for rcset in rcsets %}
+                {% set rev = rcset.target[rcset.node] %}
+                {% set node_short = utils['node_short'](rev.node()) %}
+                {% set link = "/changeset/" + node_short + "/" %}
 
-            <tr>
-                <td class="node"><span class="rev">{{ rev.rev() }}</span><span class="sep">:</span><span class="hash">{{ node_short }}</span></td>
-                <td class="desc">
-                    <a class="changeset-link" href="{{ link }}">{{  rev.description().splitlines()[0] }}</a>
-                </td>
-                <td class="stats">
-                    {% with %}
-                        {% set comments = rcset.comments %}
-                        {% set signoffs = utils['categorize_signoffs'](rcset.signoffs) %}
+                <tr>
+                    <td class="node"><span class="rev">{{ rev.rev() }}</span><span class="sep">:</span><span class="hash">{{ node_short }}</span></td>
+                    <td class="desc">
+                        <a class="changeset-link" href="{{ link }}">{{  rev.description().splitlines()[0] }}</a>
+                    </td>
+                    <td class="stats">
+                        {% with %}
+                            {% set comments = rcset.comments %}
+                            {% set signoffs = utils['categorize_signoffs'](rcset.signoffs) %}
 
-                        {% if comments %}
-                            <a class="badge comments" href="{{ link }}">{{ utils['len'](comments) }} comment{% if utils['len'](comments) > 1 %}s{% endif %}</a>
-                        {% endif %}
+                            {% if comments %}
+                                <a class="badge comments" href="{{ link }}">{{ utils['len'](comments) }} comment{% if utils['len'](comments) > 1 %}s{% endif %}</a>
+                            {% endif %}
 
-                        {% if signoffs['yes'] %}
-                            <a class="badge signoffs yes" href="{{ link }}">{{ signoffs['yes'] }} yes</a>
-                        {% endif %}
-                        {% if signoffs['neutral'] %}
-                            <a class="badge signoffs neutral" href="{{ link }}">{{ signoffs['neutral'] }} neutral</a>
-                        {% endif %}
-                        {% if signoffs['no'] %}
-                            <a class="badge signoffs no" href="{{ link }}">{{ signoffs['no'] }} no</a>
-                        {% endif %}
-                    {% endwith %}
-                </td>
-            </tr>
-        {% endfor %}
-    </table>
+                            {% if signoffs['yes'] %}
+                                <a class="badge signoffs yes" href="{{ link }}">{{ signoffs['yes'] }} yes</a>
+                            {% endif %}
+                            {% if signoffs['neutral'] %}
+                                <a class="badge signoffs neutral" href="{{ link }}">{{ signoffs['neutral'] }} neutral</a>
+                            {% endif %}
+                            {% if signoffs['no'] %}
+                                <a class="badge signoffs no" href="{{ link }}">{{ signoffs['no'] }} no</a>
+                            {% endif %}
+                        {% endwith %}
+                    </td>
+                </tr>
+            {% endfor %}
+        </table>
 
-    <div class="pagination group">
-        {% if not older < 0 %}
-            <a class="older" href="/{{ older }}/">Older Changesets &rArr;</a>
-        {% endif %}
-        {% if not newer < 0 %}
-            <a class="newer" href="/{{ newer }}/">&lArr; Newer Changesets</a>
-        {% endif %}
+        <div class="pagination group">
+            {% if not older < 0 %}
+                <a class="older" href="/{{ older }}/">Older Changesets &rArr;</a>
+            {% endif %}
+            {% if not newer < 0 %}
+                <a class="newer" href="/{{ newer }}/">&lArr; Newer Changesets</a>
+            {% endif %}
+        </div>
     </div>
 {% endblock %}