|  | 
| 5 | 5 | @endsection | 
| 6 | 6 | 
 | 
| 7 | 7 | @section('content') | 
| 8 |  | -<script type="text/javascript" src="{{ asset('/js/tinymce/tinymce.min.js') }}"></script> | 
| 9 |  | -<script type="text/javascript"> | 
| 10 |  | -  tinymce.init({ | 
| 11 |  | -    selector : "#new-post-info", | 
| 12 |  | -  });  | 
| 13 |  | -</script> | 
|  | 8 | +<div style="margin-bottom:20px"> | 
|  | 9 | +    <button onClick="$('#admin_new_post').hide();$('#admin_manage_members').hide();$('#admin_manage_info').show();">Manage Project</button> | 
|  | 10 | +    <button onClick="$('#admin_new_post').hide();$('#admin_manage_info').hide();$('#admin_manage_members').show();">Manage Members</button> | 
|  | 11 | +    <button onClick="$('#admin_manage_info').hide();$('#admin_manage_members').hide();$('#admin_new_post').show();">New News Post</button> | 
|  | 12 | +</div> | 
|  | 13 | +<div id="admin_manage_info" style="display: none;"> | 
|  | 14 | +     | 
|  | 15 | +</div> | 
| 14 | 16 | 
 | 
| 15 |  | -<form action="/write_post/{{ $project->id }}" method="post"> | 
| 16 |  | -   <div class="form-group"> | 
| 17 |  | -       <textarea class="form-control" name="title" id="new-post" rows="1" placeholder="Your Post's Title"></textarea> | 
| 18 |  | -       <textarea class="form-control" name="summary" id="new-post" rows="2" placeholder="Your Post's Summary or Short Description"></textarea> | 
| 19 |  | -       <textarea name="info" id="new-post-info" rows="20"></textarea> | 
| 20 |  | -   </div> | 
| 21 |  | -   <button type="submit" class="btn btn-primary">Create Post</button> | 
| 22 |  | -   <input type="hidden" value="{{ Session::token() }}" name="_token"> | 
| 23 |  | -   {{ csrf_field() }} | 
| 24 |  | -</form> | 
|  | 17 | + | 
|  | 18 | +<div id="admin_manage_members" style="display: none;"> | 
|  | 19 | +    <div class="panel panel-default" style="padding: 10px; width:350px; height:430px; "> | 
|  | 20 | +        <h4>Members List</h4> | 
|  | 21 | +        <div style="overflow-y: scroll; width:330px; height:370px"> | 
|  | 22 | +            <table class="table table-hover table-striped"> | 
|  | 23 | +            <?php | 
|  | 24 | +                $users = \DB::select('select * from user_projects where project_id = :id', ['id' => $project->id]); | 
|  | 25 | +            ?> | 
|  | 26 | +            @foreach($users as $user) | 
|  | 27 | +                <tr> | 
|  | 28 | +                    <td style="width:50%">Joe{{$user->user_name}}</td> | 
|  | 29 | +                    <td style="width:20%">Member{{$user->level}}</td> | 
|  | 30 | +                    <td style="width:30%"> | 
|  | 31 | +                        <a href="/promote/{{$user->user_id}}/{{$user->project_id}}" style="width:30%"> | 
|  | 32 | +                            P | 
|  | 33 | +                        </a> | 
|  | 34 | +                        <a href="/demote/{{$user->user_id}}/{{$user->project_id}}" style="width:30%"> | 
|  | 35 | +                            D | 
|  | 36 | +                        </a> | 
|  | 37 | +                        @if($user->user_id != Auth::user()->id) // So we can never delete all from a project by mistake | 
|  | 38 | +                            <a href="/remove/{{$user->user_id}}/{{$user->project_id}}" style="width:30%"> | 
|  | 39 | +                                X | 
|  | 40 | +                            </a> | 
|  | 41 | +                        @endif | 
|  | 42 | +                    </td> | 
|  | 43 | +                </tr> | 
|  | 44 | +            @endforeach | 
|  | 45 | +            </table> | 
|  | 46 | +        </div> | 
|  | 47 | +    </div> | 
|  | 48 | +</div> | 
|  | 49 | +  | 
|  | 50 | + | 
|  | 51 | +<div id="admin_new_post" style="display: none;"> | 
|  | 52 | +    <script type="text/javascript" src="{{ asset('/js/tinymce/tinymce.min.js') }}"></script> | 
|  | 53 | +    <script type="text/javascript"> | 
|  | 54 | +      tinymce.init({ | 
|  | 55 | +        selector : "#new-post-info", | 
|  | 56 | +        plugins : ["advlist autolink lists link image charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste"], | 
|  | 57 | +        toolbar : "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image" | 
|  | 58 | +      });  | 
|  | 59 | +    </script> | 
|  | 60 | +     | 
|  | 61 | +    <form action="/write_post/{{ $project->id }}" method="post"> | 
|  | 62 | +       <div class="form-group"> | 
|  | 63 | +           <textarea class="form-control" name="title" id="new-post" rows="1" placeholder="Your Post's Title"></textarea> | 
|  | 64 | +           <textarea class="form-control" name="summary" id="new-post" rows="2" placeholder="Your Post's Summary or Short Description"></textarea> | 
|  | 65 | +           <textarea name="info" id="new-post-info" rows="20"></textarea> | 
|  | 66 | +       </div> | 
|  | 67 | +       <button type="submit" class="btn btn-primary">Create Post</button> | 
|  | 68 | +       <input type="hidden" value="{{ Session::token() }}" name="_token"> | 
|  | 69 | +       {{ csrf_field() }} | 
|  | 70 | +    </form> | 
|  | 71 | +</div> | 
| 25 | 72 | @endsection | 
0 commit comments