|
24 | 24 | <script type="text/javascript" src="/static/js/moment.min.js"></script> |
25 | 25 | <script type="text/javascript" src="/static/js/angular-moment.min.js"></script> |
26 | 26 | <script type="text/javascript" src="/static/js/angular-resource.min.js"></script> |
| 27 | + <script type="text/javascript" src="/static/js/angular-ui-router.min.js"></script> |
27 | 28 | <script type="text/javascript" src="/static/js/truncate.js"></script> |
28 | 29 | <script type="text/javascript" src="/static/js/app.js"></script> |
| 30 | + <script type="text/javascript" src="/static/js/routes.js"></script> |
| 31 | + <script type="text/javascript" src="/static/js/error-handler.js"></script> |
| 32 | + <script type="text/javascript" src="/static/js/bsod.controller.js"></script> |
| 33 | + <script type="text/javascript" src="/static/js/search.controller.js"></script> |
| 34 | + <script type="text/javascript" src="/static/js/stats.controller.js"></script> |
| 35 | + <script type="text/javascript" src="/static/js/user.controller.js"></script> |
29 | 36 | <script type="text/javascript" src="/static/js/services.js"></script> |
| 37 | + <script type="text/javascript" src="/static/js/event-octicon.js"></script> |
30 | 38 | <script type="text/javascript" src="/static/js/ui-bootstrap-tpls-0.14.3.min.js"></script> |
31 | 39 |
|
32 | 40 | <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> |
|
36 | 44 | <![endif]--> |
37 | 45 | </head> |
38 | 46 |
|
39 | | - <body role="document" ng-controller="UserController"> |
| 47 | + <body role="document"> |
40 | 48 | <!-- "Fork me" ribbon --> |
41 | 49 | <div class="github-fork-ribbon-wrapper right"> |
42 | 50 | <div class="github-fork-ribbon"> |
|
89 | 97 | </ul> |
90 | 98 | </li> |
91 | 99 | </ul> |
92 | | - <form name="userForm" class="navbar-form navbar-right" ng-submit="setUser()"> |
| 100 | + <form class="navbar-form navbar-right" |
| 101 | + ng-controller="SearchController as search" |
| 102 | + ng-submit="search.doSearch()" |
| 103 | + > |
93 | 104 | <div class="form-group"> |
94 | 105 | <label for="query" class="sr-only">GitHub Username</label> |
95 | | - <input type="text" ng-model="username" |
96 | | - class="form-control" id="query" placeholder="GitHub User"> |
| 106 | + <input type="text" |
| 107 | + ng-model="search.username" |
| 108 | + class="form-control" id="query" |
| 109 | + placeholder="GitHub User"> |
97 | 110 | </div> |
98 | | - <button id="submit-button" type="submit" class="btn btn-primary">Search</button> |
| 111 | + <button id="submit-button" type="submit" |
| 112 | + class="btn btn-primary"> |
| 113 | + Search |
| 114 | + </button> |
99 | 115 | </form> |
100 | 116 | </div><!--/.nav-collapse --> |
101 | 117 | </div> |
102 | 118 | </nav> |
103 | 119 |
|
104 | | - <div class="container" role="main" ng-hide="processing" ng-cloak> |
105 | | - <div class="well" ng-hide="processed || username"> |
106 | | - <h3>Search for a user above to begin</h3> |
107 | | - </div> |
108 | | - |
109 | | - <div class="alert alert-danger" role="alert" |
110 | | - ng-show="processed && !hasResults"> |
111 | | - <span class="glyphicon glyphicon-exclamation-sign pull-right" aria-hidden="true"></span> |
112 | | - <strong>No results for {{ processedUsername }}.</strong> |
113 | | - </div> |
114 | | - |
115 | | - <div class="well" ng-show="hasResults"> |
116 | | - <h4> |
117 | | - <span class="mega-octicon octicon-person"></span> |
118 | | - <a href="{{userUrl}}"> |
119 | | - <strong>{{processedUsername}}</strong> |
120 | | - </a> |
121 | | - made |
122 | | - <strong>{{eventCount}}</strong> contributions |
123 | | - to |
124 | | - <strong>{{repos.length}}</strong> repositories |
125 | | - </h4> |
126 | | - </div> |
127 | | - |
128 | | - <div id="results" ng-show="hasResults" class="row"> |
129 | | - <div class="col-md-12"> |
130 | | - <ul class="nav nav-pills"> |
131 | | - <li role="presentation" ng-class="{active: isCurrentTab(tabs.repoList)}"> |
132 | | - <a ng-click="setCurrentTab(tabs.repoList)" href>Repositories</a> |
133 | | - </li> |
134 | | - <li role="presentation" ng-class="{active: isCurrentTab(tabs.eventList)}"> |
135 | | - <a ng-click="setCurrentTab(tabs.eventList)" href>Events</a> |
136 | | - </li> |
137 | | - </ul> |
138 | | - |
139 | | - <div style="margin-top:.5em"> |
140 | | - <!-- Repositories --> |
141 | | - <ul class="list-group" ng-show="isCurrentTab(tabs.repoList)"> |
142 | | - <li class="list-group-item" ng-repeat="repo in repos"> |
143 | | - <a href="https://github.com/{{repo}}">{{ repo }}</a> |
144 | | - </li> |
145 | | - </ul> |
146 | | - |
147 | | - <!-- Events result table --> |
148 | | - <div ng-show="isCurrentTab(tabs.eventList)"> |
149 | | - |
150 | | - <uib-pagination ng-model="currentEventPage" |
151 | | - total-items="eventCount" |
152 | | - ng-change="eventPageChanged()" |
153 | | - max-size="10" items-per-page="eventPageSize" |
154 | | - boundary-links="true" |
155 | | - previous-text="‹" next-text="›" |
156 | | - first-text="«" last-text="»"> |
157 | | - </uib-pagination> |
158 | | - |
159 | | - <div style="text-align:center" ng-show="loadingEvents"> |
160 | | - <img src="/static/img/gps.svg" /> |
161 | | - </div> |
162 | | - |
163 | | - <table ng-hide="loadingEvents" class="table table-striped"> |
164 | | - <thead> |
165 | | - <th> |
166 | | - <!-- event type --> |
167 | | - </th> |
168 | | - <th> |
169 | | - <span class="octicon octicon-calendar"></span> |
170 | | - </th> |
171 | | - <th> |
172 | | - <span class="octicon octicon-repo"></span> |
173 | | - </th> |
174 | | - <th> |
175 | | - <span class="octicon octicon-person"></span> |
176 | | - </th> |
177 | | - <th> |
178 | | - <!-- description --> |
179 | | - </th> |
180 | | - </thead> |
181 | | - <tbody> |
182 | | - |
183 | | - <tr ng-repeat="event in events"> |
184 | | - <td> |
185 | | - <span event-octicon ng-model="event.type"></span> |
186 | | - </td> |
187 | | - <td title=""> |
188 | | - <time am-time-ago="event.created_at"></time> |
189 | | - </td> |
190 | | - <td style="white-space:nowrap"> |
191 | | - <a href="https://github.com/{{event.repo}}"> |
192 | | - {{ event.repo }} |
193 | | - </a> |
194 | | - </td> |
195 | | - <td> |
196 | | - <a href="{{userUrl}}">{{processedUsername}}</a> |
197 | | - </td> |
198 | | - <td ng-switch on="event.type"> |
199 | | - |
200 | | - <span ng-switch-when="GollumEvent"> |
201 | | - <span ng-if="event.pages.length > 1"> |
202 | | - edited multiple Wiki pages: |
203 | | - <ul> |
204 | | - <li ng-repeat="page in event.pages"> |
205 | | - {{ page.action }} the page |
206 | | - <a href="{{page.html_url}}">{{page.title}}</a> |
207 | | - (<a href="{{page.html_url}}/_history">history</a>) |
208 | | - </li> |
209 | | - </ul> |
210 | | - </span> |
211 | | - <span ng-if="event.pages.length == 1"> |
212 | | - {{ event.pages[0].action }} the page |
213 | | - <a href="{{event.pages[0].html_url}}">{{event.pages[0].title}}</a> |
214 | | - (<a href="{{event.pages[0].html_url}}/_history"> |
215 | | - history |
216 | | - </a>) |
217 | | - </span> |
218 | | - </span> |
219 | | - |
220 | | - <span ng-switch-when="IssuesEvent"> |
221 | | - {{ event.action }} |
222 | | - <a href="https://github.com/{{event.repo}}/issues/{{event.issue_number}}"> |
223 | | - issue {{ event.issue_number }} |
224 | | - </a> |
225 | | - </span> |
226 | | - |
227 | | - <span ng-switch-when="PushEvent"> |
228 | | - pushed |
229 | | - <ng-pluralize count="event.distinct_commit_count" |
230 | | - when="{'1': 'a commit', 'other': '{} commits'}"> |
231 | | - </ng-pluralize> |
232 | | - to |
233 | | - <a href="https://github.com/{{event.repo}}/commits/{{event.head}}">{{event.ref}} ({{ event.head | limitTo : 7 }})</a> |
234 | | - </span> |
235 | | - |
236 | | - <span ng-switch-when="CommitCommentEvent"> |
237 | | - <a href="{{event.html_url}}">commented</a> |
238 | | - on |
239 | | - <a href="https://github.com/{{event.repo}}/commits/{{event.commit_id}}"> |
240 | | - commit {{ event.commit_id | limitTo : 7 }} |
241 | | - </a> |
242 | | - {{event.path}}: |
243 | | - <a href="{{event.html_url}}"> |
244 | | - {{event.body | characters:20: false}} |
245 | | - </a> |
246 | | - </span> |
247 | | - |
248 | | - <span ng-switch-when="ReleaseEvent"> |
249 | | - released tag |
250 | | - <a href="https://github.com/{{event.repo}}/releases/tag/{{event.tag_name}}"> |
251 | | - {{ event.tag_name }} |
252 | | - </a> |
253 | | - </span> |
254 | | - |
255 | | - <span ng-switch-when="PublicEvent"> |
256 | | - open-sourced <a href="https://github.com/{{event.repo}}">{{event.repo}}</a>! |
257 | | - </span> |
258 | | - |
259 | | - <span ng-switch-when="MemberEvent"> |
260 | | - {{ event.target_action }} |
261 | | - <a href="https://github.com/{{event.target_user}}"> |
262 | | - {{event.target_user}} |
263 | | - </a> to |
264 | | - <a href="https://github.com/{{event.repo}}"> |
265 | | - {{event.repo}} |
266 | | - </a> |
267 | | - </span> |
268 | | - |
269 | | - <span ng-switch-when="IssueCommentEvent"> |
270 | | - <a href="{{event.comment_url}}">commented</a> |
271 | | - on |
272 | | - <a href="{{event.issue_url}}">issue {{event.issue_number}}</a> |
273 | | - </span> |
274 | | - |
275 | | - <span ng-switch-default> |
276 | | - {{ event.type }} WTF? |
277 | | - </span> |
278 | | - </td> |
279 | | - </tr> |
280 | | - |
281 | | - </tbody> |
282 | | - </table> |
283 | | - |
284 | | - <uib-pagination ng-model="currentEventPage" |
285 | | - total-items="eventCount" |
286 | | - ng-change="eventPageChanged()" |
287 | | - max-size="10" items-per-page="eventPageSize" |
288 | | - boundary-links="true" |
289 | | - previous-text="‹" next-text="›" |
290 | | - first-text="«" last-text="»"> |
291 | | - </uib-pagination> |
292 | | - </div> |
293 | | - |
294 | | - </div> |
295 | | - |
296 | | - </div> |
297 | | - </div> <!-- /results --> |
298 | | - |
| 120 | + <div class="container" |
| 121 | + role="main" |
| 122 | + ng-cloak> |
| 123 | + <div ui-view></div> |
299 | 124 | </div> <!-- /container --> |
300 | 125 |
|
301 | | - <div id="loader" ng-show="processing" class="tetrominos" ng-cloak> |
302 | | - <div class="tetromino box1"></div> |
303 | | - <div class="tetromino box2"></div> |
304 | | - <div class="tetromino box3"></div> |
305 | | - <div class="tetromino box4"></div> |
306 | | - </div> |
307 | | - |
308 | 126 | <nav class="navbar navbar-inverse navbar-fixed-bottom" |
309 | 127 | ng-controller="StatisticsController" ng-cloak> |
310 | 128 | <div class="container" ng-show="retrieved"> |
@@ -332,23 +150,5 @@ <h4> |
332 | 150 | 'dimension1': clientAddr |
333 | 151 | }); |
334 | 152 | </script> |
335 | | - |
336 | | - <script type="text/ng-template" id="bsod.html"> |
337 | | - <div class="bsod"> |
338 | | - <div style="text-align: center"> |
339 | | - <span class="bsod-title">Windows</span> |
340 | | - </div> |
341 | | - <p>An error has occured. To continue:</p> |
342 | | - <p>Press Enter to return to Windows, or</p> |
343 | | - <p>Press CTRL_ALT_DEL to restart your computer. If you do this, you will lose any unsaved information in all open applications.</p> |
344 | | - <p>Error: {{ $root.errorDescription }}</p> |
345 | | - <div>Press any key to continue</div> |
346 | | - <div class="text-right"> |
347 | | - <button class="btn-primary" type="button" ng-click="ok()"> |
348 | | - Any Key |
349 | | - </button> |
350 | | - </div> |
351 | | - </div> |
352 | | - </script> |
353 | 153 | </body> |
354 | 154 | </html> |
0 commit comments