From a32231274060ec2de453124117518458c4fa00df Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 8 Sep 2013 20:54:11 +0200 Subject: Implemented Flattr changes Added a button to say if the article is flattrable or not and how many people have flattred this object. --- tpl/view.twig | 1 + 1 file changed, 1 insertion(+) (limited to 'tpl') diff --git a/tpl/view.twig b/tpl/view.twig index 28508772..7b15c7c7 100644 --- a/tpl/view.twig +++ b/tpl/view.twig @@ -31,6 +31,7 @@ {% if constant('SHARE_TWITTER') == 1 %}
  • {% endif %} {% if constant('SHARE_MAIL') == 1 %}
  • {% endif %} {% if constant('SHARE_SHAARLI') == 1 %}
  • {% trans "shaarli" %}
  • {% endif %} +
  • {% if flattr.status == "flattrable" %} This thing is flattrable !{% elseif flattr.status == "flattred" %} This thing has already been flattred by {{ flattr.numflattrs }} users and can be flattred !{% else %}This article cannot be flattred{% endif %}
  • {% trans "this article appears wrong?" %} {% trans "create an issue" %} {% trans "or" %} {% trans "contact us by mail" %}

    -- cgit v1.2.3 From af1d2792263d45c5ffea2e5485dd81bf59b7bded Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 8 Sep 2013 21:52:01 +0200 Subject: Fixed errors and changed source of flattrs Fixed errors, and the number displayed is no longer the number of peope who has flattred an article, but the number of flattrs he has got. --- tpl/view.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tpl') diff --git a/tpl/view.twig b/tpl/view.twig index 7b15c7c7..c101db0a 100644 --- a/tpl/view.twig +++ b/tpl/view.twig @@ -31,7 +31,7 @@ {% if constant('SHARE_TWITTER') == 1 %}
  • {% endif %} {% if constant('SHARE_MAIL') == 1 %}
  • {% endif %} {% if constant('SHARE_SHAARLI') == 1 %}
  • {% trans "shaarli" %}
  • {% endif %} -
  • {% if flattr.status == "flattrable" %} This thing is flattrable !{% elseif flattr.status == "flattred" %} This thing has already been flattred by {{ flattr.numflattrs }} users and can be flattred !{% else %}This article cannot be flattred{% endif %}
  • +
  • {% if flattr.status == "flattrable" %} This thing is flattrable !{% elseif flattr.status == "flattred" %} This thing has already been flattred {{ flattr.numflattrs }} times and can be flattred !{% else %}This article cannot be flattred{% endif %}
  • {% trans "this article appears wrong?" %} {% trans "create an issue" %} {% trans "or" %} {% trans "contact us by mail" %}

    -- cgit v1.2.3 From 964481d023676bee964141a1d14f638995ac8d30 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 10 Sep 2013 18:23:56 +0200 Subject: Fixed bugs, added a flattr button and an option There's a button and an option in define.inc.php to show the button or not. --- tpl/css/style-light.css | 4 ++++ tpl/img/light/flattr.png | Bin 0 -> 3521 bytes tpl/view.twig | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tpl/img/light/flattr.png (limited to 'tpl') diff --git a/tpl/css/style-light.css b/tpl/css/style-light.css index e2788a1c..224ef182 100644 --- a/tpl/css/style-light.css +++ b/tpl/css/style-light.css @@ -48,6 +48,10 @@ a.shaarli span { background: url('../img/light/shaarli.png') no-repeat; } +a.flattr span { + background: url('../img/light/flattr.png'); +} + a.email span { background: url('../img/light/envelop.png') no-repeat; } diff --git a/tpl/img/light/flattr.png b/tpl/img/light/flattr.png new file mode 100644 index 00000000..d9007c0c Binary files /dev/null and b/tpl/img/light/flattr.png differ diff --git a/tpl/view.twig b/tpl/view.twig index c101db0a..283cfb5b 100644 --- a/tpl/view.twig +++ b/tpl/view.twig @@ -11,6 +11,7 @@ {% if constant('SHARE_TWITTER') == 1 %}
  • {% endif %} {% if constant('SHARE_MAIL') == 1 %}
  • {% endif %} {% if constant('SHARE_SHAARLI') == 1 %}
  • {% trans "shaarli" %}
  • {% endif %} + {% if constant('FLATTR') == 1 %}{% if flattr.status == "flattrable" %}
  • flattr
  • {% elseif flattr.status == "flattred" %}
  • flattr{{ flattr.numflattrs }}
  • {% else %}{% endif %}{% endif %}
    @@ -31,7 +32,7 @@ {% if constant('SHARE_TWITTER') == 1 %}
  • {% endif %} {% if constant('SHARE_MAIL') == 1 %}
  • {% endif %} {% if constant('SHARE_SHAARLI') == 1 %}
  • {% trans "shaarli" %}
  • {% endif %} -
  • {% if flattr.status == "flattrable" %} This thing is flattrable !{% elseif flattr.status == "flattred" %} This thing has already been flattred {{ flattr.numflattrs }} times and can be flattred !{% else %}This article cannot be flattred{% endif %}
  • + {% if constant('FLATTR') == 1 %}{% if flattr.status == "flattrable" %}
  • flattr
  • {% elseif flattr.status == "flattred" %}
  • flattr{{ flattr.numflattrs }}
  • {% else %}{% endif %}{% endif %}

    {% trans "this article appears wrong?" %} {% trans "create an issue" %} {% trans "or" %} {% trans "contact us by mail" %}

    -- cgit v1.2.3