Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Slash.pm's displayStory use the new tag-ui
which required teaching setGetCombinedTags about stoids. Separated out a simplified version of the firehose tag-ui widget; this could probably _become_ the firehose widget if we figure out how to handle the admin parts.
- Loading branch information
Showing
14 changed files
with
160 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
__section__ | ||
default | ||
__description__ | ||
A default tag widget that should work anywhere. | ||
|
||
user | ||
item | ||
key | ||
key_type | ||
__title__ | ||
__page__ | ||
misc | ||
__lang__ | ||
en_US | ||
__name__ | ||
tag_ui_widget | ||
__seclev__ | ||
10000 | ||
__template__ | ||
[% IF user.tags_canread_stories %] | ||
[%# the tag-widget itself %] | ||
<div class="tag-widget-stub body-widget" init="context_timeout:15000"> | ||
|
||
[%# the disclosure triangle %] | ||
<a class="edit-toggle" | ||
[% IF user.tags_canwrite_stories %] href="#" onclick="this.blur(); this.parentNode.toggle_widget(this); return false" | ||
[%- ELSIF user.is_anon %] href="#" onclick="this.blur(); show_login_box(); return false" | ||
[%- ELSE %] href="[% gSkin.rootdir %]/subscribe.pl" | ||
[%- END %]> | ||
<span class="button collapse"></span> | ||
</a> | ||
|
||
[% IF user.tags_canwrite_stories %] | ||
[%# the tag input field %] | ||
<form class="tag-editor" onsubmit="form_submit_tags(this, {fade_remove: 400, order: 'prepend', classes:'not-saved'}); return false"> | ||
<input class="tag-entry" type="text" size="10"> | ||
<span class="tag-server-busy"><img src="[% constants.imagedir %]/spinner[% IF !featured %]2[% END %].gif"></span> | ||
</form> | ||
[% END %] | ||
|
||
[%# the tag 'bars' %] | ||
<div class="tag-display-set train"> | ||
[% IF user.tags_canwrite_stories %] | ||
<div class="tag-display-stub" context="user" init="legend:'my tags'"></div> | ||
[% END %] | ||
[% tags_reader = Slash.getObject('Slash::Tags'); tags = tags_reader.setGetCombinedTags(key, key_type); %] | ||
<div class="tag-display-stub" context="top" init="legend:'top tags'">[% tags.top %]</div> | ||
<div class="tag-display-stub" context="system" init="legend:'system tags'">[% tags.system %]</div> | ||
[%- IF item.type == "story" && | ||
constants.signoff_use && | ||
((user.is_admin && !user.firehose_usermode) || user.acl.signoff_allowed) && | ||
! Slash.db.hasUserSignedStory(item.srcid, user.uid) -%] | ||
<div class="tag-display-stub" context="signoff" init="legend:'signoff', menu:false">unsigned</div> | ||
[%- END -%] | ||
</div> | ||
[% IF user.tags_canwrite_stories %] | ||
[%# the suggestions bar %] | ||
<div class="related"> | ||
<div class="tag-display-stub" context="related" init="legend:'suggestions', menu:false"></div> | ||
</div> | ||
[% END %] | ||
</div> | ||
[% END %] | ||
__version__ | ||
$Id$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
plugins/FireHose/templates/nodnix_capsule;firehose;default
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
__section__ | ||
default | ||
__description__ | ||
__title__ | ||
__page__ | ||
firehose | ||
__lang__ | ||
en_US | ||
__name__ | ||
nodnix_capsule | ||
__seclev__ | ||
10000 | ||
__template__ | ||
[% IF user.tags_canread_stories && !form.skipvote && !options.nothumbs && !skipvote %] | ||
[%# the nod/nix 'capsule' %] | ||
<div class="tags"> | ||
<span id="updown-[% item.id %]" class="vote[% IF vote == 'down' %]ddown[% ELSIF vote == 'up' %]dup[% END %]"> | ||
<a href="#" class="up" title="Vote this item up">+</a> | ||
<a href="#" class="down" title="Vote this item down">-</a> | ||
</span> | ||
</div> | ||
[% END %] | ||
__version__ | ||
$Id$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters