/
stream_editor.html
executable file
·182 lines (157 loc) · 10.7 KB
/
stream_editor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
{% extends "template.html" %}
{% block title %}SudoSocial Stream Editor{% endblock %}
{% block sidebar %}
<ul id="stream-nav" class="nav">
<li>New Stream</li>
<li>All Streams</li>
</ul>
<p><b>Note:</b> Deleting a feed will remove all of it's entries.</p>
{% endblock %}
{% block content %}
<h1>Stream Editor</h1>
<div id="stream-editor-panel">
<ul class="tabs">
<li id="edit-stream" class="tab editor"><a href="#">Edit </a><strong>{{stream.name}}</strong> Stream</li>
<li id="design-stream" class="tab design xactive-tab"><a href="#">Design</a></li>
<li id="page-widgets" class="tab pagewidget active-tab"><a href="#">Page Widgets</a></li>
<li><a id="preview" href="/u/{{username}}/s/{{stream.name}}" target="_new" title="View your currenly published Stream in a new window">View</a></li>
</ul>
<!--------------------- Edit Stream Panel ------------------------->
<div id="edit-stream-panel" class="panel">
<h2 class="new-feed">Add A Source</h2>
<p>Paste in the Url to a website or any Atom or RSS feed <img src="/static/img/feed-icon-14x14.png" width="14" height="14" alt="Feed Icon" />.</p>
<form id="add-url-form" action="/manage/urls/{{request.user.username}}" method="post">
<p><label for="id_url">Url:</label> <input id="id_url" type="text" name="url" maxlength="2048" /></p>
<p><label for="id_streams">Streams:</label>
<input type="hidden" name="streams" id="id_streams" value="home" /></p>
<input type="submit" value="Add Feed" />
</form>
<h2>Stream Sources</h2>
<ul id="user_streams">
{% for feed in feeds %}
<li>
<a href="{{ feed.url }}" class="stream-feed-source"> {% if feed.title %}{{ feed.title }}{% else %} {{ feed.url }} {% endif %}</a>
<div class="feed-entries-visible-default {% if feed.entries_visible_default %}.shown{% else %}.hidden{% endif %}"
title="New Items are {% if feed.entries_visible_default %} shown automatically {% else %} hidden until shown individually {% endif %}">
</div>
{% if not feed.enabled %} <strong title="{{feed.disabled_reason}}">Disabled</strong>{% endif %}
<!--a href="../url/{{username}}/{{feed.pk}}">Edit</a -->
<a href="{{ feed.pk }}" class="feed-delete" title="Delete this feed.">Delete</a>
</li>
{% empty %}
<li id="no-stream-feed-blurb"><a href="#" class="stream-feed-source"></a><a href="{{ feed.pk }}" class="feed-delete" title="Delete this feed."></a>You have no stream sources, add a new feed.</li>
{% endfor %}
<li id="base-stream-feed-link" style="display:none"><a href="{{ feed.url }}" class="stream-feed-source">sample</a>
<div class="feed-entries-visible-default shown" title="New Items are shown automatically"></div>
<a href="#" class="feed-delete" title="Delete this feed.">Delete</a></li>
</ul>
<p>After 5 minutes, Feed entries should start appearing in <a href="/u/{{username}}/s/{{stream.name}}" target="_new" title="View your currenly published Stream in a new window">your stream.</a></p>
<h2>Stream Items</h2>
<div id="stream-preview">
<hr />
{% for entry, entry_html in entry_pair %}
<div class='feed-entry'>
<a class="display_entry {% if entry.visible %}entry-visible{% else %}entry-hidden{% endif %}" href="/manage/entry/{{ entry.id }}">{% if entry.visible %}Hide Entry{% else %} Show Entry {% endif %}</a>
{{ entry_html }}
</div>
{% empty %}
<div class='default'>Bummer, No Entries</div>
{% endfor %}
</div><!-- /stream-preview -->
</div><!-- /edit-stream-panel -->
<!--------------------- Page Widgets Panel ------------------------->
<div id="page-widgets-panel" class="panel">
<h2>Page Widgets</h2>
<p>In addition to a stream, this profile page can have other pieces content.</p>
<form id="manage-page-widgets" action="/manage/page/{{page_name}}" method="post">
<input id="page_name" type="hidden" value="{{page_name}}" />
<div class="optional-widget">
<a class="add-widget optional-text-widget {% if not page_props.before_profile_html_area %}active{% endif %}" href="#">Add Custom HTML</a>
<div class="field optional-text-widget {% if page_props.before_profile_html_area %}active{% endif %}">
<label for="before_profile_html_area">Before Profile Custom HTML</label>
<p class="help">Custom HTML or text that should show up before the profile. Most tags supported.</p>
<textarea id="before_profile_html_area" name="before_profile_html_area">{{page_props.before_profile_html_area|safe}}</textarea>
</div><!-- /field -->
</div><!-- /optional-widget -->
<fieldset><legend>Profile</legend>
<div class="profile">
<img src="{{gravatar}}" />
</div>
<span class="checkbox-label">Display:</span>
<label for="show_profile_blurb" class="checkbox">Profile Blurb</label>
<input id="show_profile_blurb" name="show_profile_blurb" type="checkbox" checked=checked />
<label for="show_follow_me_links" class="checkbox">Follow Me Links</label>
<input id="show_follow_me_links" name="show_follow_me_links" type="checkbox" checked=checked />
</fieldset>
<div class="optional-widget">
<a class="add-widget optional-text-widget {% if not page_props.after_profile_html_area %}active{% endif %}" href="#">Add Custom HTML</a>
<div class="field optional-text-widget {% if page_props.after_profile_html_area %}active{% endif %}">
<label for="after_profile_html_area">After Profile Custom HTML</label>
<p class="help">Custom HTML or text that should show up after the profile. Most tags supported.</p>
<textarea id="after_profile_html_area" name="after_profile_html_area">{{page_props.after_profile_html_area|safe}}</textarea>
</div><!-- /field -->
</div><!-- /optional-widget -->
<div class="optional-widget">
<a class="add-widget optional-text-widget {% if not page_props.before_stream_html_area %}active{% endif %}" href="#">Add Custom HTML</a>
<div class="field optional-text-widget {% if page_props.before_stream_html_area %}active{% endif %}">
<label for="before_stream_html_area">Before Stream Custom HTML</label>
<p class="help">Custom HTML or text that should show up before your stream.</p>
<textarea id="before_stream_html_area" name="before_stream_html_area">{{page_props.before_stream_html_area|safe}}</textarea>
</div><!-- /field -->
</div><!-- /optional-widget -->
<div class="stream-icon">
<h3>Your {{stream.name}} Stream</h3>
<img src="/static/img/StreamDiagram_25perc.jpg" width="76" height="95" />
</div>
<div class="optional-widget">
<a class="add-widget optional-text-widget {% if not page_props.after_stream_html_area %}active{% endif %}" href="#">Add Custom HTML</a>
<div class="field optional-text-widget {% if page_props.after_stream_html_area %}active{% endif %}">
<label for="after_stream_html_area">After Streamm Custom HTML</label>
<p class="help">Custom HTML or text that should show up after the stream.</p>
<textarea id="after_stream_html_area" name="after_stream_html_area">{{page_props.after_stream_html_area}}</textarea>
</div><!-- /field -->
</div><!-- /optional-widget -->
<input type="submit" id="page-widget-save" name="page-widget-save" value="save" />
</form>
</div>
<!--------------------- Design Stream Panel ------------------------->
<div id="design-stream-panel" class="panel">
<form id="design-form" action="/manage/stream/design" method="post">
<div class="save"><input type="submit" id="design-submit1" value="Save" /></div>
<h2>CSS override</h2>
<p>Put up a CSS file anywhere on the internet, and you can take control of your design</p>
<input type="radio" id="css_type_default" name="css_type" value="default" {% ifequal preferences.css_url 'default' %} checked="checked" {% endifequal %} />
<label for="css_type_default">Default</label>
<input type="radio" id="css_type_url" name="css_type" value="my_url" {% ifnotequal preferences.css_url 'default' %} checked="checked" {% endifnotequal %} />
<label for="css_type_default">Custom</label>
<label for="css_url">URL</label>
<input type="url" id="css_url" name="css_url" value="{% ifnotequal preferences.css_url 'default' %}{{preferences.css_url}}{% endifnotequal %}" />
<h2>JavaScript override</h2>
<p>Put up a JS file anywhere on the internet, and you can take control of the behavior of your stream</p>
<input type="radio" id="js_type_default" name="js_type" value="default" {% ifequal preferences.javascript_url 'default' %} checked="checked" {% endifequal %} />
<label for="js_type_default">Default:</label>
<input type="radio" id="js_type_url" name="js_type" value="my_url" {% ifnotequal preferences.javascript_url 'default' %} checked="checked" {% endifnotequal %} />
<label for="js_type_url">Custom url:</label>
<input type="url" id="js_url" name="js_url" value="{% ifnotequal preferences.javascript_url 'default' %}{{preferences.javascript_url}}{% endifnotequal %}" />
<h2>Processing.js</h2>
<p><a href="http://processing.org">Processing</a> is a creative environment for hacking your stream.
<a href="http://processingjs.org">Processing.js</a> brings this generative power to the web. Paste your Processing code in below,
and it will paint the <code>processing-canvas</code> canvas behind your stream.</p>
<textarea id="processing" name="processing" cols="80" rows="30">{{preferences.processing_js}}</textarea>
<div class="save"><input type="submit" id="design-submit2" value="Save" /></div>
</form>
</div><!-- /design-stream -->
</div><!-- /stream-editor-panel -->
<div id="other-sources-panel">
<h2>Unused Sources</h2>
<ul id="user_other_feeds">
{% for feed in unused_feeds %}
<li><a href="{{ feed.url }}" class="other-feed-source"> {{ feed.url }}</a> [<a href="{{ feed.pk }}" class="feed-delete">x</a>]</li>
{% empty %}
<li>All of your Sources are used in this "{{stream.name}}" stream.</li>
{% endfor %}
</ul>
</div><!-- /other-sources-panel -->
<script src="/static/js/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="/static/js/stream_editor.js" type="text/javascript"></script>
{% endblock %}