We have a model in our site for Multiple Choice questions, which has 
children helpfully if tongue-stumblingly called MultipleChoiceChoices. 
They're a pretty simple model, just a name (text field) and a boolean 
indicating if they're the correct answer.

I should probably point out here that we're using Hobo 1.3.

Currently, MultipleChoiceChoices aren't editable; if a user doesn't like 
one, they need to delete it and create a new one. We're trying to make them 
editable. I tried at first to do this by adding an edit-in-place field for 
the name in the card, so on the MultipleChoice show page, the choices would 
each be editable in place. 

I tried several varieties of this, but none of them worked:

<def tag="card" for="MultipleChoiceChoice">
  <card class="multiple-choice-choice" param="default" merge>
    <div class="#{this.correct ? 'correct' : 'incorrect'}">
      <header: param>
        <h4 param="heading"><editor ><name/></editor></h4>
        <div param="actions">
          <delete-button label="X" param/>
        </div>
      </header:>
    </div>
  </card>
</def>

Frustrated with this, I went on to just trying to make an edit link in the 
card:

<def tag="card" for="MultipleChoiceChoice">
  <card class="multiple-choice-choice" param="default" merge>
    <div class="#{this.correct ? 'correct' : 'incorrect'}">
      <header: param>
        <h4 param="heading"><name/></h4>
        <div param="actions">
          <a action="edit" param="edit-link">Edit</a>
          <delete-button label="X" param/>
        </div>
      </header:>
    </div>
  </card>
</def>

...but while this puts the text "Edit" on the page, I haven't been able to 
get an actual link. (This is one of the attempts I've made, by no means the 
only one.)

Can anyone push me towards the correct DRYML syntax for either an 
edit-in-place name attribute, or a working edit link? Thanks.

pjm

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/hobousers/-/jgVoLBP5JegJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to