]> git.mxchange.org Git - friendica.git/commitdiff
Remove the "discard" button for contact requests from Diaspora.
authorMichael <heluecht@pirati.ca>
Fri, 28 Apr 2017 08:36:10 +0000 (08:36 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 28 Apr 2017 08:36:10 +0000 (08:36 +0000)
mod/notifications.php
view/templates/intros.tpl
view/theme/frio/templates/intros.tpl

index bab5fd6274e4ed2c5e47cb849f1195747377beea..fdaec05ccd2449a5916b593906da4bebf754f2bc 100644 (file)
@@ -223,6 +223,12 @@ function notifications_content(App $a) {
 
                                        $header .= " (".network_to_name($it['network'], $it['url']).")";
 
+                                       if ($it['network'] != NETWORK_DIASPORA) {
+                                               $discard = t('Discard');
+                                       } else {
+                                               $discard = '';
+                                       }
+
                                        $notif_content[] = replace_macros($tpl, array(
                                                '$header' => htmlentities($header),
                                                '$str_notifytype' => t('Notification type: '),
@@ -255,7 +261,7 @@ function notifications_content(App $a) {
                                                '$approve' => t('Approve'),
                                                '$note' => $it['note'],
                                                '$ignore' => t('Ignore'),
-                                               '$discard' => t('Discard'),
+                                               '$discard' => $discard,
 
                                        ));
                                        break;
index e3933e3815cdd48ddac9f2f38b3f7ac79ac499df..2d0bf9bd06d46dd58f4b8e1b140944f1adb68088 100644 (file)
@@ -14,7 +14,7 @@
 <div class="intro-wrapper-end" id="intro-wrapper-end-{{$contact_id}}"></div>
 <form class="intro-form" action="notifications/{{$intro_id}}" method="post">
 <input class="intro-submit-ignore" type="submit" name="submit" value="{{$ignore|escape:'html'}}" />
-<input class="intro-submit-discard" type="submit" name="submit" value="{{$discard|escape:'html'}}" />
+{{if $discard}}<input class="intro-submit-discard" type="submit" name="submit" value="{{$discard|escape:'html'}}" />{{/if}}
 </form>
 <div class="intro-form-end"></div>
 
index 8fd7ee609051b90cdaacb5acf48a7d9990ff4f60..1502a55aa21256a7fe774e653f5abfe5090bafb6 100644 (file)
@@ -13,7 +13,7 @@
 
                        <form class="intro-form" action="notifications/{{$intro_id}}" method="post">
                                <button class="btn-link intro-submit-ignore intro-action-link" type="submit" name="submit" value="{{$ignore|escape:'html'}}" title="{{$ignore|escape:'html'}}" data-toggle="tooltip"><i class="fa fa-ban" aria-hidden="true"></i></button>
-                               <button class="btn-link intro-submit-discard intro-action-link" type="submit" name="submit" value="{{$discard|escape:'html'}}" title="{{$discard|escape:'html'}}" data-toggle="tooltip"><i class="fa fa-trash-o" aria-hidden="true"></i></button>
+                               {{if $discard}}<button class="btn-link intro-submit-discard intro-action-link" type="submit" name="submit" value="{{$discard|escape:'html'}}" title="{{$discard|escape:'html'}}" data-toggle="tooltip"><i class="fa fa-trash-o" aria-hidden="true"></i></button>{{/if}}
                        </form>
                </div>
                <div class='intro-enty-name'><h4 class="media-heading"><a href="{{$zrl}}">{{$fullname}}</a></h4></div>
@@ -70,7 +70,7 @@
        <div class="intro-action-buttons">
                <form class="intro-form pull-left" action="notifications/{{$intro_id}}" method="post">
                        <button class="btn btn-small btn-default intro-submit-ignore" type="submit" name="submit" value="{{$ignore|escape:'html'}}">{{$ignore|escape:'html'}}</button>
-                       <button class="btn btn-small btn-default intro-submit-discard" type="submit" name="submit" value="{{$discard|escape:'html'}}">{{$discard|escape:'html'}}</button>&nbsp;
+                       {{if $discard}}<button class="btn btn-small btn-default intro-submit-discard" type="submit" name="submit" value="{{$discard|escape:'html'}}">{{$discard|escape:'html'}}</button>&nbsp;{{/if}}
                </form>
                <button class="btn btn-small btn-primary intro-submit-approve pull-right" onclick="addElmToModal('#intro-approve-wrapper-{{$contact_id}}')">{{$approve|escape:'html'}}</button>
        </div>