projects
/
Sone.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ac92629
)
Add permalinks for posts and authors.
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Thu, 14 Apr 2011 18:39:11 +0000
(20:39 +0200)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Thu, 14 Apr 2011 18:39:11 +0000
(20:39 +0200)
This fixes #136.
src/main/resources/i18n/sone.en.properties
patch
|
blob
|
history
src/main/resources/static/css/sone.css
patch
|
blob
|
history
src/main/resources/static/javascript/sone.js
patch
|
blob
|
history
src/main/resources/templates/include/viewPost.html
patch
|
blob
|
history
src/main/resources/templates/include/viewReply.html
patch
|
blob
|
history
diff --git
a/src/main/resources/i18n/sone.en.properties
b/src/main/resources/i18n/sone.en.properties
index
e726ccb
..
06d036a
100644
(file)
--- a/
src/main/resources/i18n/sone.en.properties
+++ b/
src/main/resources/i18n/sone.en.properties
@@
-224,6
+224,8
@@
View.Sone.Status.Downloading=This Sone is currently being downloaded.
View.Sone.Status.Inserting=This Sone is currently being inserted.
View.Post.UnknownAuthor=(unknown)
View.Sone.Status.Inserting=This Sone is currently being inserted.
View.Post.UnknownAuthor=(unknown)
+View.Post.Permalink=link post
+View.Post.PermalinkAuthor=link author
View.Post.Bookmarks.PostIsBookmarked=Post is bookmarked, click to remove from bookmarks
View.Post.Bookmarks.PostIsNotBookmarked=Post is not bookmarked, click to bookmark
View.Post.DeleteLink=Delete
View.Post.Bookmarks.PostIsBookmarked=Post is bookmarked, click to remove from bookmarks
View.Post.Bookmarks.PostIsNotBookmarked=Post is not bookmarked, click to bookmark
View.Post.DeleteLink=Delete
diff --git
a/src/main/resources/static/css/sone.css
b/src/main/resources/static/css/sone.css
index
f6bb62d
..
2621b50
100644
(file)
--- a/
src/main/resources/static/css/sone.css
+++ b/
src/main/resources/static/css/sone.css
@@
-266,6
+266,10
@@
textarea {
display: inline;
}
display: inline;
}
+#sone .permalink {
+ display: inline;
+}
+
#sone .post .bookmarks {
display: inline;
color: rgb(28, 131, 191);
#sone .post .bookmarks {
display: inline;
color: rgb(28, 131, 191);
diff --git
a/src/main/resources/static/javascript/sone.js
b/src/main/resources/static/javascript/sone.js
index
8065b73
..
eb8fc74
100644
(file)
--- a/
src/main/resources/static/javascript/sone.js
+++ b/
src/main/resources/static/javascript/sone.js
@@
-1692,6
+1692,11
@@
$(document).ready(function() {
ajaxifyNotification($(this));
});
ajaxifyNotification($(this));
});
+ /* disable all permalinks. */
+ $(".permalink").click(function() {
+ return false;
+ });
+
/* activate status polling. */
setTimeout(getStatus, 5000);
/* activate status polling. */
setTimeout(getStatus, 5000);
diff --git
a/src/main/resources/templates/include/viewPost.html
b/src/main/resources/templates/include/viewPost.html
index
4be1bcc
..
40fa891
100644
(file)
--- a/
src/main/resources/templates/include/viewPost.html
+++ b/
src/main/resources/templates/include/viewPost.html
@@
-41,6
+41,10
@@
</form>
</div>
<span class='separator'>·</span>
</form>
</div>
<span class='separator'>·</span>
+ <div class="permalink"><a href="post://<%post.id|html>">[<%= View.Post.Permalink|l10n|html>]</a></div>
+ <span class='separator'>·</span>
+ <div class="permalink"><a href="sone://<%post.sone.id|html>">[<%= View.Post.PermalinkAuthor|l10n|html>]</a></div>
+ <span class='separator'>·</span>
<div class="time"><a href="viewPost.html?post=<% post.id|html>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
<%if ! originalText|match key=parsedText>
<span class='separator'>·</span>
<div class="time"><a href="viewPost.html?post=<% post.id|html>"><% post.time|date format="MMM d, yyyy, HH:mm:ss"></a></div>
<%if ! originalText|match key=parsedText>
<span class='separator'>·</span>
diff --git
a/src/main/resources/templates/include/viewReply.html
b/src/main/resources/templates/include/viewReply.html
index
5dc26fb
..
c5b087d
100644
(file)
--- a/
src/main/resources/templates/include/viewReply.html
+++ b/
src/main/resources/templates/include/viewReply.html
@@
-14,6
+14,8
@@
<div class="reply-text text<%if raw> hidden<%/if>"><% parsedText></div>
</div>
<div class="reply-status-line status-line">
<div class="reply-text text<%if raw> hidden<%/if>"><% parsedText></div>
</div>
<div class="reply-status-line status-line">
+ <div class="permalink"><a href="sone://<%reply.sone.id|html>">[<%= View.Post.PermalinkAuthor|l10n|html>]</a></div>
+ <span class='separator'>·</span>
<div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
<%if ! originalText|match key=parsedText>
<span class='separator'>·</span>
<div class="time"><% reply.time|date format="MMM d, yyyy, HH:mm:ss"></div>
<%if ! originalText|match key=parsedText>
<span class='separator'>·</span>