Changeset 189
- Timestamp:
- 12/26/10 19:52:01 (13 years ago)
- Location:
- server/trunk/web
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Chat.pm
r156 r189 27 27 my ( $self, $c ) = @_; 28 28 29 $c->stash->{template} = 'chat/index.html'; 30 if (my $cmd = $c->req->param('cmd')) { 31 $c->forward('message', [ 32 [{ 33 distribution => $c->req->param('distribution') || undef, 34 release => $c->req->param('release') || undef, 35 arch => $c->req->param('arch') || undef, 36 max_line => 30, 37 no_paste => 1, 38 }], $cmd ]); 39 } 29 40 30 41 } … … 45 56 my @contexts = grep { $_ } ( 46 57 $c->user_exists 47 ? ( 'default', 48 (ref $contexts 49 ? (@$contexts) 50 : ($contexts) 51 ), 52 ) 53 : () 58 ? ( 'default' ) 59 : (), 60 (ref $contexts 61 ? (@$contexts) 62 : ($contexts) 63 ), 54 64 ); 55 65 56 66 foreach my $co (@contexts) { 67 warn $co; 57 68 if (ref($co) eq 'HASH') { 58 69 foreach (keys %$co) { 70 warn $_; 59 71 $reqspec->{$_} = $co->{$_}; 60 72 } -
server/trunk/web/lib/Sophie/Controller/Chat/Cmd.pm
r170 r189 43 43 } 44 44 45 if ($needpaste ) {45 if ($needpaste && !$reqspec->{nopaste}) { 46 46 my $id = $c->forward('/chat/paste', [ 'Bot paste', join("\n", @backup) ]); 47 47 if ($id) { -
server/trunk/web/root/static/sophie.css
r176 r189 197 197 } 198 198 199 div#sophie_bot_reply { 200 padding: 1em; 201 border: solid; 202 } 203 199 204 .sophie_help h2 { 200 205 font-size: 1.2em; -
server/trunk/web/root/templates/html/chat/index.html
r145 r189 1 1 <!-- $Id$ --> 2 3 <div style="float: left; width: 35%"> 4 <form id="botform" action="[% c.uri_for('/chat') %]"> 5 <div id="distribselect"> 6 [% INCLUDE 'ajax/forms/distribselect.tt' %] 7 </div> 8 [% c.prototype.observe_form('botform', 9 { 10 url => c.uri_for('/ajax/forms/distribselect', { 11 'ajax' => 1 }), 12 frequency => 2, 13 update => 'distribselect', 14 } 15 ) %] 16 <input name="cmd" value="[% c.req.param('cmd') | html %]"> 17 <input type="submit"> 18 </form> 19 </div> 20 <div id="sophie_bot_help" style="float: left; width: 50%"> 21 <p>This page simulate the Bot behavior you may meet on IRC.</p> 22 </div> 23 24 <div id="sophie_bot_reply" style="clear: both"> 25 [% INCLUDE 'chat/index.tt' %] 26 </div> -
server/trunk/web/root/templates/includes/header.tt
r132 r189 29 29 <li><a href="[% c.uri_for('/explorer') %]">Explorer</a></li> 30 30 <li><a href="[% c.uri_for('/sources') %]">Source & Patches</a></li> 31 <li><a href="[% c.uri_for('/chat') %]">Chat</a></li> 31 32 <li><a href="[% c.uri_for('/help') %]">Help</a></li> 32 33 </ul>
Note: See TracChangeset
for help on using the changeset viewer.