Parent: [98e8d3] (diff)

Child: [9bed1e] (diff)

Download this file

project_overview.html    215 lines (209 with data), 10.8 kB

  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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
{% extends g.theme.master %}
{% block title %}{{c.project.name}} / Overview{% endblock %}
{% block header %}Project Admin{% endblock %}
{% block content %}
{% if c.project.deleted %}
<div class="notice">This project has been deleted and is not visible to non-admin users</div>
{% endif %}
{% if not h.has_project_access('update')() %}
<form>
<ol>
<li>
<label>Name:</label>
{{c.project.name}}
</li>
<hr class="clear clearfix" />
<li>
<label>Shortname:</label>
{{c.project.shortname}}
</li>
<hr class="clear clearfix" />
<li>
<label>Category:</label>
{{c.project.category and c.project.category.label or 'Uncategorized'}}
</li>
<hr class="clear clearfix" />
<li>
<label>Icon:</label>
{% if c.project.icon %}
<img src="{{c.project.url()}}icon"/>
{% else %}
<span>&nbsp;</span>
{% endif %}
</li>
<hr class="clear clearfix" />
<li>
<label>Summary:</label>
<pre>{{c.project.short_description}}</pre>
</li>
<hr class="clear clearfix" />
<li>
<label>Description:</label>
{{c.project.description_html|safe}}
</li>
<hr class="clear clearfix" />
<li>
<label>Screenshots:</label>
{% for ss in c.project.get_screenshots() %}
<a href="{{c.project.url()}}screenshot/{{ss.filename}}"><img src="{{c.project.url()}}screenshot/{{ss.filename}}/thumb" style="margin-right: 1em"/></a>
{% else %}
No screenshots have been created.
{% endfor %}
</li>
</ol>
</form>
{% else %} {# has_project_access('update') #}
<form method="POST" action="update" enctype="multipart/form-data">
<ol>
<li>
<div class="row dual">
<div class="column" style="margin-right:0">
<label for="name"
title="This is the publicly viewable name of the project, and will appear on project listings.
It should be what you want to see as the project title in search listing.">Name:</label>
</div>
<div class="column grid_10" style="margin-left:0">
<div class="editable viewing">
<div class="viewer">{{c.project.name}}</div>
<div class="editor"><input type="text" name="name" value="{{c.project.name}}"/></div>
</div>
</div>
</div>
</li>
<hr class="clear clearfix" />
<li>
<label>Shortname:</label>
{{c.project.shortname}}
</li>
<hr class="clear clearfix" />
<li>
<div class="row dual">
<div class="column" style="margin-right:0">
<label for="category" title="This will determine which pages you appear under in the SourceForge Directory.">Category:</label>
</div>
<div class="column grid_10" style="margin-left:0">
<div class="editable viewing">
<div class="viewer">{{c.project.category and c.project.category.label or 'Uncategorized'}}</div>
<div class="editor">
<select name="category">
<option value="">Uncategorized</option>
{% for cat in categories %}
<option value="{{cat._id}}" {% if c.project.category and c.project.category._id == cat._id %}selected="selected"{% endif%}>{{cat.label}}</option>
{% for subcat in cat.subcategories %}
<option value="{{subcat._id}}" {% if c.project.category and c.project.category._id == subcat._id %}selected="selected"{% endif %}>-- {{subcat.label}}</option>
{% endfor %}
{% endfor %}
</select>
</div>
</div>
</div>
</div>
</li>
<hr class="clear clearfix" />
<li>
<div class="row dual">
<div class="column" style="margin-right:0">
<label for="icon"
title="This is the icon that will appear on your project header and search results.
For best appearance, use a square image with a transparent background.">Icon:</label>
</div>
<div class="column grid_10" style="margin-left:0">
<div class="editable viewing">
{% if c.project.icon %}
<div class="viewer"><img src="{{c.project.url()}}/icon"/></div>
{% else %}
<div class="viewer">No icon has been created.</div>
{% endif %}
<div class="editor">{{lib.file_field('icon', '')}}</div>
</div>
{% if c.project.icon %}
<div>
<input type="submit" name="delete_icon" value="Delete Icon"
class="ui-state-default ui-button ui-button-text clear clearfix"/>
</div>
{% endif %}
</div>
</div>
</li>
<hr class="clear clearfix" />
<li>
<div class="row dual">
<div class="column" style="margin-right:0">
<label for="short_description"
title="This is a text only project summary which will be included on search results and project listings.
Typically this is one or two sentences describing the project, and is plain text.">Summary:</label>
</div>
<div class="column grid_10" style="margin-left:0">
<div class="editable viewing">
<div class="viewer"><div data-prompt="Write a brief summary of your project">{{c.project.short_description}}</div></div>
<div class="editor multiline"><textarea name="short_description" id="short_description_textarea" style="width: 95%; height: 100px;">{{c.project.short_description}}</textarea></div>
</div>
</div>
</div>
</li>
<hr class="clear clearfix" />
<li>
<div class="row dual">
<div class="column" style="margin-right:0">
<label for="description"
title='This is the contents of the front page, and uses the markdown/HTML syntax similar to the wiki.
This can be as long as you need it to be.'>Home Page:</label>
</div>
<div class="column grid_10" style="margin-left:0">
{{c.markdown_editor.display(name='description', value=c.project.description)}}
</div>
</div>
</li>
<hr class="clear clearfix" />
<li>
<div class="row dual">
<div class="column" style="margin-right:0">
<label for="labels"
title="Free-form labels to describe your project.
These can be used to search for similar projects.">Labels:</label>
</div>
<div class="column grid_10" style="margin-left:0">
<div class="editable viewing">
<div class="viewer">{{c.project.labels and ', '.join(c.project.labels) or "No Labels"}}</div>
<div class="editor">{{c.label_edit.display(name='labels', value=c.project.labels)}}</div>
</div>
</div>
</div>
</li>
<hr class="clear clearfix" />
<!-- <li>
<label for="screenshot">Screenshots:</label>
<div class="editable viewing">
<div class="viewer">
{% for ss in c.project.get_screenshots() %}
<a href="{{c.project.url()}}screenshot/{{ss.filename}}"><img src="{{c.project.url()}}screenshot/{{ss.filename}}/thumb" style="margin-right: 1em"/></a>
{% else %}
No screenshots have been created.
{% endfor %}
</div>
<div class="editor multiline">{{lib.file_field('screenshot', 'File')}}</div>
</div>
</li>
<hr class="clear clearfix" /> -->
<li>
<label>&nbsp;</label>
<input type="submit" value="Save"
/>
{% if not c.project.deleted %}
<input type="submit" value="Delete Project" name="delete" />
{% elif config.get('auth.method', 'local') != 'sfx' %}
<input type="submit" value="Undelete Project" name="undelete" />
{% endif %}
</li>
</ol>
</form>
{% endif %}
{% endblock %}
{% block extra_js %}
<script type="text/javascript" src="{{g.forge_static('js/jquery.maxlength-min.js')}}"/>
<script type="text/javascript">
$(document).ready(function(){
$('#short_description_textarea').maxlength({maxCharacters: 250});
});
</script>
{% endblock %}