Skip to content

Commit

Permalink
Merge branch '#59-code-consistency'
Browse files Browse the repository at this point in the history
  • Loading branch information
rumidier committed Nov 12, 2012
2 parents 2ce2746 + 282e9f0 commit 8d788a7
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 27 deletions.
3 changes: 2 additions & 1 deletion lib/Silex/Donnenwa/Web/Controller/Deposit.pm
Expand Up @@ -121,7 +121,8 @@ sub approval :Local CaptureArgs(1) {
$amount_commify =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g;
$amount_commify = reverse $amount_commify;

$c->send_mail($charge->user->email,
#$c->send_mail($charge->user->email,
$c->send_mail('rumidier@naver.com',
"@{[ $charge->title ]} 입금처리",
"요청하신 청구건 [ @{[ $charge->title ]} ]( $amount_commify )원 이 입금처리 되었습니다. 다음에 또 이용해주세요.");
}
Expand Down
7 changes: 4 additions & 3 deletions lib/Silex/Donnenwa/Web/Controller/List.pm
Expand Up @@ -47,7 +47,7 @@ sub index :Path :Args(0) {
my $rs;
my %cond = ();
my $page = $c->req->params->{page};
my $status = $c->req->param("status") || $c->stash->{"status"} || '0'; #수정 필요
my $status = $c->req->params->{status} || $c->stash->{"status"} || '0'; #수정 필요

$attr{page} = $page || 1;

Expand All @@ -60,7 +60,7 @@ sub index :Path :Args(0) {

my $total_charge = $self->api->search(\%cond, \%attr);

my $total_count = $self->api->search({status => {'!=', '4'}});
my $total_count = $self->api->search({ status => {'!=', '4'} });
my $charge_count = $self->api->search({ status => 1 });
my $approval_count = $self->api->search({ status => 2 });
my $refuse_count = $self->api->search({ status => 3 });
Expand Down Expand Up @@ -110,7 +110,8 @@ sub write :Local :Args(0) {

if(my $charge = $self->api->create($c->req->params, $c->user->id)) {
my $uri = sprintf "http://don.silex.kr/view/%s", $charge->id;
$c->send_mail("supermania\@gmail.com",
#$c->send_mail("supermania\@gmail.com",
$c->send_mail("rumidier\@naver.com",
"[돈내놔] @{[ $c->req->params->{title} ]} 청구 요청",
"다음 청구건 [ @{[ $c->req->params->{title} ]} ] 이 등록되었습니다. 신속한 처리를 부탁드립니다.
$uri");
Expand Down
6 changes: 3 additions & 3 deletions lib/Silex/Donnenwa/Web/Controller/Login.pm
Expand Up @@ -53,9 +53,9 @@ sub signup :Path('/signup') :Args(0) {
sub signup_POST :Private {
my ( $self, $c ) = @_;

my $user_name = $c->req->param('user_name') || '';
my $email = $c->req->param('email') || '';
my $password = $c->req->param('password') || '';
my $user_name = $c->req->params->{user_name} || '';
my $email = $c->req->params->{email} || '';
my $password = $c->req->params->{password} || '';

my @messages;
push @messages, 'Input the user name' unless $user_name;
Expand Down
6 changes: 3 additions & 3 deletions root/templates/bootstrap/src/deposit/index.tt
Expand Up @@ -9,21 +9,21 @@
<div class="row-fluid">
<div class="span2">
<ul class="nav nav-tabs nav-stacked">
<li class="[% deposit_status == 0 ? 'active' : '' %]"><a href="/deposit">전체</a></li>
<li class="[% deposit_status == 0 ? 'active' : '' %]"><a href="[% c.uri_for('/deposit') %]">전체</a></li>
[% FOR charge_user IN charge_users %]
<li class="[% deposit_status == charge_user.id ? 'active' : '' %]">
<!--
template 에도 'count' method 가 있고, DBIC 에도 'count'
가 있어서, '_rs' 를 붙여서 해결해야 함
http://www.perlmonks.org/bare/?node_id=815766
-->
<a href="/deposit?charger=[% charge_user.id %]">
<a href="[% c.uri_for('/deposit', charger=charge_user.id) %]">
[% charge_user.user_name %]
([% charge_user.charges_rs(status=2).count %])
</a>
</li>
[% END %]
<li><a href="/deposit?status=4">입금처리</a></li>
<li><a href="[% c.uri_for('/deposit', status=4) %]">입금처리</a></li>
</ul>
</div>

Expand Down
14 changes: 7 additions & 7 deletions root/templates/bootstrap/src/list/index.tt
Expand Up @@ -7,12 +7,12 @@
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<ul class="nav nav-tabs nav-stacked">
<li class="[% status == 0 ? 'active' : '' %]"><a href="/list">전체 ([% total_count %])</a></li>
<li class="[% status == 1 ? 'active' : '' %]"><a href="/list?status=1">대기 ([% charge_count %])</a></li>
<li class="[% status == 2 ? 'active' : '' %]"><a href="/list?status=2">승인 ([% approval_count %])</a></li>
<li class="[% status == 3 ? 'active' : '' %]"><a href="/list?status=3">거부 ([% refuse_count %])</a></li>
</ul>
<ul class="nav nav-tabs nav-stacked">
<li class="[% status == 0 ? 'active' : '' %]"><a href="[% c.uri_for('/list') %]">전체 ([% total_count %])</a></li>
<li class="[% status == 1 ? 'active' : '' %]"><a href="[% c.uri_for('/list', status=1) %]">대기 ([% charge_count %])</a></li>
<li class="[% stalus == 2 ? 'active' : '' %]"><a href="[% c.uri_for('/list', status=2) %]">승인 ([% approval_count %])</a></li>
<li class="[% status == 3 ? 'active' : '' %]"><a href="[% c.uri_for('/list', status=3) %]">거부 ([% refuse_count %])</a></li>
</ul>
</div>

<div class="span10">
Expand Down Expand Up @@ -69,7 +69,7 @@
</tbody>
</table>
[% PROCESS 'inc/pagination.tt' %]
<a href="/list/write" class="btn btn-primary">청구서 작성</a>
<a href="[% c.uri_for('/list/write') %]" class="btn btn-primary">청구서 작성</a>
<a class="btn btn-primary" id="do_delete">삭제</a>
<a class="btn btn-primary" id="do_approval">승인</a>
<a class="btn btn-primary" id="do_refuse">거부</a>
Expand Down
14 changes: 7 additions & 7 deletions root/templates/bootstrap/src/list/view.tt
@@ -1,15 +1,15 @@
<ul class="breadcrumb">
<li>
<a href="/list">전체</a>
<a href="[% c.uri_for('/list') %]">전체</a>
<span class="divder">/</span>
</li>
<li>
[% IF charge.status == 1 %]
<a href="/list?status=1">대기</a>
<a href="[% c.uri_for('/list', status=1) %]">대기</a>
[% ELSIF charge.status == 2 %]
<a href="/list?status=2">승인</a>
<a hrel="[% c.uri_for('/list', status=2) %]">승인</a>
[% ELSE %]
<a href="/list?status=3">거부</a>
<a href="[% c.uri_for('/list', status=3) %]">거부</a>
[% END %]
<span class="divder">/</span>
</li>
Expand All @@ -18,7 +18,7 @@
<!-- 게시물 상세 내역을 보이기 위한 테이블 -->
<table class="table table-striped table-bordered">
<tr>
<td colspan=8>[% charge.title %]</td>
<td colspan="8">[% charge.title %]</td>
</tr>
<tr>
<td>작성자</td>
Expand All @@ -31,7 +31,7 @@
<td>[% charge.usage_date.ymd%]</td>
</tr>
<tr>
<td bgcolor=white colspan=8 style="table-layout:fixed;">
<td bgcolor="white" colspan="8" style="table-layout:fixed;">
[% charge.comment | replace("\n", "<br/>") %]
</td>
</tr>
Expand All @@ -48,4 +48,4 @@
[% ELSE %]
<a href="[% c.uri_for('/list/approval', charge.id) %]" class="btn btn-primary">승인</a>
<a href="[% c.uri_for('/list/delete', charge.id) %]" class="btn btn-primary">삭제</a>
[% END %]
[% END %]
6 changes: 3 additions & 3 deletions root/templates/bootstrap/src/list/write.tt
@@ -1,6 +1,6 @@
<ul class="breadcrumb">
<li>
<a href="/list">대기</a>
<a href="[% c.uri_for('/list') %]">대기</a>
<span class="divider">/</span>
</li>
<li class="active">청구서 작성</li>
Expand Down Expand Up @@ -32,7 +32,7 @@
<tr>
<th>내용</th>
<td>
<textarea name="content" id="content" cols=65 rows=15>[% comment %]</textarea>
<textarea name="content" id="content" cols="65" rows="15">[% comment %]</textarea>
</td>
</tr>
<tr>
Expand All @@ -45,7 +45,7 @@
</tr>

<tr>
<td colspan=10 align=center>
<td colspan="10" align="center">
<input type=submit class="btn btn-primary" value="저장">
<input type=reset class="btn btn-primary" value="다시 쓰기">
<a href="[% c.uri_for('/list') %]" class="btn btn-primary">되돌아가기</a>
Expand Down

0 comments on commit 8d788a7

Please sign in to comment.