OpenSource-Tools / LiquidVoting

1 stars 0 forks source link

Sidebar 2 #52

Closed kvdmolen closed 9 years ago

kvdmolen commented 9 years ago

Perhaps some duplicate issues as #15, but better specified. See below for original HTML!

Changes

1

All elements directly under

<div class="sidebar">

will get this classed:

<div class="tab tab-{something unique}"> 

Instead of

<div class="tab-whatcanido .. ">

2

At index page there is this sidebar-tab: <div class="tab-whatcanido units">

under <div class="sidebar row"> there is <img title="subscribed" alt="subscribed" class="icon16 star" src="../static/icons/48/star.png">

If this image exists, one is "subscribed" to that unit. Please:

So, with all three rules, it becomes:

<div class="tab tab-units">
  <div class="row [subscribed]">
    ...

4

Both the "Organisational Unit" and the "Subject Area" can be delegated.

An <a> tag will appear if it is delegated, including an image. The image should be removed, and replaced with an <i>. The <img class="member_image .. can be completely removed.

This HTML appears at two places, both in .head and .row (also see below):

<a class="delegation_info" href="../delegation/show.html?area_id=3">
  <img title="delegates to" alt="delegates to" class="delegation_arrow" src="../static/delegation_arrow_24_horizontal.png">
  <img title="kvdmolen" class="member_image member_image_avatar micro_avatar" src="../member_image/show/7.html?image_type=avatar">
</a>

It changes to (text from here for subject Area (.row) and from here for Organisational Unit (.head)):

<a class="delegation_info" href="../delegation/show.html?area_id=3">
  <i class="fa fa-hand-o-right tooltip"><span><span>{{"[You delegated this subject area] / [You delegated this unit]"}}</span></span></i>
</a>

Original HTML:

<div class="tab-whatcanido units">
  <div class="sidebar head">
    <h2>
      <a class="unit" href="../unit/show/2.html">Unit 1</a>
      <a class="delegation_info" href="./delegation/show.html?unit_id=2">
        <img title="delegates to" alt="delegates to" class="delegation_arrow" src="./static/delegation_arrow_24_horizontal.png">
        <img title="kvdmolen" class="member_image member_image_avatar micro_avatar" src="./member_image/show/7.html?image_type=avatar">
</a>
    </h2>
  </div>
  <div class="areas areas-2">
    <div class="sidebar row">
      <img title="subscribed" alt="subscribed" class="icon16 star" src="../static/icons/48/star.png">
      <a class="delegation_info" href="../delegation/show.html?area_id=3">
        <img title="delegates to" alt="delegates to" class="delegation_arrow" src="../static/delegation_arrow_24_horizontal.png">
        <img title="kvdmolen" class="member_image member_image_avatar micro_avatar" src="../member_image/show/7.html?image_type=avatar">
      </a>
      <a class="area" href="../area/show/3.html">Subject 1</a>
    </div>
    <div class="sidebar row">
      <img title="subscribed" alt="subscribed" class="icon16 star" src="../static/icons/48/star.png">
      <a class="area" href="../area/show/2.html">Subject 2</a>
    </div>
  </div>
</div>
nktc commented 9 years ago

1-3 done, will return to 4.

kvdmolen commented 9 years ago

Oho, code duplication again :(

Please also apply number 3 here: http://178.62.254.91/lf/unit/show/2.html

nktc commented 9 years ago

Updated.

nktc commented 9 years ago

I have updated 4 - please review and comment?

kvdmolen commented 9 years ago

Ah, almost!

It seems again a mixup in Breadcrumb and Sidebar..

Sidebar

(this post)

The two .tab-sidebar-units tabs in the sidebar (political party 1 + Central district) and the .row below should get the <i> thing, if delegated! Exactly like the .subscribed class:

<div class="row subscribed">
  <i class="fa fa-star tooltip"><span><span>You are subscribed</span></span></i>
  <a href="../area/show/2.html" class="area">Economy</a>
</div>

So when also delegated, this becomes:

<div class="row subscribed delegated">
  <i class="fa fa-star tooltip"><span><span>You are subscribed</span></span></i>
  <i class="fa fa-hand-o-right tooltip"><span><span>{{"[You delegated this subject area] / [You delegated this unit]"}}</span></span></i>
  <a href="../area/show/2.html" class="area">Economy</a>
</div>

(where i not nested in a, my bad).

Please notice this holds for the units (header) <div class="head"> and the area's (row) <div class="row">

Breadcrumb

The <i> tag there is not required, I'll simply use css to place the icon, but will require the .delegated class added.

Currently:

<li class="area">
  <a href="../../area/show/2.html"><span>Economy</span></a>
  <a href="../../area/"><i class="fa fa-hand-o-right tooltip"><span><span>You delegated this subject area</span></span></i></a>
</li>

can become (.delegated class added, <i> removed):

<li class="area delegated">
  <a href="../../area/show/2.html"><span>Economy</span></a>
</li>
nktc commented 9 years ago

I believe these changes are all done. Please verify.

Thank you for the excellent documentation. It was easy to follow!