public function get_position_str(Oedipus_Position $position, $is_plural) { switch ($position->get_tile() . $position->get_doubt()) { case "1": return 'should'; break; case "0": return "shouldn't"; break; case "1?": return 'should perhaps'; break; case "0?": return "probably shouldn't"; break; case "1x": $str = "should, (but doesn't believe "; if ($is_plural) { $str .= 'them)'; } else { $str .= 'him/her)'; } return $str; break; case "0x": $str = "shouldn't, (but doesn't believe "; if ($is_plural) { $str .= 'them)'; } else { $str .= 'him/her)'; } return $str; break; } return 'should'; }
public function get_position_tile(Oedipus_Position $position) { // <a href="#" class="position-tile" id="actor1-option1">0</a> if ($this->edit_mode) { $html_tile_link = PublicHTML_URLHelper::get_oo_page_url('Oedipus_TableEditorRedirectScript', array('table_id' => $this->table->get_id(), 'edit_position' => 1, 'position_id' => $position->get_id(), 'position_tile' => $position->get_tile(), 'position_doubt' => $position->get_doubt())); } else { $html_tile_link = new HTMLTags_URL(); $html_tile_link->set_file('#'); } $html_tile = new HTMLTags_A($position->get_tile() . $position->get_doubt()); $html_tile->set_href($html_tile_link); $html_tile->set_attribute_str('class', 'position-tile'); $actor = $position->get_actor(); $html_tile_id = $actor->get_color() . $position->get_tile() . $this->add_q_to_doubt($position->get_doubt()); $html_tile->set_attribute_str('id', $html_tile_id); return $html_tile; }
public function get_position_tile(Oedipus_Position $position, $explanation) { // <a href="#" class="position-tile" id="character1-option1">0</a> if ($this->frame->is_editable()) { $html_tile_link = PublicHTML_URLHelper::get_oo_page_url('Oedipus_EditFrameRedirectScript', array('frame_id' => $this->frame->get_id(), 'edit_position' => 1, 'position_id' => $position->get_id(), 'position_tile' => $position->get_tile(), 'position_doubt' => $position->get_doubt())); if (isset($_GET['edit_frame'])) { $html_tile_link->set_get_variable('return_to_get', 'edit_frame'); } } else { $html_tile_link = new HTMLTags_URL(); $html_tile_link->set_file('#'); } $html_tile = new HTMLTags_A($position->get_tile() . $position->get_doubt()); /** * An explanation for the position is set here in the * title attribute, for the javascript to use as a * cool -tip */ $html_tile->set_attribute_str('title', Oedipus_LanguageHelper::get_possessive($position->get_character()->get_name()) . " Position" . '|' . $explanation); $html_tile->set_href($html_tile_link); $html_tile->set_attribute_str('class', 'position-tile'); $character = $position->get_character(); $html_tile_id = $character->get_color() . $position->get_tile() . $this->add_q_to_doubt($position->get_doubt()); $html_tile->set_attribute_str('id', $html_tile_id); return $html_tile; }