[PATCH 7 of 7] drafts: emphasize the users attention on his drafts

Thomas De Schampheleire patrickdepinguin at gmail.com
Wed Apr 22 14:18:33 EDT 2015


On Tue, Apr 14, 2015 at 6:03 PM, Jan Heylen <heyleke at gmail.com> wrote:
> # HG changeset patch
> # User Jan Heylen <heyleke at gmail.com>
> # Date 1428987893 -7200
> #      Tue Apr 14 07:04:53 2015 +0200
> # Node ID 4a70657aa2a6cd20d8614d7fd5e6ef69e90d31b1
> # Parent  b1b3c859230ce5997f7820788dd331748e277525
> drafts: emphasize the users attention on his drafts
>
> diff -r b1b3c859230c -r 4a70657aa2a6 kallithea/public/css/style.css
> --- a/kallithea/public/css/style.css    Tue Apr 14 06:39:55 2015 +0200
> +++ b/kallithea/public/css/style.css    Tue Apr 14 07:04:53 2015 +0200
> @@ -4552,6 +4552,29 @@
>      padding: 3px;
>  }
>
> +.inline-comments .comment .meta-draft {
> +    background: #98fb98;
> +    padding: 4px;
> +    border-bottom: 1px solid #ddd;
> +    min-height: 20px;
> +    overflow: auto;
> +}
> +
> +.inline-comments .comment .meta-draft img {
> +    vertical-align: middle;
> +}
> +
> +.inline-comments .comment .meta-draft .user {
> +    font-weight: bold;
> +    float: left;
> +    padding: 3px;
> +}
> +
> +.inline-comments .comment .meta-draft .date {
> +    float: left;
> +    padding: 3px;
> +}
> +
>  .inline-comments .comment .text {
>      background-color: #FAFAFA;
>  }
> diff -r b1b3c859230c -r 4a70657aa2a6 kallithea/templates/changeset/changeset_file_comment.html
> --- a/kallithea/templates/changeset/changeset_file_comment.html Tue Apr 14 06:39:55 2015 +0200
> +++ b/kallithea/templates/changeset/changeset_file_comment.html Tue Apr 14 07:04:53 2015 +0200
> @@ -6,7 +6,11 @@
>  <%def name="comment_block(co)">
>    <div class="comment" id="comment-${co.comment_id}" line="${co.line_no}">
>      <div class="comment-wrapp">
> +      %if co.draft:
> +      <div class="meta-draft">
> +      %else:
>        <div class="meta">

Instead of replacing 'meta' with 'meta-draft', I would keep meta and
add an additional 'draft' class.
This avoids completely duplicating the style definitions: you only
need to overwrite the things that differ, like the background color.


More information about the kallithea-general mailing list