User: sits    
  Date: 08/08/17 15:25:37

  Modified:    lib/Codestriker/Action Search.pm SubmitNewTopic.pm
                        CreateTopic.pm
               lib/Codestriker/Http UrlBuilder.pm
               lib/Codestriker/Http/Method AddTopicMethod.pm
                        ViewTopicTextMethod.pm
               template/en/default createtopic.html.tmpl
               lib/Codestriker/TopicListeners Email.pm
  Log:
  More tweaks to get the system going in the new system.  Still more work to be 
done.
  
  
  
  Index: Search.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Action/Search.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Search.pm 19 Jun 2004 23:56:34 -0000      1.6
  +++ Search.pm 17 Aug 2008 22:25:36 -0000      1.7
  @@ -12,6 +12,7 @@
   use strict;
   use Codestriker::Model::Project;
   use Codestriker::DB::Database;
  +use Codestriker::Http::UrlBuilder;
   
   # Create an appropriate form for topic searching.
   sub process($$$) {
  @@ -71,6 +72,9 @@
        $vars->{'enable_body'} = 0;
        $vars->{'enable_filename'} = 1;
       }
  +    
  +    # Target URL to divert the post to.
  +    $vars->{'submit_search_url'} = $url_builder->submit_search_url(); 
   
       my $template = Codestriker::Http::Template->new("search");
       $template->process($vars);
  
  
  
  
  
  Index: SubmitNewTopic.pm
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/lib/Codestriker/Action/SubmitNewTopic.pm,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- SubmitNewTopic.pm 10 Aug 2008 12:18:43 -0000      1.35
  +++ SubmitNewTopic.pm 17 Aug 2008 22:25:36 -0000      1.36
  @@ -348,7 +348,7 @@
       $feedback = Codestriker::TopicListeners::Manager::topic_create($topic);
                         
       # Obtain a URL builder object and determine the URL to the topic.
  -    my $topic_url = $url_builder->view_url(topicid => $topicid, projectid => 
$topic->{project_id}); 
  +    my $topic_url = $url_builder->view_url(topicid => $topicid, projectid => 
$projectid);
                                                       
       # Indicate to the user that the topic has been created and an email has
       # been sent.
  
  
  
  
  
  Index: CreateTopic.pm
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/lib/Codestriker/Action/CreateTopic.pm,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- CreateTopic.pm    10 Aug 2008 12:18:43 -0000      1.31
  +++ CreateTopic.pm    17 Aug 2008 22:25:36 -0000      1.32
  @@ -40,6 +40,9 @@
       # url.
       $vars->{'doc_url'} = $url_builder->doc_url();
       $vars->{'search_url'} = $url_builder->search_url();
  +    
  +    # TODO: fix this once create topic is only done within context of a 
project.
  +    $vars->{'add_topic_url'} = $url_builder->add_topic_url(projectid => 0);
   
       # Retrieve the email, reviewers, cc, repository and projectid from
       # the cookie.
  
  
  
  
  
  Index: UrlBuilder.pm
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/lib/Codestriker/Http/UrlBuilder.pm,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- UrlBuilder.pm     15 Aug 2008 06:30:39 -0000      1.41
  +++ UrlBuilder.pm     17 Aug 2008 22:25:36 -0000      1.42
  @@ -46,6 +46,7 @@
   use Codestriker::Http::Method::EditProjectMethod;
   use Codestriker::Http::Method::ListProjectsMethod;
   use Codestriker::Http::Method::SearchTopicsMethod;
  +use Codestriker::Http::Method::SubmitSearchTopicsMethod;
   use Codestriker::Http::Method::StaticResourcesMethod;
   use Codestriker::Http::Method::ViewMetricsMethod;
   
  @@ -114,6 +115,12 @@
       return 
Codestriker::Http::Method::CreateTopicMethod->new($self->{query})->url($obsoletes);
   }        
   
  +# Create the URL for adding a topic to a project.
  +sub add_topic_url {
  +    my ($self, %args) = @_;
  +    return 
Codestriker::Http::Method::AddTopicMethod->new($self->{query})->url(%args);
  +}        
  +
   # Create the URL for editing a topic.
   sub edit_url {
       my ($self, %args) = @_;
  @@ -132,6 +139,12 @@
       return 
Codestriker::Http::Method::SearchTopicsMethod->new($self->{query})->url();
   }
   
  +# The submit search URL.
  +sub submit_search_url {
  +    my ($self) = @_;
  +    return 
Codestriker::Http::Method::SubmitSearchTopicsMethod->new($self->{query})->url();
  +}
  +
   # Create the URL for the documentation page.
   sub doc_url {
       my ($self) = @_;
  
  
  
  
  
  Index: AddTopicMethod.pm
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/AddTopicMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AddTopicMethod.pm 11 Aug 2008 22:32:39 -0000      1.1
  +++ AddTopicMethod.pm 17 Aug 2008 22:25:37 -0000      1.2
  @@ -47,7 +47,7 @@
   sub execute {
        my ($self, $http_input, $http_output) = @_;
        
  -     Codestriker::Action::CreateTopic->process($http_input, $http_output);
  +     Codestriker::Action::SubmitNewTopic->process($http_input, $http_output);
   }
   
   1;
  
  
  
  
  
  Index: ViewTopicTextMethod.pm
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/ViewTopicTextMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ViewTopicTextMethod.pm    10 Aug 2008 12:18:42 -0000      1.1
  +++ ViewTopicTextMethod.pm    17 Aug 2008 22:25:37 -0000      1.2
  @@ -10,6 +10,7 @@
   package Codestriker::Http::Method::ViewTopicTextMethod;
   
   use strict;
  +use Carp;
   use Codestriker::Http::Method;
   
   @Codestriker::Http::Method::ViewTopicTextMethod::ISA =
  @@ -19,8 +20,8 @@
   sub url() {
        my ($self, %args) = @_;
        
  -    die "Parameter topicid missing" unless defined $args{topicid};
  -     die "Parameter projectid missing" unless defined $args{projectid};
  +    confess "Parameter topicid missing" unless defined $args{topicid};
  +     confess "Parameter projectid missing" unless defined $args{projectid};
   
       if ($self->{cgi_style}) {
            return $self->{url_prefix} . "?action=view&topic=$args{topicid}" .
  
  
  
  
  
  Index: createtopic.html.tmpl
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/template/en/default/createtopic.html.tmpl,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- createtopic.html.tmpl     24 Jun 2008 03:26:50 -0000      1.54
  +++ createtopic.html.tmpl     17 Aug 2008 22:25:37 -0000      1.55
  @@ -20,8 +20,8 @@
   <p>
   [% END %]
   
  -<FORM METHOD="post" ENCTYPE="multipart/form-data" ACCEPT-CHARSET="UTF-8">
  -<INPUT TYPE="hidden" NAME="action" VALUE="submit_new_topic" />
  +<FORM METHOD="post" ENCTYPE="multipart/form-data" ACCEPT-CHARSET="UTF-8" 
action="[% add_topic_url %]">
  +<!-- <INPUT TYPE="hidden" NAME="action" VALUE="submit_new_topic" /> -->
   <INPUT TYPE="hidden" NAME="obsoletes" VALUE="[% obsoletes %]" />
   
   [%# The topic title input field #%]
  
  
  
  
  
  Index: Email.pm
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/lib/Codestriker/TopicListeners/Email.pm,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- Email.pm  15 Aug 2008 00:14:07 -0000      1.32
  +++ Email.pm  17 Aug 2008 22:25:37 -0000      1.33
  @@ -438,7 +438,8 @@
     
       my $query = new CGI;
       my $url_builder = Codestriker::Http::UrlBuilder->new($query);
  -    my $topic_url = $url_builder->view_url(topicid => $topic->{topicid});
  +    my $topic_url = $url_builder->view_url(topicid => $topic->{topicid},
  +                                           projectid => 
$topic->{project_id});
       
       my $subject = "[REVIEW] Topic $event_name \"" . $topic->{title} . "\"";
       
  
  
  

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits

Reply via email to