NicolasPetton / Projectify

Project management for TiddlyWiki
https://projectify.wiki
MIT License
140 stars 47 forks source link

Categories with spaces showing up multiple times in ProjectListItem #74

Open mwiktowy opened 3 years ago

mwiktowy commented 3 years ago

When a category has a space in it, it will show up multiple times in each project when they are viewed as a list.

This is due to the category variable name being used as a filter directly in a list widget rather than formatted as a title list in $:/plugins/nico/projectify/ui/dashboard/ProjectListItem

This can be fixed by changing <<category>> to "[<category>]" ... at least for single title in category.

$:/plugins/nico/projectify/ui/dashboard/ProjectListItem:

\define lingo-base() $:/language/projectify/

<$vars category={{!!category}}>
  <li class="py-project">
    <div class="py-project-heading">
      <div class="py-project-title">
    {{||$:/plugins/nico/projectify/images/pie}} <$link to={{!!title}}><$view field="title"/></$link>
      </div>
      <$list filter="[<category>]" variable="ignore">
    <div class="py-project-category">
      <$tiddler tiddler=<<category>>>
        {{||$:/plugins/nico/projectify/ui/category/Category}}
      </$tiddler>
    </div>
      </$list>
    </div>
    <div class="py-project-infos">
      <$count filter=<<py-open-todos>>/> <<lingo OpenTasks>>
    </div>
  </li>
</$vars>