On Wikirate, we have "Claims", which is a cardtype. Each Claims has card inclusions, such as "Short Description" and "Description" and "Tags". This question relates to how to present a number of Claims, found by a Search, in a nice manner.
Decko offers a variety of views. Of interest here is a merger of the view "titled" (which provides the content of the card, and the title of the card), and "change", which provides the link of card, and who added/edited the card, and when the card was added/edited.
In regards to Claims, I would like to:
1) Show the content of the inclusion "Short Description" of a Claim
2) Provide a title to the above equal to the card name of the Claim (not the name of Claim+Short Description!)
3) Provide a link to the Claim card (for example by clicking on the title)
4) Show who recently added/edited the Claim and when
5) Show the user group of the recent editor (if the editor is part of user group)
I have implemented 1 & 2 by using using the "titled" view. The title however also shows "+Short Description", which is ugly. Using the view "change" provides me with 3 & 4. Is there a vvay to combine those two views?
Results should be seen for example here:
Currently there are two ways to create new "views". I put "views" in quotations because the first way is technically not creating a view, but it has a very similar effect.
I'll give an example of #1. Suppose you have a Claim card called "my claim", and you want to make a custom way to see its data. Since "layout" and "view" already have precise meanings in wagn, I'll call this a "perspective" for now. So you're trying to create a perspective of the data that gives you the five things you listed above.
The trick is to make a virtual card called "my claim+my perspective", which I'll shorten to "mc+mp".
To make this card, we might make a *content rule; let's call it mp+*right+*content. Your five parts might look something like this:
This would still take some tweaking, but that should help you get started!
Thanks Ethan - you are my personal hero!
One follow-up question: are there different kinds of views available for the date when edited?
--Philipp.....Mon Jun 04 21:23:21 +0000 2012
there are not currently, but it's always been our intention to support that.
--Ethan McCutchen.....Mon Jun 04 21:34:22 +0000 2012
How do I get the view that is used in the view "change"?
--Philipp.....Mon Jun 04 21:35:21 +0000 2012
Well, what you describe (a view within a view) is the way it *should* be done, in which case you could wagneer it. Unfortunately that's currently hard-coded in the :change view in ruby code and isn't accessible to wagneers outside of the change view.
perhaps the thing to do is include { _left | change } somewhere in your "perspective" ?
--Ethan McCutchen.....Mon Jun 04 21:40:15 +0000 2012
So instead of what you suggested under 4 :+*when last edited I use _left|change
--Philipp.....Mon Jun 04 21:41:55 +0000 2012